0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/wlf,arizona.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs
0008
0009 maintainers:
0010 - patches@opensource.cirrus.com
0011
0012 description: |
0013 These devices are audio SoCs with extensive digital capabilities and a
0014 range of analogue I/O.
0015
0016 allOf:
0017 - $ref: /schemas/spi/spi-peripheral-props.yaml
0018 - $ref: /schemas/sound/wlf,arizona.yaml#
0019 - $ref: /schemas/regulator/wlf,arizona.yaml#
0020 - $ref: /schemas/extcon/wlf,arizona.yaml#
0021 - if:
0022 properties:
0023 compatible:
0024 contains:
0025 enum:
0026 - cirrus,cs47l24
0027 - wlf,wm1831
0028 then:
0029 required:
0030 - DCVDD-supply
0031 - MICVDD-supply
0032 else:
0033 properties:
0034 LDOVDD-supply:
0035 description:
0036 Digital power supply, used internally to generate DCVDD when
0037 internally supplied.
0038
0039 - if:
0040 properties:
0041 compatible:
0042 contains:
0043 enum:
0044 - wlf,wm1814
0045 - wlf,wm5102
0046 - wlf,wm5110
0047 - wlf,wm8280
0048 - wlf,wm8997
0049 - wlf,wm8998
0050 then:
0051 properties:
0052 DBVDD2-supply:
0053 description:
0054 Databus power supply.
0055
0056 required:
0057 - DBVDD2-supply
0058 - if:
0059 properties:
0060 compatible:
0061 contains:
0062 enum:
0063 - wlf,wm1814
0064 - wlf,wm5102
0065 - wlf,wm5110
0066 - wlf,wm8280
0067 - wlf,wm8998
0068 then:
0069 properties:
0070 DBVDD3-supply:
0071 description:
0072 Databus power supply.
0073
0074 required:
0075 - DBVDD3-supply
0076 - if:
0077 properties:
0078 compatible:
0079 contains:
0080 enum:
0081 - cirrus,cs47l24
0082 - wlf,wm1831
0083 - wlf,wm8997
0084 then:
0085 properties:
0086 SPKVDD-supply:
0087 description:
0088 Mono speaker driver power supply.
0089
0090 required:
0091 - SPKVDD-supply
0092 else:
0093 properties:
0094 SPKVDDL-supply:
0095 description:
0096 Left speaker driver power supply.
0097
0098 SPKVDDR-supply:
0099 description:
0100 Right speaker driver power supply.
0101
0102 required:
0103 - SPKVDDL-supply
0104 - SPKVDDR-supply
0105
0106 properties:
0107 compatible:
0108 enum:
0109 - cirrus,cs47l24
0110 - wlf,wm1814
0111 - wlf,wm1831
0112 - wlf,wm5102
0113 - wlf,wm5110
0114 - wlf,wm8280
0115 - wlf,wm8997
0116 - wlf,wm8998
0117
0118 reg:
0119 maxItems: 1
0120
0121 AVDD-supply:
0122 description:
0123 Analogue power supply.
0124
0125 CPVDD-supply:
0126 description:
0127 Charge pump power supply.
0128
0129 DBVDD1-supply:
0130 description:
0131 Databus power supply.
0132
0133 DCVDD-supply:
0134 description:
0135 Digital power supply, normally supplied internally except on cs47l24,
0136 wm1831 where it is mandatory.
0137
0138 MICVDD-supply:
0139 description:
0140 Microphone power supply, normally supplied internally except on
0141 cs47l24, wm1831 where it is mandatory.
0142
0143 gpio-controller: true
0144
0145 '#gpio-cells':
0146 description:
0147 The first cell is the pin number and the second cell is used to
0148 specify optional parameters.
0149 const: 2
0150
0151 wlf,gpio-defaults:
0152 description:
0153 A list of GPIO configuration register values. Defines for the
0154 appropriate values can found in dt-bindings/mfd/arizona.h. If
0155 absent, no configuration of these registers is performed. If any
0156 entry has a value that is out of range for a 16 bit register then the
0157 chip default will be used. If present exactly five values must be
0158 specified.
0159 $ref: "/schemas/types.yaml#/definitions/uint32-array"
0160 minItems: 1
0161 maxItems: 5
0162
0163 interrupt-controller: true
0164
0165 '#interrupt-cells':
0166 description:
0167 The first cell is the IRQ number. The second cell is the flags,
0168 encoded as trigger masks.
0169 const: 2
0170
0171 interrupts:
0172 maxItems: 1
0173
0174 clocks:
0175 description:
0176 Should reference the clocks supplied on MCLK1 and MCLK2.
0177 minItems: 1
0178 maxItems: 2
0179
0180 clock-names:
0181 description:
0182 Should contains two strings mclk1 for the clock supplied on MCLK1,
0183 recommended to be a high quality audio reference clock mclk2 for the
0184 clock supplied on MCLK2, recommended to be an always on 32k clock.
0185 oneOf:
0186 - items:
0187 - const: mclk1
0188 - items:
0189 - const: mclk2
0190 - items:
0191 - const: mclk1
0192 - const: mclk2
0193
0194 reset-gpios:
0195 maxItems: 1
0196
0197 wlf,reset:
0198 description:
0199 GPIO specifier for the GPIO controlling RESET
0200 deprecated: true
0201 $ref: /schemas/types.yaml#/definitions/phandle-array
0202 maxItems: 1
0203
0204 required:
0205 - compatible
0206 - AVDD-supply
0207 - CPVDD-supply
0208 - DBVDD1-supply
0209 - gpio-controller
0210 - '#gpio-cells'
0211 - interrupt-controller
0212 - '#interrupt-cells'
0213 - interrupts
0214
0215 unevaluatedProperties: false
0216
0217 examples:
0218 - |
0219 #include <dt-bindings/mfd/arizona.h>
0220 i2c@e0004000 {
0221 #address-cells = <1>;
0222 #size-cells = <0>;
0223 reg = <0xe0004000 0x1000>;
0224
0225 wm5102: codec@1a {
0226 compatible = "wlf,wm5102";
0227 reg = <0x1a>;
0228
0229 reset-gpios = <&gpio 0>;
0230 wlf,ldoena = <&gpio 1>;
0231
0232 AVDD-supply = <&vdd1v8>;
0233 DBVDD1-supply = <&vdd1v8>;
0234 DBVDD2-supply = <&vdd1v8>;
0235 DBVDD3-supply = <&vdd1v8>;
0236 CPVDD-supply = <&vdd1v8>;
0237 LDOVDD-supply = <&vdd1v8>;
0238 SPKVDDL-supply = <&vdd5v>;
0239 SPKVDDR-supply = <&vdd5v>;
0240
0241 interrupts = <347>;
0242 interrupt-controller;
0243 #interrupt-cells = <2>;
0244 interrupt-parent = <&gic>;
0245
0246 gpio-controller;
0247 #gpio-cells = <2>;
0248
0249 #sound-dai-cells = <1>;
0250
0251 wlf,gpio-defaults = <
0252 ARIZONA_GP_FN_TXLRCLK
0253 ARIZONA_GP_DEFAULT
0254 ARIZONA_GP_DEFAULT
0255 ARIZONA_GP_DEFAULT
0256 ARIZONA_GP_DEFAULT
0257 >;
0258
0259 clocks = <&clks 0>, <&clks 1>;
0260 clock-names = "mclk1", "mclk2";
0261
0262 wlf,inmode = <ARIZONA_INMODE_DIFF ARIZONA_INMODE_DMIC>;
0263 wlf,dmic-ref = <ARIZONA_DMIC_MICBIAS1 ARIZONA_DMIC_MICBIAS3>;
0264
0265 wlf,use-jd2;
0266 wlf,use-jd2-nopull;
0267 wlf,jd-invert;
0268
0269 wlf,micd-software-compare;
0270 wlf,micd-detect-debounce = <0>;
0271 wlf,micd-pol-gpio = <&codec 2 0>;
0272 wlf,micd-rate = <ARIZONA_MICD_TIME_8MS>;
0273 wlf,micd-dbtime = <4>;
0274 wlf,micd-timeout-ms = <100>;
0275 wlf,micd-force-micbias;
0276 wlf,micd-configs = <0 ARIZONA_DMIC_MICBIAS1 0>,
0277 <0x2000 ARIZONA_DMIC_MICBIAS2 1>;
0278
0279 wlf,gpsw = <ARIZONA_GPSW_OPEN>;
0280 };
0281 };