xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: LPASS(Low Power Audio Subsystem) VA Macro audio codec
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotproperties:
135def4c47SEmmanuel Vadot  compatible:
148cc087a1SEmmanuel Vadot    enum:
158cc087a1SEmmanuel Vadot      - qcom,sc7280-lpass-va-macro
168cc087a1SEmmanuel Vadot      - qcom,sm8250-lpass-va-macro
177ef62cebSEmmanuel Vadot      - qcom,sm8450-lpass-va-macro
18*fac71e4eSEmmanuel Vadot      - qcom,sm8550-lpass-va-macro
197ef62cebSEmmanuel Vadot      - qcom,sc8280xp-lpass-va-macro
205def4c47SEmmanuel Vadot
215def4c47SEmmanuel Vadot  reg:
225def4c47SEmmanuel Vadot    maxItems: 1
235def4c47SEmmanuel Vadot
245def4c47SEmmanuel Vadot  "#sound-dai-cells":
255def4c47SEmmanuel Vadot    const: 1
265def4c47SEmmanuel Vadot
275def4c47SEmmanuel Vadot  '#clock-cells':
285def4c47SEmmanuel Vadot    const: 0
295def4c47SEmmanuel Vadot
305def4c47SEmmanuel Vadot  clocks:
31*fac71e4eSEmmanuel Vadot    minItems: 1
32*fac71e4eSEmmanuel Vadot    maxItems: 4
335def4c47SEmmanuel Vadot
345def4c47SEmmanuel Vadot  clock-names:
35*fac71e4eSEmmanuel Vadot    minItems: 1
36*fac71e4eSEmmanuel Vadot    maxItems: 4
375def4c47SEmmanuel Vadot
385def4c47SEmmanuel Vadot  clock-output-names:
398bab661aSEmmanuel Vadot    maxItems: 1
405def4c47SEmmanuel Vadot
41c9ccf3a3SEmmanuel Vadot  power-domains:
42c9ccf3a3SEmmanuel Vadot    maxItems: 2
43c9ccf3a3SEmmanuel Vadot
44c9ccf3a3SEmmanuel Vadot  power-domain-names:
45c9ccf3a3SEmmanuel Vadot    items:
46c9ccf3a3SEmmanuel Vadot      - const: macro
47c9ccf3a3SEmmanuel Vadot      - const: dcodec
48c9ccf3a3SEmmanuel Vadot
495def4c47SEmmanuel Vadot  qcom,dmic-sample-rate:
505def4c47SEmmanuel Vadot    description: dmic sample rate
515def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
525def4c47SEmmanuel Vadot
535def4c47SEmmanuel Vadot  vdd-micb-supply:
545def4c47SEmmanuel Vadot    description: phandle to voltage regulator of MIC Bias
555def4c47SEmmanuel Vadot
565def4c47SEmmanuel Vadotrequired:
575def4c47SEmmanuel Vadot  - compatible
585def4c47SEmmanuel Vadot  - reg
595def4c47SEmmanuel Vadot  - "#sound-dai-cells"
60*fac71e4eSEmmanuel Vadot  - clock-names
61*fac71e4eSEmmanuel Vadot  - clocks
62*fac71e4eSEmmanuel Vadot
63*fac71e4eSEmmanuel VadotallOf:
64*fac71e4eSEmmanuel Vadot  - $ref: dai-common.yaml#
65*fac71e4eSEmmanuel Vadot
66*fac71e4eSEmmanuel Vadot  - if:
67*fac71e4eSEmmanuel Vadot      properties:
68*fac71e4eSEmmanuel Vadot        compatible:
69*fac71e4eSEmmanuel Vadot          contains:
70*fac71e4eSEmmanuel Vadot            const: qcom,sc7280-lpass-va-macro
71*fac71e4eSEmmanuel Vadot    then:
72*fac71e4eSEmmanuel Vadot      properties:
73*fac71e4eSEmmanuel Vadot        clocks:
74*fac71e4eSEmmanuel Vadot          maxItems: 1
75*fac71e4eSEmmanuel Vadot        clock-names:
76*fac71e4eSEmmanuel Vadot          items:
77*fac71e4eSEmmanuel Vadot            - const: mclk
78*fac71e4eSEmmanuel Vadot
79*fac71e4eSEmmanuel Vadot  - if:
80*fac71e4eSEmmanuel Vadot      properties:
81*fac71e4eSEmmanuel Vadot        compatible:
82*fac71e4eSEmmanuel Vadot          contains:
83*fac71e4eSEmmanuel Vadot            const: qcom,sm8250-lpass-va-macro
84*fac71e4eSEmmanuel Vadot    then:
85*fac71e4eSEmmanuel Vadot      properties:
86*fac71e4eSEmmanuel Vadot        clocks:
87*fac71e4eSEmmanuel Vadot          minItems: 3
88*fac71e4eSEmmanuel Vadot          maxItems: 3
89*fac71e4eSEmmanuel Vadot        clock-names:
90*fac71e4eSEmmanuel Vadot          items:
91*fac71e4eSEmmanuel Vadot            - const: mclk
92*fac71e4eSEmmanuel Vadot            - const: macro
93*fac71e4eSEmmanuel Vadot            - const: dcodec
94*fac71e4eSEmmanuel Vadot
95*fac71e4eSEmmanuel Vadot  - if:
96*fac71e4eSEmmanuel Vadot      properties:
97*fac71e4eSEmmanuel Vadot        compatible:
98*fac71e4eSEmmanuel Vadot          contains:
99*fac71e4eSEmmanuel Vadot            enum:
100*fac71e4eSEmmanuel Vadot              - qcom,sc8280xp-lpass-va-macro
101*fac71e4eSEmmanuel Vadot              - qcom,sm8450-lpass-va-macro
102*fac71e4eSEmmanuel Vadot    then:
103*fac71e4eSEmmanuel Vadot      properties:
104*fac71e4eSEmmanuel Vadot        clocks:
105*fac71e4eSEmmanuel Vadot          minItems: 4
106*fac71e4eSEmmanuel Vadot          maxItems: 4
107*fac71e4eSEmmanuel Vadot        clock-names:
108*fac71e4eSEmmanuel Vadot          items:
109*fac71e4eSEmmanuel Vadot            - const: mclk
110*fac71e4eSEmmanuel Vadot            - const: macro
111*fac71e4eSEmmanuel Vadot            - const: dcodec
112*fac71e4eSEmmanuel Vadot            - const: npl
113*fac71e4eSEmmanuel Vadot
114*fac71e4eSEmmanuel Vadot  - if:
115*fac71e4eSEmmanuel Vadot      properties:
116*fac71e4eSEmmanuel Vadot        compatible:
117*fac71e4eSEmmanuel Vadot          contains:
118*fac71e4eSEmmanuel Vadot            enum:
119*fac71e4eSEmmanuel Vadot              - qcom,sm8550-lpass-va-macro
120*fac71e4eSEmmanuel Vadot    then:
121*fac71e4eSEmmanuel Vadot      properties:
122*fac71e4eSEmmanuel Vadot        clocks:
123*fac71e4eSEmmanuel Vadot          minItems: 3
124*fac71e4eSEmmanuel Vadot          maxItems: 3
125*fac71e4eSEmmanuel Vadot        clock-names:
126*fac71e4eSEmmanuel Vadot          items:
127*fac71e4eSEmmanuel Vadot            - const: mclk
128*fac71e4eSEmmanuel Vadot            - const: macro
129*fac71e4eSEmmanuel Vadot            - const: dcodec
1305def4c47SEmmanuel Vadot
1318bab661aSEmmanuel VadotunevaluatedProperties: false
1325def4c47SEmmanuel Vadot
1335def4c47SEmmanuel Vadotexamples:
1345def4c47SEmmanuel Vadot  - |
1355def4c47SEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6afe.h>
1365def4c47SEmmanuel Vadot    codec@3370000 {
1375def4c47SEmmanuel Vadot      compatible = "qcom,sm8250-lpass-va-macro";
1385def4c47SEmmanuel Vadot      reg = <0x3370000 0x1000>;
1395def4c47SEmmanuel Vadot      #sound-dai-cells = <1>;
1405def4c47SEmmanuel Vadot      #clock-cells = <0>;
1415def4c47SEmmanuel Vadot      clocks = <&aoncc 0>,
1425def4c47SEmmanuel Vadot               <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
1435def4c47SEmmanuel Vadot               <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
144cb7aa33aSEmmanuel Vadot      clock-names = "mclk", "macro", "dcodec";
1455def4c47SEmmanuel Vadot      clock-output-names = "fsgen";
1465def4c47SEmmanuel Vadot      qcom,dmic-sample-rate = <600000>;
1475def4c47SEmmanuel Vadot      vdd-micb-supply = <&vreg_s4a_1p8>;
1485def4c47SEmmanuel Vadot    };
149