1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/sound/realtek,rt5640.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: RT5640/RT5639 audio CODEC
10 - Neil Armstrong <neil.armstrong@linaro.org>
13 This device supports I2C only.
15 Pins on the device (for linking into audio routes) for RT5639/RT5640:
34 Additional pins on the device for RT5640:
39 - $ref: dai-common.yaml#
52 description: The CODEC's interrupt output.
54 realtek,in1-differential:
56 Indicate MIC1 input is differential, rather than single-ended.
59 realtek,in2-differential:
61 Indicate MIC2 input is differential, rather than single-ended.
64 realtek,in3-differential:
66 Indicate MIC3 input is differential, rather than single-ended.
69 realtek,lout-differential:
71 Indicate LOUT output is differential, rather than single-ended.
74 realtek,dmic1-data-pin:
75 description: Specify which pin to be used as DMIC1 data pin.
76 $ref: /schemas/types.yaml#/definitions/uint32
78 - 0 # dmic1 is not used
79 - 1 # using IN2P pin as dmic1 data pin
80 - 2 # using GPIO3 pin as dmic1 data pin
82 realtek,dmic2-data-pin:
83 description: Specify which pin to be used as DMIC2 data pin.
84 $ref: /schemas/types.yaml#/definitions/uint32
86 - 0 # dmic2 is not used
87 - 1 # using IN2N pin as dmic2 data pin
88 - 2 # using GPIO4 pin as dmic2 data pin
90 realtek,jack-detect-source:
91 description: The Jack Detect source.
92 $ref: /schemas/types.yaml#/definitions/uint32
94 - 0 # Jack Detect function is not used
95 - 1 # Use GPIO1 for jack-detect
96 - 2 # Use JD1_IN4P for jack-detect
97 - 3 # Use JD2_IN4N for jack-detect
98 - 4 # Use GPIO2 for jack-detect
99 - 5 # Use GPIO3 for jack-detect
100 - 6 # Use GPIO4 for jack-detect
102 realtek,jack-detect-not-inverted:
104 Normal jack-detect switches give an inverted signal, set this bool
105 in the rare case you've a jack-detect switch which is not inverted.
108 realtek,over-current-threshold-microamp:
109 description: micbias over-current detection threshold in µA
115 realtek,over-current-scale-factor:
116 description: micbias over-current detection scale-factor
117 $ref: /schemas/types.yaml#/definitions/uint32
119 - 0 # Scale current by 0.5
120 - 1 # Scale current by 0.75
121 - 2 # Scale current by 1.0
122 - 3 # Scale current by 1.5
129 unevaluatedProperties: false
133 #include <dt-bindings/gpio/gpio.h>
134 #include <dt-bindings/interrupt-controller/irq.h>
137 #address-cells = <1>;
141 compatible = "realtek,rt5640";
143 interrupt-parent = <&gpio>;
144 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;