298 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/cirrus,madera.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cirrus Logic Madera class audio CODECs Multi-Functional Device8 9maintainers:10 - patches@opensource.cirrus.com11 12description: |13 These devices are audio SoCs with extensive digital capabilities and a range14 of analogue I/O.15 16 See also the child driver bindings in:17 18 bindings/pinctrl/cirrus,madera.yaml19 bindings/regulator/wlf,arizona.yaml20 bindings/sound/cirrus,madera.yaml21 22allOf:23 - $ref: /schemas/pinctrl/cirrus,madera.yaml#24 - $ref: /schemas/regulator/wlf,arizona.yaml#25 - $ref: /schemas/sound/cirrus,madera.yaml#26 - if:27 properties:28 compatible:29 contains:30 enum:31 - cirrus,cs47l8532 - wlf,wm184033 then:34 properties:35 SPKVDDL-supply:36 description:37 Left speaker driver power supply.38 39 SPKVDDR-supply:40 description:41 Right speaker driver power supply.42 43 required:44 - SPKVDDL-supply45 - SPKVDDR-supply46 else:47 required:48 - DCVDD-supply49 - if:50 properties:51 compatible:52 contains:53 enum:54 - cirrus,cs47l1555 - cirrus,cs47l3556 then:57 properties:58 SPKVDD-supply:59 description:60 Mono speaker driver power supply.61 62 required:63 - SPKVDD-supply64 - if:65 properties:66 compatible:67 contains:68 enum:69 - cirrus,cs47l3570 - cirrus,cs47l8571 - cirrus,cs47l9072 - cirrus,cs47l9173 - wlf,wm184074 then:75 properties:76 DBVDD2-supply:77 description:78 Databus power supply.79 80 required:81 - DBVDD2-supply82 - if:83 properties:84 compatible:85 contains:86 enum:87 - cirrus,cs47l8588 - cirrus,cs47l9089 - cirrus,cs47l9190 - wlf,wm184091 then:92 properties:93 DBVDD3-supply:94 description:95 Databus power supply.96 97 DBVDD4-supply:98 description:99 Databus power supply.100 - if:101 properties:102 compatible:103 contains:104 enum:105 - cirrus,cs47l15106 then:107 required:108 - MICVDD-supply109 else:110 properties:111 CPVDD2-supply:112 description:113 Secondary charge pump power supply.114 115 required:116 - CPVDD2-supply117 118properties:119 compatible:120 enum:121 - cirrus,cs47l15122 - cirrus,cs47l35123 - cirrus,cs47l85124 - cirrus,cs47l90125 - cirrus,cs47l91126 - cirrus,cs42l92127 - cirrus,cs47l92128 - cirrus,cs47l93129 - cirrus,wm1840130 131 reg:132 maxItems: 1133 134 gpio-controller: true135 136 '#gpio-cells':137 description:138 The first cell is the pin number. The second cell is reserved for139 future use and must be zero140 const: 2141 142 interrupt-controller: true143 144 '#interrupt-cells':145 description:146 The first cell is the IRQ number.147 The second cell is the flags, encoded as the trigger masks from148 bindings/interrupt-controller/interrupts.txt149 const: 2150 151 interrupts:152 maxItems: 1153 154 reset-gpios:155 description:156 One entry specifying the GPIO controlling /RESET. As defined in157 bindings/gpio.txt. Although optional, it is strongly recommended158 to use a hardware reset.159 maxItems: 1160 161 clocks:162 description:163 Should reference the clocks supplied on MCLK1, MCLK2 and MCLK3.164 minItems: 1165 maxItems: 3166 167 clock-names:168 description: |169 May contain up to three strings:170 "mclk1" For the clock supplied on MCLK1, recommended to be a171 high quality audio reference clock.172 "mclk2" For the clock supplied on MCLK2, required to be an173 always on 32k clock.174 "mclk3" For the clock supplied on MCLK3.175 oneOf:176 - items:177 - const: mclk1178 - items:179 - const: mclk2180 - items:181 - const: mclk3182 - items:183 - const: mclk1184 - const: mclk2185 - items:186 - const: mclk1187 - const: mclk3188 - items:189 - const: mclk2190 - const: mclk3191 - items:192 - const: mclk1193 - const: mclk2194 - const: mclk3195 196 AVDD-supply:197 description:198 Analogue power supply.199 200 DBVDD1-supply:201 description:202 Databus power supply.203 204 CPVDD1-supply:205 description:206 Charge pump power supply.207 208 DCVDD-supply:209 description:210 Digital power supply, optional on CS47L85, WM1840 where it can211 be supplied internally.212 213 MICVDD-supply:214 description:215 Microphone power supply, normally supplied internally except on216 cs47l24, wm1831 where it is mandatory.217 218required:219 - compatible220 - gpio-controller221 - '#gpio-cells'222 - interrupt-controller223 - '#interrupt-cells'224 - interrupts225 - AVDD-supply226 - DBVDD1-supply227 - CPVDD1-supply228 229unevaluatedProperties: false230 231examples:232 - |233 #include <dt-bindings/sound/madera.h>234 i2c@e0004000 {235 #address-cells = <1>;236 #size-cells = <0>;237 reg = <0xe0004000 0x1000>;238 239 cs47l85: codec@1a {240 compatible = "cirrus,cs47l85";241 reg = <0x1a>;242 243 reset-gpios = <&gpio 0>;244 wlf,ldoena = <&gpio 1>;245 246 interrupt-controller;247 #interrupt-cells = <2>;248 interrupts = <4 1 0>;249 250 gpio-controller;251 #gpio-cells = <2>;252 253 AVDD-supply = <&vdd1v8>;254 DBVDD1-supply = <&vdd1v8>;255 DBVDD2-supply = <&vdd1v8>;256 DBVDD3-supply = <&vdd1v8>;257 DBVDD4-supply = <&vdd1v8>;258 CPVDD1-supply = <&vdd1v8>;259 CPVDD2-supply = <&vdd1v2>;260 SPKVDDL-supply = <&vdd5v>;261 SPKVDDR-supply = <&vdd5v>;262 263 clocks = <&clks 0>, <&clks 1>, <&clks 2>;264 clock-names = "mclk1", "mclk2", "mclk3";265 266 cirrus,dmic-ref = <0 0 MADERA_DMIC_REF_MICBIAS1>;267 cirrus,inmode = <268 MADERA_INMODE_SE MADERA_INMODE_SE269 MADERA_INMODE_SE MADERA_INMODE_SE270 MADERA_INMODE_DIFF MADERA_INMODE_DIFF271 >;272 cirrus,max-channels-clocked = <2 0 0>;273 274 pinctrl-names = "default";275 pinctrl-0 = <&pinsettings>;276 277 pinsettings: pin-settings {278 aif1-pins {279 groups = "aif1";280 function = "aif1";281 bias-bus-hold;282 };283 284 aif2-pins {285 groups = "aif2";286 function = "aif2";287 bias-bus-hold;288 };289 290 aif3-pins {291 groups = "aif3";292 function = "aif3";293 bias-bus-hold;294 };295 };296 };297 };298