1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/cirrus,madera.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Cirrus Logic Madera class audio CODECs Multi-Functional Device 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - patches@opensource.cirrus.com 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: | 13c66ec88fSEmmanuel Vadot These devices are audio SoCs with extensive digital capabilities and a range 14c66ec88fSEmmanuel Vadot of analogue I/O. 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot See also the child driver bindings in: 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot bindings/pinctrl/cirrus,madera.yaml 19c66ec88fSEmmanuel Vadot bindings/regulator/wlf,arizona.yaml 20c66ec88fSEmmanuel Vadot bindings/sound/cirrus,madera.yaml 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel VadotallOf: 23c66ec88fSEmmanuel Vadot - $ref: /schemas/pinctrl/cirrus,madera.yaml# 24c66ec88fSEmmanuel Vadot - $ref: /schemas/regulator/wlf,arizona.yaml# 25c66ec88fSEmmanuel Vadot - $ref: /schemas/sound/cirrus,madera.yaml# 26c66ec88fSEmmanuel Vadot - if: 27c66ec88fSEmmanuel Vadot properties: 28c66ec88fSEmmanuel Vadot compatible: 29c66ec88fSEmmanuel Vadot contains: 30c66ec88fSEmmanuel Vadot enum: 31c66ec88fSEmmanuel Vadot - cirrus,cs47l85 32c66ec88fSEmmanuel Vadot - wlf,wm1840 33c66ec88fSEmmanuel Vadot then: 34c66ec88fSEmmanuel Vadot properties: 35c66ec88fSEmmanuel Vadot SPKVDDL-supply: 36c66ec88fSEmmanuel Vadot description: 37c66ec88fSEmmanuel Vadot Left speaker driver power supply. 38c66ec88fSEmmanuel Vadot 39c66ec88fSEmmanuel Vadot SPKVDDR-supply: 40c66ec88fSEmmanuel Vadot description: 41c66ec88fSEmmanuel Vadot Right speaker driver power supply. 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot required: 44c66ec88fSEmmanuel Vadot - SPKVDDL-supply 45c66ec88fSEmmanuel Vadot - SPKVDDR-supply 46c66ec88fSEmmanuel Vadot else: 47c66ec88fSEmmanuel Vadot required: 48c66ec88fSEmmanuel Vadot - DCVDD-supply 49c66ec88fSEmmanuel Vadot - if: 50c66ec88fSEmmanuel Vadot properties: 51c66ec88fSEmmanuel Vadot compatible: 52c66ec88fSEmmanuel Vadot contains: 53c66ec88fSEmmanuel Vadot enum: 54c66ec88fSEmmanuel Vadot - cirrus,cs47l15 55c66ec88fSEmmanuel Vadot - cirrus,cs47l35 56c66ec88fSEmmanuel Vadot then: 57c66ec88fSEmmanuel Vadot properties: 58c66ec88fSEmmanuel Vadot SPKVDD-supply: 59c66ec88fSEmmanuel Vadot description: 60c66ec88fSEmmanuel Vadot Mono speaker driver power supply. 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel Vadot required: 63c66ec88fSEmmanuel Vadot - SPKVDD-supply 64c66ec88fSEmmanuel Vadot - if: 65c66ec88fSEmmanuel Vadot properties: 66c66ec88fSEmmanuel Vadot compatible: 67c66ec88fSEmmanuel Vadot contains: 68c66ec88fSEmmanuel Vadot enum: 69c66ec88fSEmmanuel Vadot - cirrus,cs47l35 70c66ec88fSEmmanuel Vadot - cirrus,cs47l85 71c66ec88fSEmmanuel Vadot - cirrus,cs47l90 72c66ec88fSEmmanuel Vadot - cirrus,cs47l91 73c66ec88fSEmmanuel Vadot - wlf,wm1840 74c66ec88fSEmmanuel Vadot then: 75c66ec88fSEmmanuel Vadot properties: 76c66ec88fSEmmanuel Vadot DBVDD2-supply: 77c66ec88fSEmmanuel Vadot description: 78c66ec88fSEmmanuel Vadot Databus power supply. 79c66ec88fSEmmanuel Vadot 80c66ec88fSEmmanuel Vadot required: 81c66ec88fSEmmanuel Vadot - DBVDD2-supply 82c66ec88fSEmmanuel Vadot - if: 83c66ec88fSEmmanuel Vadot properties: 84c66ec88fSEmmanuel Vadot compatible: 85c66ec88fSEmmanuel Vadot contains: 86c66ec88fSEmmanuel Vadot enum: 87c66ec88fSEmmanuel Vadot - cirrus,cs47l85 88c66ec88fSEmmanuel Vadot - cirrus,cs47l90 89c66ec88fSEmmanuel Vadot - cirrus,cs47l91 90c66ec88fSEmmanuel Vadot - wlf,wm1840 91c66ec88fSEmmanuel Vadot then: 92c66ec88fSEmmanuel Vadot properties: 93c66ec88fSEmmanuel Vadot DBVDD3-supply: 94c66ec88fSEmmanuel Vadot description: 95c66ec88fSEmmanuel Vadot Databus power supply. 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot DBVDD4-supply: 98c66ec88fSEmmanuel Vadot description: 99c66ec88fSEmmanuel Vadot Databus power supply. 100c66ec88fSEmmanuel Vadot - if: 101c66ec88fSEmmanuel Vadot properties: 102c66ec88fSEmmanuel Vadot compatible: 103c66ec88fSEmmanuel Vadot contains: 104c66ec88fSEmmanuel Vadot enum: 105c66ec88fSEmmanuel Vadot - cirrus,cs47l15 106c66ec88fSEmmanuel Vadot then: 107c66ec88fSEmmanuel Vadot required: 108c66ec88fSEmmanuel Vadot - MICVDD-supply 109c66ec88fSEmmanuel Vadot else: 110c66ec88fSEmmanuel Vadot properties: 111c66ec88fSEmmanuel Vadot CPVDD2-supply: 112c66ec88fSEmmanuel Vadot description: 113c66ec88fSEmmanuel Vadot Secondary charge pump power supply. 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot required: 116c66ec88fSEmmanuel Vadot - CPVDD2-supply 117c66ec88fSEmmanuel Vadot 118c66ec88fSEmmanuel Vadotproperties: 119c66ec88fSEmmanuel Vadot compatible: 120c66ec88fSEmmanuel Vadot enum: 121c66ec88fSEmmanuel Vadot - cirrus,cs47l15 122c66ec88fSEmmanuel Vadot - cirrus,cs47l35 123c66ec88fSEmmanuel Vadot - cirrus,cs47l85 124c66ec88fSEmmanuel Vadot - cirrus,cs47l90 125c66ec88fSEmmanuel Vadot - cirrus,cs47l91 126c66ec88fSEmmanuel Vadot - cirrus,cs42l92 127c66ec88fSEmmanuel Vadot - cirrus,cs47l92 128c66ec88fSEmmanuel Vadot - cirrus,cs47l93 129c66ec88fSEmmanuel Vadot - cirrus,wm1840 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot reg: 132c66ec88fSEmmanuel Vadot maxItems: 1 133c66ec88fSEmmanuel Vadot 134c66ec88fSEmmanuel Vadot gpio-controller: true 135c66ec88fSEmmanuel Vadot 136c66ec88fSEmmanuel Vadot '#gpio-cells': 137c66ec88fSEmmanuel Vadot description: 138c66ec88fSEmmanuel Vadot The first cell is the pin number. The second cell is reserved for 139c66ec88fSEmmanuel Vadot future use and must be zero 140c66ec88fSEmmanuel Vadot const: 2 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot interrupt-controller: true 143c66ec88fSEmmanuel Vadot 144c66ec88fSEmmanuel Vadot '#interrupt-cells': 145c66ec88fSEmmanuel Vadot description: 146c66ec88fSEmmanuel Vadot The first cell is the IRQ number. 147c66ec88fSEmmanuel Vadot The second cell is the flags, encoded as the trigger masks from 148c66ec88fSEmmanuel Vadot bindings/interrupt-controller/interrupts.txt 149c66ec88fSEmmanuel Vadot const: 2 150c66ec88fSEmmanuel Vadot 151c66ec88fSEmmanuel Vadot interrupts: 152c66ec88fSEmmanuel Vadot maxItems: 1 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadot reset-gpios: 155c66ec88fSEmmanuel Vadot description: 156c66ec88fSEmmanuel Vadot One entry specifying the GPIO controlling /RESET. As defined in 157c66ec88fSEmmanuel Vadot bindings/gpio.txt. Although optional, it is strongly recommended 158c66ec88fSEmmanuel Vadot to use a hardware reset. 159c66ec88fSEmmanuel Vadot maxItems: 1 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot clocks: 162c66ec88fSEmmanuel Vadot description: 163c66ec88fSEmmanuel Vadot Should reference the clocks supplied on MCLK1, MCLK2 and MCLK3. 164c66ec88fSEmmanuel Vadot minItems: 1 165c66ec88fSEmmanuel Vadot maxItems: 3 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel Vadot clock-names: 168c66ec88fSEmmanuel Vadot description: | 169c66ec88fSEmmanuel Vadot May contain up to three strings: 170c66ec88fSEmmanuel Vadot "mclk1" For the clock supplied on MCLK1, recommended to be a 171c66ec88fSEmmanuel Vadot high quality audio reference clock. 172c66ec88fSEmmanuel Vadot "mclk2" For the clock supplied on MCLK2, required to be an 173c66ec88fSEmmanuel Vadot always on 32k clock. 174c66ec88fSEmmanuel Vadot "mclk3" For the clock supplied on MCLK3. 175c66ec88fSEmmanuel Vadot oneOf: 176c66ec88fSEmmanuel Vadot - items: 177c66ec88fSEmmanuel Vadot - const: mclk1 178c66ec88fSEmmanuel Vadot - items: 179c66ec88fSEmmanuel Vadot - const: mclk2 180c66ec88fSEmmanuel Vadot - items: 181c66ec88fSEmmanuel Vadot - const: mclk3 182c66ec88fSEmmanuel Vadot - items: 183c66ec88fSEmmanuel Vadot - const: mclk1 184c66ec88fSEmmanuel Vadot - const: mclk2 185c66ec88fSEmmanuel Vadot - items: 186c66ec88fSEmmanuel Vadot - const: mclk1 187c66ec88fSEmmanuel Vadot - const: mclk3 188c66ec88fSEmmanuel Vadot - items: 189c66ec88fSEmmanuel Vadot - const: mclk2 190c66ec88fSEmmanuel Vadot - const: mclk3 191c66ec88fSEmmanuel Vadot - items: 192c66ec88fSEmmanuel Vadot - const: mclk1 193c66ec88fSEmmanuel Vadot - const: mclk2 194c66ec88fSEmmanuel Vadot - const: mclk3 195c66ec88fSEmmanuel Vadot 196c66ec88fSEmmanuel Vadot AVDD-supply: 197c66ec88fSEmmanuel Vadot description: 198c66ec88fSEmmanuel Vadot Analogue power supply. 199c66ec88fSEmmanuel Vadot 200c66ec88fSEmmanuel Vadot DBVDD1-supply: 201c66ec88fSEmmanuel Vadot description: 202c66ec88fSEmmanuel Vadot Databus power supply. 203c66ec88fSEmmanuel Vadot 204c66ec88fSEmmanuel Vadot CPVDD1-supply: 205c66ec88fSEmmanuel Vadot description: 206c66ec88fSEmmanuel Vadot Charge pump power supply. 207c66ec88fSEmmanuel Vadot 208c66ec88fSEmmanuel Vadot DCVDD-supply: 209c66ec88fSEmmanuel Vadot description: 210c66ec88fSEmmanuel Vadot Digital power supply, optional on CS47L85, WM1840 where it can 211c66ec88fSEmmanuel Vadot be supplied internally. 212c66ec88fSEmmanuel Vadot 213c66ec88fSEmmanuel Vadot MICVDD-supply: 214c66ec88fSEmmanuel Vadot description: 215c66ec88fSEmmanuel Vadot Microphone power supply, normally supplied internally except on 216c66ec88fSEmmanuel Vadot cs47l24, wm1831 where it is mandatory. 217c66ec88fSEmmanuel Vadot 218c66ec88fSEmmanuel Vadotrequired: 219c66ec88fSEmmanuel Vadot - compatible 220c66ec88fSEmmanuel Vadot - gpio-controller 221c66ec88fSEmmanuel Vadot - '#gpio-cells' 222c66ec88fSEmmanuel Vadot - interrupt-controller 223c66ec88fSEmmanuel Vadot - '#interrupt-cells' 224c66ec88fSEmmanuel Vadot - interrupts 225c66ec88fSEmmanuel Vadot - AVDD-supply 226c66ec88fSEmmanuel Vadot - DBVDD1-supply 227c66ec88fSEmmanuel Vadot - CPVDD1-supply 228c66ec88fSEmmanuel Vadot 229c66ec88fSEmmanuel VadotunevaluatedProperties: false 230c66ec88fSEmmanuel Vadot 231c66ec88fSEmmanuel Vadotexamples: 232c66ec88fSEmmanuel Vadot - | 233c66ec88fSEmmanuel Vadot #include <dt-bindings/sound/madera.h> 234c66ec88fSEmmanuel Vadot i2c@e0004000 { 235c66ec88fSEmmanuel Vadot #address-cells = <1>; 236c66ec88fSEmmanuel Vadot #size-cells = <0>; 237c66ec88fSEmmanuel Vadot reg = <0xe0004000 0x1000>; 238c66ec88fSEmmanuel Vadot 239c66ec88fSEmmanuel Vadot cs47l85: codec@1a { 240c66ec88fSEmmanuel Vadot compatible = "cirrus,cs47l85"; 241c66ec88fSEmmanuel Vadot reg = <0x1a>; 242c66ec88fSEmmanuel Vadot 243c66ec88fSEmmanuel Vadot reset-gpios = <&gpio 0>; 244c66ec88fSEmmanuel Vadot wlf,ldoena = <&gpio 1>; 245c66ec88fSEmmanuel Vadot 246c66ec88fSEmmanuel Vadot interrupt-controller; 247c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 248*e67e8565SEmmanuel Vadot interrupts = <4 1 0>; 249c66ec88fSEmmanuel Vadot 250c66ec88fSEmmanuel Vadot gpio-controller; 251c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 252c66ec88fSEmmanuel Vadot 253c66ec88fSEmmanuel Vadot AVDD-supply = <&vdd1v8>; 254c66ec88fSEmmanuel Vadot DBVDD1-supply = <&vdd1v8>; 255c66ec88fSEmmanuel Vadot DBVDD2-supply = <&vdd1v8>; 256c66ec88fSEmmanuel Vadot DBVDD3-supply = <&vdd1v8>; 257c66ec88fSEmmanuel Vadot DBVDD4-supply = <&vdd1v8>; 258c66ec88fSEmmanuel Vadot CPVDD1-supply = <&vdd1v8>; 259c66ec88fSEmmanuel Vadot CPVDD2-supply = <&vdd1v2>; 260c66ec88fSEmmanuel Vadot SPKVDDL-supply = <&vdd5v>; 261c66ec88fSEmmanuel Vadot SPKVDDR-supply = <&vdd5v>; 262c66ec88fSEmmanuel Vadot 263c66ec88fSEmmanuel Vadot clocks = <&clks 0>, <&clks 1>, <&clks 2>; 264c66ec88fSEmmanuel Vadot clock-names = "mclk1", "mclk2", "mclk3"; 265c66ec88fSEmmanuel Vadot 266c66ec88fSEmmanuel Vadot cirrus,dmic-ref = <0 0 MADERA_DMIC_REF_MICBIAS1>; 267c66ec88fSEmmanuel Vadot cirrus,inmode = < 268c66ec88fSEmmanuel Vadot MADERA_INMODE_SE MADERA_INMODE_SE 269c66ec88fSEmmanuel Vadot MADERA_INMODE_SE MADERA_INMODE_SE 270c66ec88fSEmmanuel Vadot MADERA_INMODE_DIFF MADERA_INMODE_DIFF 271c66ec88fSEmmanuel Vadot >; 272c66ec88fSEmmanuel Vadot cirrus,max-channels-clocked = <2 0 0>; 273c66ec88fSEmmanuel Vadot 274c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 275c66ec88fSEmmanuel Vadot pinctrl-0 = <&pinsettings>; 276c66ec88fSEmmanuel Vadot 277c66ec88fSEmmanuel Vadot pinsettings: pin-settings { 278c66ec88fSEmmanuel Vadot aif1-pins { 279c66ec88fSEmmanuel Vadot groups = "aif1"; 280c66ec88fSEmmanuel Vadot function = "aif1"; 281c66ec88fSEmmanuel Vadot bias-bus-hold; 282c66ec88fSEmmanuel Vadot }; 283c66ec88fSEmmanuel Vadot 284c66ec88fSEmmanuel Vadot aif2-pins { 285c66ec88fSEmmanuel Vadot groups = "aif2"; 286c66ec88fSEmmanuel Vadot function = "aif2"; 287c66ec88fSEmmanuel Vadot bias-bus-hold; 288c66ec88fSEmmanuel Vadot }; 289c66ec88fSEmmanuel Vadot 290c66ec88fSEmmanuel Vadot aif3-pins { 291c66ec88fSEmmanuel Vadot groups = "aif3"; 292c66ec88fSEmmanuel Vadot function = "aif3"; 293c66ec88fSEmmanuel Vadot bias-bus-hold; 294c66ec88fSEmmanuel Vadot }; 295c66ec88fSEmmanuel Vadot }; 296c66ec88fSEmmanuel Vadot }; 297c66ec88fSEmmanuel Vadot }; 298