Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/cirrus,madera.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Cirrus Logic Madera class audio CODECs Multi-Functional Device
0008 
0009 maintainers:
0010   - patches@opensource.cirrus.com
0011 
0012 description: |
0013   These devices are audio SoCs with extensive digital capabilities and a range
0014   of analogue I/O.
0015 
0016   See also the child driver bindings in:
0017 
0018     bindings/pinctrl/cirrus,madera.yaml
0019     bindings/regulator/wlf,arizona.yaml
0020     bindings/sound/cirrus,madera.yaml
0021 
0022 allOf:
0023   - $ref: /schemas/pinctrl/cirrus,madera.yaml#
0024   - $ref: /schemas/regulator/wlf,arizona.yaml#
0025   - $ref: /schemas/sound/cirrus,madera.yaml#
0026   - if:
0027       properties:
0028         compatible:
0029           contains:
0030             enum:
0031               - cirrus,cs47l85
0032               - wlf,wm1840
0033     then:
0034       properties:
0035         SPKVDDL-supply:
0036           description:
0037             Left speaker driver power supply.
0038 
0039         SPKVDDR-supply:
0040           description:
0041             Right speaker driver power supply.
0042 
0043       required:
0044         - SPKVDDL-supply
0045         - SPKVDDR-supply
0046     else:
0047       required:
0048         - DCVDD-supply
0049   - if:
0050       properties:
0051         compatible:
0052           contains:
0053             enum:
0054               - cirrus,cs47l15
0055               - cirrus,cs47l35
0056     then:
0057       properties:
0058         SPKVDD-supply:
0059           description:
0060             Mono speaker driver power supply.
0061 
0062       required:
0063         - SPKVDD-supply
0064   - if:
0065       properties:
0066         compatible:
0067           contains:
0068             enum:
0069               - cirrus,cs47l35
0070               - cirrus,cs47l85
0071               - cirrus,cs47l90
0072               - cirrus,cs47l91
0073               - wlf,wm1840
0074     then:
0075       properties:
0076         DBVDD2-supply:
0077           description:
0078             Databus power supply.
0079 
0080       required:
0081         - DBVDD2-supply
0082   - if:
0083       properties:
0084         compatible:
0085           contains:
0086             enum:
0087               - cirrus,cs47l85
0088               - cirrus,cs47l90
0089               - cirrus,cs47l91
0090               - wlf,wm1840
0091     then:
0092       properties:
0093         DBVDD3-supply:
0094           description:
0095             Databus power supply.
0096 
0097         DBVDD4-supply:
0098           description:
0099             Databus power supply.
0100   - if:
0101       properties:
0102         compatible:
0103           contains:
0104             enum:
0105               - cirrus,cs47l15
0106     then:
0107       required:
0108         - MICVDD-supply
0109     else:
0110       properties:
0111         CPVDD2-supply:
0112           description:
0113             Secondary charge pump power supply.
0114 
0115       required:
0116         - CPVDD2-supply
0117 
0118 properties:
0119   compatible:
0120     enum:
0121       - cirrus,cs47l15
0122       - cirrus,cs47l35
0123       - cirrus,cs47l85
0124       - cirrus,cs47l90
0125       - cirrus,cs47l91
0126       - cirrus,cs42l92
0127       - cirrus,cs47l92
0128       - cirrus,cs47l93
0129       - cirrus,wm1840
0130 
0131   reg:
0132     maxItems: 1
0133 
0134   gpio-controller: true
0135 
0136   '#gpio-cells':
0137     description:
0138       The first cell is the pin number. The second cell is reserved for
0139       future use and must be zero
0140     const: 2
0141 
0142   interrupt-controller: true
0143 
0144   '#interrupt-cells':
0145     description:
0146       The first cell is the IRQ number.
0147       The second cell is the flags, encoded as the trigger masks from
0148       bindings/interrupt-controller/interrupts.txt
0149     const: 2
0150 
0151   interrupts:
0152     maxItems: 1
0153 
0154   reset-gpios:
0155     description:
0156       One entry specifying the GPIO controlling /RESET.  As defined in
0157       bindings/gpio.txt.  Although optional, it is strongly recommended
0158       to use a hardware reset.
0159     maxItems: 1
0160 
0161   clocks:
0162     description:
0163       Should reference the clocks supplied on MCLK1, MCLK2 and MCLK3.
0164     minItems: 1
0165     maxItems: 3
0166 
0167   clock-names:
0168     description: |
0169       May contain up to three strings:
0170         "mclk1" For the clock supplied on MCLK1, recommended to be a
0171                 high quality audio reference clock.
0172         "mclk2" For the clock supplied on MCLK2, required to be an
0173                 always on 32k clock.
0174         "mclk3" For the clock supplied on MCLK3.
0175     oneOf:
0176       - items:
0177           - const: mclk1
0178       - items:
0179           - const: mclk2
0180       - items:
0181           - const: mclk3
0182       - items:
0183           - const: mclk1
0184           - const: mclk2
0185       - items:
0186           - const: mclk1
0187           - const: mclk3
0188       - items:
0189           - const: mclk2
0190           - const: mclk3
0191       - items:
0192           - const: mclk1
0193           - const: mclk2
0194           - const: mclk3
0195 
0196   AVDD-supply:
0197     description:
0198       Analogue power supply.
0199 
0200   DBVDD1-supply:
0201     description:
0202       Databus power supply.
0203 
0204   CPVDD1-supply:
0205     description:
0206       Charge pump power supply.
0207 
0208   DCVDD-supply:
0209     description:
0210       Digital power supply, optional on CS47L85, WM1840 where it can
0211       be supplied internally.
0212 
0213   MICVDD-supply:
0214     description:
0215       Microphone power supply, normally supplied internally except on
0216       cs47l24, wm1831 where it is mandatory.
0217 
0218 required:
0219   - compatible
0220   - gpio-controller
0221   - '#gpio-cells'
0222   - interrupt-controller
0223   - '#interrupt-cells'
0224   - interrupts
0225   - AVDD-supply
0226   - DBVDD1-supply
0227   - CPVDD1-supply
0228 
0229 unevaluatedProperties: false
0230 
0231 examples:
0232   - |
0233     #include <dt-bindings/sound/madera.h>
0234     i2c@e0004000 {
0235         #address-cells = <1>;
0236         #size-cells = <0>;
0237         reg = <0xe0004000 0x1000>;
0238 
0239         cs47l85: codec@1a {
0240             compatible = "cirrus,cs47l85";
0241             reg = <0x1a>;
0242 
0243             reset-gpios = <&gpio 0>;
0244             wlf,ldoena = <&gpio 1>;
0245 
0246             interrupt-controller;
0247             #interrupt-cells = <2>;
0248             interrupts = <4 1 0>;
0249 
0250             gpio-controller;
0251             #gpio-cells = <2>;
0252 
0253             AVDD-supply = <&vdd1v8>;
0254             DBVDD1-supply = <&vdd1v8>;
0255             DBVDD2-supply = <&vdd1v8>;
0256             DBVDD3-supply = <&vdd1v8>;
0257             DBVDD4-supply = <&vdd1v8>;
0258             CPVDD1-supply = <&vdd1v8>;
0259             CPVDD2-supply = <&vdd1v2>;
0260             SPKVDDL-supply = <&vdd5v>;
0261             SPKVDDR-supply = <&vdd5v>;
0262 
0263             clocks = <&clks 0>, <&clks 1>, <&clks 2>;
0264             clock-names = "mclk1", "mclk2", "mclk3";
0265 
0266             cirrus,dmic-ref = <0 0 MADERA_DMIC_REF_MICBIAS1>;
0267             cirrus,inmode = <
0268                 MADERA_INMODE_SE   MADERA_INMODE_SE
0269                 MADERA_INMODE_SE   MADERA_INMODE_SE
0270                 MADERA_INMODE_DIFF MADERA_INMODE_DIFF
0271             >;
0272             cirrus,max-channels-clocked = <2 0 0>;
0273 
0274             pinctrl-names = "default";
0275             pinctrl-0 = <&pinsettings>;
0276 
0277             pinsettings: pin-settings {
0278                 aif1-pins {
0279                     groups = "aif1";
0280                     function = "aif1";
0281                     bias-bus-hold;
0282                 };
0283 
0284                 aif2-pins {
0285                     groups = "aif2";
0286                     function = "aif2";
0287                     bias-bus-hold;
0288                 };
0289 
0290                 aif3-pins {
0291                     groups = "aif3";
0292                     function = "aif3";
0293                     bias-bus-hold;
0294                 };
0295             };
0296         };
0297     };