12cb80529SCharles Keepax# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 22cb80529SCharles Keepax%YAML 1.2 32cb80529SCharles Keepax--- 42cb80529SCharles Keepax$id: http://devicetree.org/schemas/mfd/cirrus,madera.yaml# 52cb80529SCharles Keepax$schema: http://devicetree.org/meta-schemas/core.yaml# 62cb80529SCharles Keepax 72cb80529SCharles Keepaxtitle: Cirrus Logic Madera class audio CODECs Multi-Functional Device 82cb80529SCharles Keepax 92cb80529SCharles Keepaxmaintainers: 102cb80529SCharles Keepax - patches@opensource.cirrus.com 112cb80529SCharles Keepax 122cb80529SCharles Keepaxdescription: | 132cb80529SCharles Keepax These devices are audio SoCs with extensive digital capabilities and a range 142cb80529SCharles Keepax of analogue I/O. 152cb80529SCharles Keepax 162cb80529SCharles Keepax See also the child driver bindings in: 172cb80529SCharles Keepax 182cb80529SCharles Keepax bindings/pinctrl/cirrus,madera.yaml 192cb80529SCharles Keepax bindings/regulator/wlf,arizona.yaml 202cb80529SCharles Keepax bindings/sound/cirrus,madera.yaml 212cb80529SCharles Keepax 222cb80529SCharles KeepaxallOf: 232cb80529SCharles Keepax - $ref: /schemas/pinctrl/cirrus,madera.yaml# 242cb80529SCharles Keepax - $ref: /schemas/regulator/wlf,arizona.yaml# 252cb80529SCharles Keepax - $ref: /schemas/sound/cirrus,madera.yaml# 262cb80529SCharles Keepax - if: 272cb80529SCharles Keepax properties: 282cb80529SCharles Keepax compatible: 292cb80529SCharles Keepax contains: 302cb80529SCharles Keepax enum: 312cb80529SCharles Keepax - cirrus,cs47l85 322cb80529SCharles Keepax - wlf,wm1840 332cb80529SCharles Keepax then: 342cb80529SCharles Keepax properties: 352cb80529SCharles Keepax SPKVDDL-supply: 362cb80529SCharles Keepax description: 372cb80529SCharles Keepax Left speaker driver power supply. 382cb80529SCharles Keepax 392cb80529SCharles Keepax SPKVDDR-supply: 402cb80529SCharles Keepax description: 412cb80529SCharles Keepax Right speaker driver power supply. 422cb80529SCharles Keepax 432cb80529SCharles Keepax required: 442cb80529SCharles Keepax - SPKVDDL-supply 452cb80529SCharles Keepax - SPKVDDR-supply 462cb80529SCharles Keepax else: 472cb80529SCharles Keepax required: 482cb80529SCharles Keepax - DCVDD-supply 492cb80529SCharles Keepax - if: 502cb80529SCharles Keepax properties: 512cb80529SCharles Keepax compatible: 522cb80529SCharles Keepax contains: 532cb80529SCharles Keepax enum: 542cb80529SCharles Keepax - cirrus,cs47l15 552cb80529SCharles Keepax - cirrus,cs47l35 562cb80529SCharles Keepax then: 572cb80529SCharles Keepax properties: 582cb80529SCharles Keepax SPKVDD-supply: 592cb80529SCharles Keepax description: 602cb80529SCharles Keepax Mono speaker driver power supply. 612cb80529SCharles Keepax 622cb80529SCharles Keepax required: 632cb80529SCharles Keepax - SPKVDD-supply 642cb80529SCharles Keepax - if: 652cb80529SCharles Keepax properties: 662cb80529SCharles Keepax compatible: 672cb80529SCharles Keepax contains: 682cb80529SCharles Keepax enum: 692cb80529SCharles Keepax - cirrus,cs47l35 702cb80529SCharles Keepax - cirrus,cs47l85 712cb80529SCharles Keepax - cirrus,cs47l90 722cb80529SCharles Keepax - cirrus,cs47l91 732cb80529SCharles Keepax - wlf,wm1840 742cb80529SCharles Keepax then: 752cb80529SCharles Keepax properties: 762cb80529SCharles Keepax DBVDD2-supply: 772cb80529SCharles Keepax description: 782cb80529SCharles Keepax Databus power supply. 792cb80529SCharles Keepax 802cb80529SCharles Keepax required: 812cb80529SCharles Keepax - DBVDD2-supply 822cb80529SCharles Keepax - if: 832cb80529SCharles Keepax properties: 842cb80529SCharles Keepax compatible: 852cb80529SCharles Keepax contains: 862cb80529SCharles Keepax enum: 872cb80529SCharles Keepax - cirrus,cs47l85 882cb80529SCharles Keepax - cirrus,cs47l90 892cb80529SCharles Keepax - cirrus,cs47l91 902cb80529SCharles Keepax - wlf,wm1840 912cb80529SCharles Keepax then: 922cb80529SCharles Keepax properties: 932cb80529SCharles Keepax DBVDD3-supply: 942cb80529SCharles Keepax description: 952cb80529SCharles Keepax Databus power supply. 962cb80529SCharles Keepax 972cb80529SCharles Keepax DBVDD4-supply: 982cb80529SCharles Keepax description: 992cb80529SCharles Keepax Databus power supply. 1002cb80529SCharles Keepax - if: 1012cb80529SCharles Keepax properties: 1022cb80529SCharles Keepax compatible: 1032cb80529SCharles Keepax contains: 1042cb80529SCharles Keepax enum: 1052cb80529SCharles Keepax - cirrus,cs47l15 1062cb80529SCharles Keepax then: 1072cb80529SCharles Keepax required: 1082cb80529SCharles Keepax - MICVDD-supply 1092cb80529SCharles Keepax else: 1102cb80529SCharles Keepax properties: 1112cb80529SCharles Keepax CPVDD2-supply: 1122cb80529SCharles Keepax description: 1132cb80529SCharles Keepax Secondary charge pump power supply. 1142cb80529SCharles Keepax 1152cb80529SCharles Keepax required: 1162cb80529SCharles Keepax - CPVDD2-supply 1172cb80529SCharles Keepax 1182cb80529SCharles Keepaxproperties: 1192cb80529SCharles Keepax compatible: 1202cb80529SCharles Keepax enum: 1212cb80529SCharles Keepax - cirrus,cs47l15 1222cb80529SCharles Keepax - cirrus,cs47l35 1232cb80529SCharles Keepax - cirrus,cs47l85 1242cb80529SCharles Keepax - cirrus,cs47l90 1252cb80529SCharles Keepax - cirrus,cs47l91 1262cb80529SCharles Keepax - cirrus,cs42l92 1272cb80529SCharles Keepax - cirrus,cs47l92 1282cb80529SCharles Keepax - cirrus,cs47l93 1292cb80529SCharles Keepax - cirrus,wm1840 1302cb80529SCharles Keepax 1312cb80529SCharles Keepax reg: 1322cb80529SCharles Keepax maxItems: 1 1332cb80529SCharles Keepax 1342cb80529SCharles Keepax gpio-controller: true 1352cb80529SCharles Keepax 1362cb80529SCharles Keepax '#gpio-cells': 1372cb80529SCharles Keepax description: 1382cb80529SCharles Keepax The first cell is the pin number. The second cell is reserved for 1392cb80529SCharles Keepax future use and must be zero 1402cb80529SCharles Keepax const: 2 1412cb80529SCharles Keepax 1422cb80529SCharles Keepax interrupt-controller: true 1432cb80529SCharles Keepax 1442cb80529SCharles Keepax '#interrupt-cells': 1452cb80529SCharles Keepax description: 1462cb80529SCharles Keepax The first cell is the IRQ number. 1472cb80529SCharles Keepax The second cell is the flags, encoded as the trigger masks from 1482cb80529SCharles Keepax bindings/interrupt-controller/interrupts.txt 1492cb80529SCharles Keepax const: 2 1502cb80529SCharles Keepax 1512cb80529SCharles Keepax interrupts: 1522cb80529SCharles Keepax maxItems: 1 1532cb80529SCharles Keepax 1542cb80529SCharles Keepax reset-gpios: 1552cb80529SCharles Keepax description: 1562cb80529SCharles Keepax One entry specifying the GPIO controlling /RESET. As defined in 1572cb80529SCharles Keepax bindings/gpio.txt. Although optional, it is strongly recommended 1582cb80529SCharles Keepax to use a hardware reset. 1592cb80529SCharles Keepax maxItems: 1 1602cb80529SCharles Keepax 1612cb80529SCharles Keepax clocks: 1622cb80529SCharles Keepax description: 1632cb80529SCharles Keepax Should reference the clocks supplied on MCLK1, MCLK2 and MCLK3. 1642cb80529SCharles Keepax minItems: 1 1652cb80529SCharles Keepax maxItems: 3 1662cb80529SCharles Keepax 1672cb80529SCharles Keepax clock-names: 1682cb80529SCharles Keepax description: | 1692cb80529SCharles Keepax May contain up to three strings: 1702cb80529SCharles Keepax "mclk1" For the clock supplied on MCLK1, recommended to be a 1712cb80529SCharles Keepax high quality audio reference clock. 1722cb80529SCharles Keepax "mclk2" For the clock supplied on MCLK2, required to be an 1732cb80529SCharles Keepax always on 32k clock. 1742cb80529SCharles Keepax "mclk3" For the clock supplied on MCLK3. 1752cb80529SCharles Keepax oneOf: 1762cb80529SCharles Keepax - items: 1772cb80529SCharles Keepax - const: mclk1 1782cb80529SCharles Keepax - items: 1792cb80529SCharles Keepax - const: mclk2 1802cb80529SCharles Keepax - items: 1812cb80529SCharles Keepax - const: mclk3 1822cb80529SCharles Keepax - items: 1832cb80529SCharles Keepax - const: mclk1 1842cb80529SCharles Keepax - const: mclk2 1852cb80529SCharles Keepax - items: 1862cb80529SCharles Keepax - const: mclk1 1872cb80529SCharles Keepax - const: mclk3 1882cb80529SCharles Keepax - items: 1892cb80529SCharles Keepax - const: mclk2 1902cb80529SCharles Keepax - const: mclk3 1912cb80529SCharles Keepax - items: 1922cb80529SCharles Keepax - const: mclk1 1932cb80529SCharles Keepax - const: mclk2 1942cb80529SCharles Keepax - const: mclk3 1952cb80529SCharles Keepax 1962cb80529SCharles Keepax AVDD-supply: 1972cb80529SCharles Keepax description: 1982cb80529SCharles Keepax Analogue power supply. 1992cb80529SCharles Keepax 2002cb80529SCharles Keepax DBVDD1-supply: 2012cb80529SCharles Keepax description: 2022cb80529SCharles Keepax Databus power supply. 2032cb80529SCharles Keepax 2042cb80529SCharles Keepax CPVDD1-supply: 2052cb80529SCharles Keepax description: 2062cb80529SCharles Keepax Charge pump power supply. 2072cb80529SCharles Keepax 2082cb80529SCharles Keepax DCVDD-supply: 2092cb80529SCharles Keepax description: 2102cb80529SCharles Keepax Digital power supply, optional on CS47L85, WM1840 where it can 2112cb80529SCharles Keepax be supplied internally. 2122cb80529SCharles Keepax 2132cb80529SCharles Keepax MICVDD-supply: 2142cb80529SCharles Keepax description: 2152cb80529SCharles Keepax Microphone power supply, normally supplied internally except on 2162cb80529SCharles Keepax cs47l24, wm1831 where it is mandatory. 2172cb80529SCharles Keepax 2182cb80529SCharles Keepaxrequired: 2192cb80529SCharles Keepax - compatible 2202cb80529SCharles Keepax - gpio-controller 2212cb80529SCharles Keepax - '#gpio-cells' 2222cb80529SCharles Keepax - interrupt-controller 2232cb80529SCharles Keepax - '#interrupt-cells' 2242cb80529SCharles Keepax - interrupts 2252cb80529SCharles Keepax - AVDD-supply 2262cb80529SCharles Keepax - DBVDD1-supply 2272cb80529SCharles Keepax - CPVDD1-supply 2282cb80529SCharles Keepax 2292cb80529SCharles KeepaxunevaluatedProperties: false 2302cb80529SCharles Keepax 2312cb80529SCharles Keepaxexamples: 2322cb80529SCharles Keepax - | 2332cb80529SCharles Keepax #include <dt-bindings/sound/madera.h> 2342cb80529SCharles Keepax i2c@e0004000 { 2352cb80529SCharles Keepax #address-cells = <1>; 2362cb80529SCharles Keepax #size-cells = <0>; 2372cb80529SCharles Keepax reg = <0xe0004000 0x1000>; 2382cb80529SCharles Keepax 2392cb80529SCharles Keepax cs47l85: codec@1a { 2402cb80529SCharles Keepax compatible = "cirrus,cs47l85"; 2412cb80529SCharles Keepax reg = <0x1a>; 2422cb80529SCharles Keepax 2432cb80529SCharles Keepax reset-gpios = <&gpio 0>; 2442cb80529SCharles Keepax wlf,ldoena = <&gpio 1>; 2452cb80529SCharles Keepax 2462cb80529SCharles Keepax interrupt-controller; 2472cb80529SCharles Keepax #interrupt-cells = <2>; 248*25e20b50SRob Herring interrupts = <4 1 0>; 2492cb80529SCharles Keepax 2502cb80529SCharles Keepax gpio-controller; 2512cb80529SCharles Keepax #gpio-cells = <2>; 2522cb80529SCharles Keepax 2532cb80529SCharles Keepax AVDD-supply = <&vdd1v8>; 2542cb80529SCharles Keepax DBVDD1-supply = <&vdd1v8>; 2552cb80529SCharles Keepax DBVDD2-supply = <&vdd1v8>; 2562cb80529SCharles Keepax DBVDD3-supply = <&vdd1v8>; 2572cb80529SCharles Keepax DBVDD4-supply = <&vdd1v8>; 2582cb80529SCharles Keepax CPVDD1-supply = <&vdd1v8>; 2592cb80529SCharles Keepax CPVDD2-supply = <&vdd1v2>; 2602cb80529SCharles Keepax SPKVDDL-supply = <&vdd5v>; 2612cb80529SCharles Keepax SPKVDDR-supply = <&vdd5v>; 2622cb80529SCharles Keepax 2632cb80529SCharles Keepax clocks = <&clks 0>, <&clks 1>, <&clks 2>; 2642cb80529SCharles Keepax clock-names = "mclk1", "mclk2", "mclk3"; 2652cb80529SCharles Keepax 2662cb80529SCharles Keepax cirrus,dmic-ref = <0 0 MADERA_DMIC_REF_MICBIAS1>; 2672cb80529SCharles Keepax cirrus,inmode = < 2682cb80529SCharles Keepax MADERA_INMODE_SE MADERA_INMODE_SE 2692cb80529SCharles Keepax MADERA_INMODE_SE MADERA_INMODE_SE 2702cb80529SCharles Keepax MADERA_INMODE_DIFF MADERA_INMODE_DIFF 2712cb80529SCharles Keepax >; 2722cb80529SCharles Keepax cirrus,max-channels-clocked = <2 0 0>; 2732cb80529SCharles Keepax 2742cb80529SCharles Keepax pinctrl-names = "default"; 2752cb80529SCharles Keepax pinctrl-0 = <&pinsettings>; 2762cb80529SCharles Keepax 2772cb80529SCharles Keepax pinsettings: pin-settings { 2782cb80529SCharles Keepax aif1-pins { 2792cb80529SCharles Keepax groups = "aif1"; 2802cb80529SCharles Keepax function = "aif1"; 2812cb80529SCharles Keepax bias-bus-hold; 2822cb80529SCharles Keepax }; 2832cb80529SCharles Keepax 2842cb80529SCharles Keepax aif2-pins { 2852cb80529SCharles Keepax groups = "aif2"; 2862cb80529SCharles Keepax function = "aif2"; 2872cb80529SCharles Keepax bias-bus-hold; 2882cb80529SCharles Keepax }; 2892cb80529SCharles Keepax 2902cb80529SCharles Keepax aif3-pins { 2912cb80529SCharles Keepax groups = "aif3"; 2922cb80529SCharles Keepax function = "aif3"; 2932cb80529SCharles Keepax bias-bus-hold; 2942cb80529SCharles Keepax }; 2952cb80529SCharles Keepax }; 2962cb80529SCharles Keepax }; 2972cb80529SCharles Keepax }; 298