xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,lpass-cpu.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,lpass-cpu.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm Technologies Inc. LPASS CPU dai driver
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11*f126890aSEmmanuel Vadot  - Rohit kumar <quic_rohkumar@quicinc.com>
126be33864SEmmanuel Vadot
136be33864SEmmanuel Vadotdescription: |
146be33864SEmmanuel Vadot  Qualcomm Technologies Inc. SOC Low-Power Audio SubSystem (LPASS) that consist
156be33864SEmmanuel Vadot  of MI2S interface for audio data transfer on external codecs. LPASS cpu driver
166be33864SEmmanuel Vadot  is a module to configure Low-Power Audio Interface(LPAIF) core registers
176be33864SEmmanuel Vadot  across different IP versions.
186be33864SEmmanuel Vadot
196be33864SEmmanuel Vadotproperties:
206be33864SEmmanuel Vadot  compatible:
216be33864SEmmanuel Vadot    enum:
226be33864SEmmanuel Vadot      - qcom,lpass-cpu
236be33864SEmmanuel Vadot      - qcom,apq8016-lpass-cpu
246be33864SEmmanuel Vadot      - qcom,sc7180-lpass-cpu
25c9ccf3a3SEmmanuel Vadot      - qcom,sc7280-lpass-cpu
266be33864SEmmanuel Vadot
276be33864SEmmanuel Vadot  reg:
28d5b0e70fSEmmanuel Vadot    minItems: 1
29c9ccf3a3SEmmanuel Vadot    maxItems: 6
306be33864SEmmanuel Vadot    description: LPAIF core registers
316be33864SEmmanuel Vadot
326be33864SEmmanuel Vadot  reg-names:
33d5b0e70fSEmmanuel Vadot    minItems: 1
34c9ccf3a3SEmmanuel Vadot    maxItems: 6
356be33864SEmmanuel Vadot
366be33864SEmmanuel Vadot  clocks:
376be33864SEmmanuel Vadot    minItems: 3
38cb7aa33aSEmmanuel Vadot    maxItems: 10
396be33864SEmmanuel Vadot
406be33864SEmmanuel Vadot  clock-names:
41d5b0e70fSEmmanuel Vadot    minItems: 1
42d5b0e70fSEmmanuel Vadot    maxItems: 10
436be33864SEmmanuel Vadot
446be33864SEmmanuel Vadot  interrupts:
45d5b0e70fSEmmanuel Vadot    minItems: 1
46c9ccf3a3SEmmanuel Vadot    maxItems: 4
476be33864SEmmanuel Vadot    description: LPAIF DMA buffer interrupt
486be33864SEmmanuel Vadot
496be33864SEmmanuel Vadot  interrupt-names:
50d5b0e70fSEmmanuel Vadot    minItems: 1
51c9ccf3a3SEmmanuel Vadot    maxItems: 4
526be33864SEmmanuel Vadot
536be33864SEmmanuel Vadot  qcom,adsp:
546be33864SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
556be33864SEmmanuel Vadot    description: Phandle for the audio DSP node
566be33864SEmmanuel Vadot
576be33864SEmmanuel Vadot  iommus:
58c9ccf3a3SEmmanuel Vadot    minItems: 2
59c9ccf3a3SEmmanuel Vadot    maxItems: 3
606be33864SEmmanuel Vadot    description: Phandle to apps_smmu node with sid mask
616be33864SEmmanuel Vadot
626be33864SEmmanuel Vadot  power-domains:
636be33864SEmmanuel Vadot    maxItems: 1
646be33864SEmmanuel Vadot
65d5b0e70fSEmmanuel Vadot  power-domain-names:
66d5b0e70fSEmmanuel Vadot    maxItems: 1
67d5b0e70fSEmmanuel Vadot
68cb7aa33aSEmmanuel Vadot  required-opps:
69cb7aa33aSEmmanuel Vadot    maxItems: 1
70cb7aa33aSEmmanuel Vadot
716be33864SEmmanuel Vadot  '#sound-dai-cells':
726be33864SEmmanuel Vadot    const: 1
736be33864SEmmanuel Vadot
746be33864SEmmanuel Vadot  '#address-cells':
756be33864SEmmanuel Vadot    const: 1
766be33864SEmmanuel Vadot
776be33864SEmmanuel Vadot  '#size-cells':
786be33864SEmmanuel Vadot    const: 0
796be33864SEmmanuel Vadot
806be33864SEmmanuel VadotpatternProperties:
81cb7aa33aSEmmanuel Vadot  "^dai-link@[0-9a-f]+$":
826be33864SEmmanuel Vadot    type: object
836be33864SEmmanuel Vadot    description: |
84c9ccf3a3SEmmanuel Vadot      LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
856be33864SEmmanuel Vadot      depends on the specific driver providing the functionality and
866be33864SEmmanuel Vadot      properties.
876be33864SEmmanuel Vadot    properties:
886be33864SEmmanuel Vadot      reg:
896be33864SEmmanuel Vadot        maxItems: 1
906be33864SEmmanuel Vadot        description: Must be one of the DAI ID
916be33864SEmmanuel Vadot
926be33864SEmmanuel Vadot      qcom,playback-sd-lines:
936be33864SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
946be33864SEmmanuel Vadot        description: list of MI2S data lines for playback
956be33864SEmmanuel Vadot
966be33864SEmmanuel Vadot      qcom,capture-sd-lines:
976be33864SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
986be33864SEmmanuel Vadot        description: list of MI2S data lines for capture
996be33864SEmmanuel Vadot
1006be33864SEmmanuel Vadot    required:
1016be33864SEmmanuel Vadot      - reg
1026be33864SEmmanuel Vadot
1036be33864SEmmanuel Vadot    additionalProperties: false
1046be33864SEmmanuel Vadot
1056be33864SEmmanuel Vadotrequired:
1066be33864SEmmanuel Vadot  - compatible
1076be33864SEmmanuel Vadot  - reg
1086be33864SEmmanuel Vadot  - reg-names
1096be33864SEmmanuel Vadot  - clocks
1106be33864SEmmanuel Vadot  - clock-names
1116be33864SEmmanuel Vadot  - interrupts
1126be33864SEmmanuel Vadot  - interrupt-names
1136be33864SEmmanuel Vadot  - '#sound-dai-cells'
1146be33864SEmmanuel Vadot
1158bab661aSEmmanuel VadotunevaluatedProperties: false
1166be33864SEmmanuel Vadot
1176be33864SEmmanuel VadotallOf:
1188bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
1196be33864SEmmanuel Vadot  - if:
1206be33864SEmmanuel Vadot      properties:
1216be33864SEmmanuel Vadot        compatible:
1226be33864SEmmanuel Vadot          contains:
1236be33864SEmmanuel Vadot            const: qcom,lpass-cpu
1246be33864SEmmanuel Vadot
1256be33864SEmmanuel Vadot    then:
1266be33864SEmmanuel Vadot      properties:
127cb7aa33aSEmmanuel Vadot        clocks:
128cb7aa33aSEmmanuel Vadot          maxItems: 3
1296be33864SEmmanuel Vadot        clock-names:
1306be33864SEmmanuel Vadot          items:
1316be33864SEmmanuel Vadot            - const: ahbix-clk
1326be33864SEmmanuel Vadot            - const: mi2s-osr-clk
1336be33864SEmmanuel Vadot            - const: mi2s-bit-clk
1346be33864SEmmanuel Vadot
1356be33864SEmmanuel Vadot  - if:
1366be33864SEmmanuel Vadot      properties:
1376be33864SEmmanuel Vadot        compatible:
1386be33864SEmmanuel Vadot          contains:
1396be33864SEmmanuel Vadot            const: qcom,apq8016-lpass-cpu
1406be33864SEmmanuel Vadot
1416be33864SEmmanuel Vadot    then:
1426be33864SEmmanuel Vadot      properties:
143cb7aa33aSEmmanuel Vadot        clocks:
144cb7aa33aSEmmanuel Vadot          minItems: 7
145cb7aa33aSEmmanuel Vadot          maxItems: 7
1466be33864SEmmanuel Vadot        clock-names:
1476be33864SEmmanuel Vadot          items:
1486be33864SEmmanuel Vadot            - const: ahbix-clk
1496be33864SEmmanuel Vadot            - const: mi2s-bit-clk0
1506be33864SEmmanuel Vadot            - const: mi2s-bit-clk1
1516be33864SEmmanuel Vadot            - const: mi2s-bit-clk2
1526be33864SEmmanuel Vadot            - const: mi2s-bit-clk3
1536be33864SEmmanuel Vadot            - const: pcnoc-mport-clk
1546be33864SEmmanuel Vadot            - const: pcnoc-sway-clk
1556be33864SEmmanuel Vadot
1566be33864SEmmanuel Vadot  - if:
1576be33864SEmmanuel Vadot      properties:
1586be33864SEmmanuel Vadot        compatible:
1596be33864SEmmanuel Vadot          contains:
1606be33864SEmmanuel Vadot            const: qcom,sc7180-lpass-cpu
1616be33864SEmmanuel Vadot
1626be33864SEmmanuel Vadot    then:
1636be33864SEmmanuel Vadot      properties:
164cb7aa33aSEmmanuel Vadot        clocks:
165cb7aa33aSEmmanuel Vadot          minItems: 6
166cb7aa33aSEmmanuel Vadot          maxItems: 6
1676be33864SEmmanuel Vadot        clock-names:
168cb7aa33aSEmmanuel Vadot          items:
1696be33864SEmmanuel Vadot            - const: pcnoc-sway-clk
1706be33864SEmmanuel Vadot            - const: audio-core
1716be33864SEmmanuel Vadot            - const: mclk0
1726be33864SEmmanuel Vadot            - const: pcnoc-mport-clk
1736be33864SEmmanuel Vadot            - const: mi2s-bit-clk0
1746be33864SEmmanuel Vadot            - const: mi2s-bit-clk1
175cb7aa33aSEmmanuel Vadot        reg:
176cb7aa33aSEmmanuel Vadot          minItems: 2
177cb7aa33aSEmmanuel Vadot          maxItems: 2
1786be33864SEmmanuel Vadot        reg-names:
179cb7aa33aSEmmanuel Vadot          items:
1806be33864SEmmanuel Vadot            - const: lpass-hdmiif
1816be33864SEmmanuel Vadot            - const: lpass-lpaif
182cb7aa33aSEmmanuel Vadot        interrupts:
183cb7aa33aSEmmanuel Vadot          minItems: 2
184cb7aa33aSEmmanuel Vadot          maxItems: 2
1856be33864SEmmanuel Vadot        interrupt-names:
186cb7aa33aSEmmanuel Vadot          items:
1876be33864SEmmanuel Vadot            - const: lpass-irq-lpaif
1886be33864SEmmanuel Vadot            - const: lpass-irq-hdmi
1896be33864SEmmanuel Vadot      required:
1906be33864SEmmanuel Vadot        - iommus
1916be33864SEmmanuel Vadot        - power-domains
1926be33864SEmmanuel Vadot
193c9ccf3a3SEmmanuel Vadot  - if:
194c9ccf3a3SEmmanuel Vadot      properties:
195c9ccf3a3SEmmanuel Vadot        compatible:
196c9ccf3a3SEmmanuel Vadot          contains:
197c9ccf3a3SEmmanuel Vadot            const: qcom,sc7280-lpass-cpu
198c9ccf3a3SEmmanuel Vadot
199c9ccf3a3SEmmanuel Vadot    then:
200c9ccf3a3SEmmanuel Vadot      properties:
201cb7aa33aSEmmanuel Vadot        clocks:
202cb7aa33aSEmmanuel Vadot          minItems: 10
203cb7aa33aSEmmanuel Vadot          maxItems: 10
204c9ccf3a3SEmmanuel Vadot        clock-names:
205cb7aa33aSEmmanuel Vadot          items:
206c9ccf3a3SEmmanuel Vadot            - const: aon_cc_audio_hm_h
207d5b0e70fSEmmanuel Vadot            - const: audio_cc_ext_mclk0
208c9ccf3a3SEmmanuel Vadot            - const: core_cc_sysnoc_mport_core
209d5b0e70fSEmmanuel Vadot            - const: core_cc_ext_if0_ibit
210c9ccf3a3SEmmanuel Vadot            - const: core_cc_ext_if1_ibit
211d5b0e70fSEmmanuel Vadot            - const: audio_cc_codec_mem
212c9ccf3a3SEmmanuel Vadot            - const: audio_cc_codec_mem0
213c9ccf3a3SEmmanuel Vadot            - const: audio_cc_codec_mem1
214c9ccf3a3SEmmanuel Vadot            - const: audio_cc_codec_mem2
215d5b0e70fSEmmanuel Vadot            - const: aon_cc_va_mem0
216cb7aa33aSEmmanuel Vadot        reg:
217cb7aa33aSEmmanuel Vadot          minItems: 6
218cb7aa33aSEmmanuel Vadot          maxItems: 6
219c9ccf3a3SEmmanuel Vadot        reg-names:
220cb7aa33aSEmmanuel Vadot          items:
221c9ccf3a3SEmmanuel Vadot            - const: lpass-hdmiif
222c9ccf3a3SEmmanuel Vadot            - const: lpass-lpaif
223c9ccf3a3SEmmanuel Vadot            - const: lpass-rxtx-cdc-dma-lpm
224c9ccf3a3SEmmanuel Vadot            - const: lpass-rxtx-lpaif
225c9ccf3a3SEmmanuel Vadot            - const: lpass-va-lpaif
226c9ccf3a3SEmmanuel Vadot            - const: lpass-va-cdc-dma-lpm
227cb7aa33aSEmmanuel Vadot        interrupts:
228cb7aa33aSEmmanuel Vadot          minItems: 4
229cb7aa33aSEmmanuel Vadot          maxItems: 4
230c9ccf3a3SEmmanuel Vadot        interrupt-names:
231cb7aa33aSEmmanuel Vadot          items:
232c9ccf3a3SEmmanuel Vadot            - const: lpass-irq-lpaif
233c9ccf3a3SEmmanuel Vadot            - const: lpass-irq-hdmi
234c9ccf3a3SEmmanuel Vadot            - const: lpass-irq-vaif
235c9ccf3a3SEmmanuel Vadot            - const: lpass-irq-rxtxif
236d5b0e70fSEmmanuel Vadot        power-domain-names:
237cb7aa33aSEmmanuel Vadot          items:
238d5b0e70fSEmmanuel Vadot            - const: lcx
239c9ccf3a3SEmmanuel Vadot
240c9ccf3a3SEmmanuel Vadot      required:
241c9ccf3a3SEmmanuel Vadot        - iommus
242c9ccf3a3SEmmanuel Vadot        - power-domains
243c9ccf3a3SEmmanuel Vadot
2446be33864SEmmanuel Vadotexamples:
2456be33864SEmmanuel Vadot  - |
2466be33864SEmmanuel Vadot    #include <dt-bindings/sound/sc7180-lpass.h>
2476be33864SEmmanuel Vadot
2486be33864SEmmanuel Vadot    soc {
2496be33864SEmmanuel Vadot        #address-cells = <2>;
2506be33864SEmmanuel Vadot        #size-cells = <2>;
2516be33864SEmmanuel Vadot        lpass@62d80000 {
2526be33864SEmmanuel Vadot            compatible = "qcom,sc7180-lpass-cpu";
2536be33864SEmmanuel Vadot
2546be33864SEmmanuel Vadot            reg = <0 0x62d87000 0 0x68000>,
2556be33864SEmmanuel Vadot                  <0 0x62f00000 0 0x29000>;
2566be33864SEmmanuel Vadot            reg-names = "lpass-hdmiif",
2576be33864SEmmanuel Vadot                        "lpass-lpaif";
2586be33864SEmmanuel Vadot            iommus = <&apps_smmu 0x1020 0>,
2596be33864SEmmanuel Vadot                     <&apps_smmu 0x1032 0>;
2606be33864SEmmanuel Vadot            power-domains = <&lpass_hm 0>;
2616be33864SEmmanuel Vadot
2626be33864SEmmanuel Vadot            clocks = <&gcc 131>,
2636be33864SEmmanuel Vadot                 <&lpasscorecc 6>,
2646be33864SEmmanuel Vadot                 <&lpasscorecc 7>,
2656be33864SEmmanuel Vadot                 <&lpasscorecc 10>,
2666be33864SEmmanuel Vadot                 <&lpasscorecc 8>,
2676be33864SEmmanuel Vadot                 <&lpasscorecc 9>;
2686be33864SEmmanuel Vadot
2696be33864SEmmanuel Vadot            clock-names = "pcnoc-sway-clk", "audio-core",
2706be33864SEmmanuel Vadot                          "mclk0", "pcnoc-mport-clk",
2716be33864SEmmanuel Vadot                          "mi2s-bit-clk0", "mi2s-bit-clk1";
2726be33864SEmmanuel Vadot
2736be33864SEmmanuel Vadot            interrupts = <0 160 1>,
2746be33864SEmmanuel Vadot                         <0 268 1>;
2756be33864SEmmanuel Vadot            interrupt-names = "lpass-irq-lpaif",
2766be33864SEmmanuel Vadot                              "lpass-irq-hdmi";
2776be33864SEmmanuel Vadot            #sound-dai-cells = <1>;
2786be33864SEmmanuel Vadot
2796be33864SEmmanuel Vadot            #address-cells = <1>;
2806be33864SEmmanuel Vadot            #size-cells = <0>;
2816be33864SEmmanuel Vadot            /* Optional to set different MI2S SD lines */
2826be33864SEmmanuel Vadot            dai-link@0 {
2836be33864SEmmanuel Vadot                reg = <MI2S_PRIMARY>;
2846be33864SEmmanuel Vadot                qcom,playback-sd-lines = <1>;
2856be33864SEmmanuel Vadot                qcom,capture-sd-lines = <0>;
2866be33864SEmmanuel Vadot            };
2876be33864SEmmanuel Vadot        };
2886be33864SEmmanuel Vadot    };
2896be33864SEmmanuel Vadot
2906be33864SEmmanuel Vadot...
291