1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/qcom,lpass-wsa-macro.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: LPASS(Low Power Audio Subsystem) VA Macro audio codec
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12properties:
13  compatible:
14    enum:
15      - qcom,sc7280-lpass-wsa-macro
16      - qcom,sm8250-lpass-wsa-macro
17      - qcom,sm8450-lpass-wsa-macro
18      - qcom,sm8550-lpass-wsa-macro
19      - qcom,sc8280xp-lpass-wsa-macro
20
21  reg:
22    maxItems: 1
23
24  "#sound-dai-cells":
25    const: 1
26
27  '#clock-cells':
28    const: 0
29
30  clocks:
31    minItems: 4
32    maxItems: 6
33
34  clock-names:
35    minItems: 4
36    maxItems: 6
37
38  clock-output-names:
39    maxItems: 1
40
41  qcom,dmic-sample-rate:
42    description: dmic sample rate
43    $ref: /schemas/types.yaml#/definitions/uint32
44
45  vdd-micb-supply:
46    description: phandle to voltage regulator of MIC Bias
47
48required:
49  - compatible
50  - reg
51  - "#sound-dai-cells"
52
53allOf:
54  - $ref: dai-common.yaml#
55
56  - if:
57      properties:
58        compatible:
59          enum:
60            - qcom,sc7280-lpass-wsa-macro
61            - qcom,sm8450-lpass-wsa-macro
62            - qcom,sc8280xp-lpass-wsa-macro
63    then:
64      properties:
65        clocks:
66          minItems: 5
67          maxItems: 5
68        clock-names:
69          items:
70            - const: mclk
71            - const: npl
72            - const: macro
73            - const: dcodec
74            - const: fsgen
75
76  - if:
77      properties:
78        compatible:
79          enum:
80            - qcom,sm8250-lpass-wsa-macro
81    then:
82      properties:
83        clocks:
84          minItems: 6
85        clock-names:
86          items:
87            - const: mclk
88            - const: npl
89            - const: macro
90            - const: dcodec
91            - const: va
92            - const: fsgen
93
94  - if:
95      properties:
96        compatible:
97          enum:
98            - qcom,sm8550-lpass-wsa-macro
99    then:
100      properties:
101        clocks:
102          minItems: 4
103          maxItems: 4
104        clock-names:
105          items:
106            - const: mclk
107            - const: macro
108            - const: dcodec
109            - const: fsgen
110
111unevaluatedProperties: false
112
113examples:
114  - |
115    #include <dt-bindings/clock/qcom,sm8250-lpass-aoncc.h>
116    #include <dt-bindings/sound/qcom,q6afe.h>
117    codec@3240000 {
118      compatible = "qcom,sm8250-lpass-wsa-macro";
119      reg = <0x3240000 0x1000>;
120      #sound-dai-cells = <1>;
121      #clock-cells = <0>;
122      clocks = <&audiocc 1>,
123               <&audiocc 0>,
124               <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
125               <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
126               <&aoncc LPASS_CDC_VA_MCLK>,
127               <&vamacro>;
128      clock-names = "mclk", "npl", "macro", "dcodec", "va", "fsgen";
129      clock-output-names = "mclk";
130    };
131