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