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,sc8280xp-lpass-wsa-macro
19
20  reg:
21    maxItems: 1
22
23  "#sound-dai-cells":
24    const: 1
25
26  '#clock-cells':
27    const: 0
28
29  clocks:
30    minItems: 5
31    maxItems: 6
32
33  clock-names:
34    minItems: 5
35    maxItems: 6
36
37  clock-output-names:
38    maxItems: 1
39
40  qcom,dmic-sample-rate:
41    description: dmic sample rate
42    $ref: /schemas/types.yaml#/definitions/uint32
43
44  vdd-micb-supply:
45    description: phandle to voltage regulator of MIC Bias
46
47required:
48  - compatible
49  - reg
50  - "#sound-dai-cells"
51
52allOf:
53  - $ref: dai-common.yaml#
54
55  - if:
56      properties:
57        compatible:
58          enum:
59            - qcom,sc7280-lpass-wsa-macro
60            - qcom,sm8450-lpass-wsa-macro
61            - qcom,sc8280xp-lpass-wsa-macro
62    then:
63      properties:
64        clocks:
65          maxItems: 5
66        clock-names:
67          items:
68            - const: mclk
69            - const: npl
70            - const: macro
71            - const: dcodec
72            - const: fsgen
73
74  - if:
75      properties:
76        compatible:
77          enum:
78            - qcom,sm8250-lpass-wsa-macro
79    then:
80      properties:
81        clocks:
82          minItems: 6
83        clock-names:
84          items:
85            - const: mclk
86            - const: npl
87            - const: macro
88            - const: dcodec
89            - const: va
90            - const: fsgen
91
92unevaluatedProperties: false
93
94examples:
95  - |
96    #include <dt-bindings/clock/qcom,sm8250-lpass-aoncc.h>
97    #include <dt-bindings/sound/qcom,q6afe.h>
98    codec@3240000 {
99      compatible = "qcom,sm8250-lpass-wsa-macro";
100      reg = <0x3240000 0x1000>;
101      #sound-dai-cells = <1>;
102      #clock-cells = <0>;
103      clocks = <&audiocc 1>,
104               <&audiocc 0>,
105               <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
106               <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
107               <&aoncc LPASS_CDC_VA_MCLK>,
108               <&vamacro>;
109      clock-names = "mclk", "npl", "macro", "dcodec", "va", "fsgen";
110      clock-output-names = "mclk";
111    };
112