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