Debian Codegraph @

Documentation/devicetree/bindings/sound/realtek,rt5640.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/realtek,rt5640.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: RT5640/RT5639 audio CODEC
8
9 maintainers:
10 - Neil Armstrong <[email protected]>
11
12 description: |
13 This device supports I2C only.
14
15 Pins on the device (for linking into audio routes) for RT5639/RT5640:
16 * DMIC1
17 * DMIC2
18 * MICBIAS1
19 * IN1P
20 * IN1N
21 * IN2P
22 * IN2N
23 * IN3P
24 * IN3N
25 * HPOL
26 * HPOR
27 * LOUTL
28 * LOUTR
29 * SPOLP
30 * SPOLN
31 * SPORP
32 * SPORN
33
34 Additional pins on the device for RT5640:
35 * MONOP
36 * MONON
37
38 allOf:
39 - $ref: dai-common.yaml#
40
41 properties:
42 compatible:
43 enum:
44 - realtek,rt5640
45 - realtek,rt5639
46
47 reg:
48 maxItems: 1
49
50 clocks:
51 maxItems: 1
52
53 clock-names:
54 const: mclk
55
56 interrupts:
57 maxItems: 1
58 description: The CODEC's interrupt output.
59
60 realtek,in1-differential:
61 description:
62 Indicate MIC1 input is differential, rather than single-ended.
63 type: boolean
64
65 realtek,in2-differential:
66 description:
67 Indicate MIC2 input is differential, rather than single-ended.
68 type: boolean
69
70 realtek,in3-differential:
71 description:
72 Indicate MIC3 input is differential, rather than single-ended.
73 type: boolean
74
75 realtek,lout-differential:
76 description:
77 Indicate LOUT output is differential, rather than single-ended.
78 type: boolean
79
80 realtek,dmic1-data-pin:
81 description: Specify which pin to be used as DMIC1 data pin.
82 $ref: /schemas/types.yaml#/definitions/uint32
83 enum:
84 - 0 # dmic1 is not used
85 - 1 # using IN2P pin as dmic1 data pin
86 - 2 # using GPIO3 pin as dmic1 data pin
87
88 realtek,dmic2-data-pin:
89 description: Specify which pin to be used as DMIC2 data pin.
90 $ref: /schemas/types.yaml#/definitions/uint32
91 enum:
92 - 0 # dmic2 is not used
93 - 1 # using IN2N pin as dmic2 data pin
94 - 2 # using GPIO4 pin as dmic2 data pin
95
96 realtek,jack-detect-source:
97 description: The Jack Detect source.
98 $ref: /schemas/types.yaml#/definitions/uint32
99 enum:
100 - 0 # Jack Detect function is not used
101 - 1 # Use GPIO1 for jack-detect
102 - 2 # Use JD1_IN4P for jack-detect
103 - 3 # Use JD2_IN4N for jack-detect
104 - 4 # Use GPIO2 for jack-detect
105 - 5 # Use GPIO3 for jack-detect
106 - 6 # Use GPIO4 for jack-detect
107 - 7 # Use HDA header for jack-detect
108
109 realtek,jack-detect-not-inverted:
110 description:
111 Normal jack-detect switches give an inverted signal, set this bool
112 in the rare case you've a jack-detect switch which is not inverted.
113 type: boolean
114
115 realtek,over-current-threshold-microamp:
116 description: micbias over-current detection threshold in µA
117 enum:
118 - 600
119 - 1500
120 - 2000
121
122 realtek,over-current-scale-factor:
123 description: micbias over-current detection scale-factor
124 $ref: /schemas/types.yaml#/definitions/uint32
125 enum:
126 - 0 # Scale current by 0.5
127 - 1 # Scale current by 0.75
128 - 2 # Scale current by 1.0
129 - 3 # Scale current by 1.5
130
131 port:
132 $ref: audio-graph-port.yaml#
133 unevaluatedProperties: false
134
135 required:
136 - compatible
137 - reg
138 - interrupts
139
140 unevaluatedProperties: false
141
142 examples:
143 - |
144 #include <dt-bindings/gpio/gpio.h>
145 #include <dt-bindings/interrupt-controller/irq.h>
146
147 i2c {
148 #address-cells = <1>;
149 #size-cells = <0>;
150
151 codec@1a {
152 compatible = "realtek,rt5640";
153 reg = <0x1a>;
154 interrupt-parent = <&gpio>;
155 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
156 };
157 };