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