xref: /linux/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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-tx-macro.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: LPASS(Low Power Audio Subsystem) TX Macro audio codec
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12properties:
13  compatible:
14    oneOf:
15      - enum:
16          - qcom,sc7280-lpass-tx-macro
17          - qcom,sm6115-lpass-tx-macro
18          - qcom,sm8250-lpass-tx-macro
19          - qcom,sm8450-lpass-tx-macro
20          - qcom,sm8550-lpass-tx-macro
21          - qcom,sc8280xp-lpass-tx-macro
22      - items:
23          - enum:
24              - qcom,sm8650-lpass-tx-macro
25              - qcom,sm8750-lpass-tx-macro
26              - qcom,x1e80100-lpass-tx-macro
27          - const: qcom,sm8550-lpass-tx-macro
28
29  reg:
30    maxItems: 1
31
32  "#sound-dai-cells":
33    const: 1
34
35  '#clock-cells':
36    const: 0
37
38  clocks:
39    minItems: 3
40    maxItems: 5
41
42  clock-names:
43    minItems: 3
44    maxItems: 5
45
46  clock-output-names:
47    maxItems: 1
48
49  power-domains:
50    maxItems: 2
51
52  power-domain-names:
53    items:
54      - const: macro
55      - const: dcodec
56
57  qcom,dmic-sample-rate:
58    description: dmic sample rate
59    $ref: /schemas/types.yaml#/definitions/uint32
60
61required:
62  - compatible
63  - reg
64  - "#sound-dai-cells"
65
66allOf:
67  - $ref: dai-common.yaml#
68  - if:
69      properties:
70        compatible:
71          enum:
72            - qcom,sc7280-lpass-tx-macro
73    then:
74      properties:
75        clock-names:
76          oneOf:
77            - items:   # for ADSP based platforms
78                - const: mclk
79                - const: npl
80                - const: macro
81                - const: dcodec
82                - const: fsgen
83            - items:   # for ADSP bypass based platforms
84                - const: mclk
85                - const: npl
86                - const: fsgen
87
88  - if:
89      properties:
90        compatible:
91          enum:
92            - qcom,sc8280xp-lpass-tx-macro
93            - qcom,sm8250-lpass-tx-macro
94            - qcom,sm8450-lpass-tx-macro
95    then:
96      properties:
97        clocks:
98          minItems: 5
99          maxItems: 5
100        clock-names:
101          items:
102            - const: mclk
103            - const: npl
104            - const: macro
105            - const: dcodec
106            - const: fsgen
107
108  - if:
109      properties:
110        compatible:
111          enum:
112            - qcom,sm6115-lpass-tx-macro
113    then:
114      properties:
115        clocks:
116          minItems: 4
117          maxItems: 4
118        clock-names:
119          items:
120            - const: mclk
121            - const: npl
122            - const: dcodec
123            - const: fsgen
124
125  - if:
126      properties:
127        compatible:
128          contains:
129            enum:
130              - qcom,sm8550-lpass-tx-macro
131    then:
132      properties:
133        clocks:
134          minItems: 4
135          maxItems: 4
136        clock-names:
137          items:
138            - const: mclk
139            - const: macro
140            - const: dcodec
141            - const: fsgen
142
143unevaluatedProperties: false
144
145examples:
146  - |
147    #include <dt-bindings/sound/qcom,q6afe.h>
148    codec@3220000 {
149      compatible = "qcom,sm8250-lpass-tx-macro";
150      reg = <0x3220000 0x1000>;
151      #sound-dai-cells = <1>;
152      #clock-cells = <0>;
153      clocks = <&aoncc 0>,
154               <&aoncc 1>,
155               <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
156               <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
157               <&vamacro>;
158      clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
159      clock-output-names = "mclk";
160      qcom,dmic-sample-rate = <600000>;
161    };
162