xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,lpass-cpu.yaml (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
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
76be33864SEmmanuel Vadottitle: Qualcomm Technologies Inc. LPASS CPU dai driver bindings
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
116be33864SEmmanuel Vadot  - Rohit kumar <rohitkr@codeaurora.org>
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:
28*d5b0e70fSEmmanuel Vadot    minItems: 1
29c9ccf3a3SEmmanuel Vadot    maxItems: 6
306be33864SEmmanuel Vadot    description: LPAIF core registers
316be33864SEmmanuel Vadot
326be33864SEmmanuel Vadot  reg-names:
33*d5b0e70fSEmmanuel Vadot    minItems: 1
34c9ccf3a3SEmmanuel Vadot    maxItems: 6
356be33864SEmmanuel Vadot
366be33864SEmmanuel Vadot  clocks:
376be33864SEmmanuel Vadot    minItems: 3
38c9ccf3a3SEmmanuel Vadot    maxItems: 7
396be33864SEmmanuel Vadot
406be33864SEmmanuel Vadot  clock-names:
41*d5b0e70fSEmmanuel Vadot    minItems: 1
42*d5b0e70fSEmmanuel Vadot    maxItems: 10
436be33864SEmmanuel Vadot
446be33864SEmmanuel Vadot  interrupts:
45*d5b0e70fSEmmanuel Vadot    minItems: 1
46c9ccf3a3SEmmanuel Vadot    maxItems: 4
476be33864SEmmanuel Vadot    description: LPAIF DMA buffer interrupt
486be33864SEmmanuel Vadot
496be33864SEmmanuel Vadot  interrupt-names:
50*d5b0e70fSEmmanuel 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
65*d5b0e70fSEmmanuel Vadot  power-domain-names:
66*d5b0e70fSEmmanuel Vadot    maxItems: 1
67*d5b0e70fSEmmanuel Vadot
686be33864SEmmanuel Vadot  '#sound-dai-cells':
696be33864SEmmanuel Vadot    const: 1
706be33864SEmmanuel Vadot
716be33864SEmmanuel Vadot  '#address-cells':
726be33864SEmmanuel Vadot    const: 1
736be33864SEmmanuel Vadot
746be33864SEmmanuel Vadot  '#size-cells':
756be33864SEmmanuel Vadot    const: 0
766be33864SEmmanuel Vadot
776be33864SEmmanuel VadotpatternProperties:
786be33864SEmmanuel Vadot  "^dai-link@[0-9a-f]$":
796be33864SEmmanuel Vadot    type: object
806be33864SEmmanuel Vadot    description: |
81c9ccf3a3SEmmanuel Vadot      LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
826be33864SEmmanuel Vadot      depends on the specific driver providing the functionality and
836be33864SEmmanuel Vadot      properties.
846be33864SEmmanuel Vadot    properties:
856be33864SEmmanuel Vadot      reg:
866be33864SEmmanuel Vadot        maxItems: 1
876be33864SEmmanuel Vadot        description: Must be one of the DAI ID
886be33864SEmmanuel Vadot
896be33864SEmmanuel Vadot      qcom,playback-sd-lines:
906be33864SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
916be33864SEmmanuel Vadot        description: list of MI2S data lines for playback
926be33864SEmmanuel Vadot
936be33864SEmmanuel Vadot      qcom,capture-sd-lines:
946be33864SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
956be33864SEmmanuel Vadot        description: list of MI2S data lines for capture
966be33864SEmmanuel Vadot
976be33864SEmmanuel Vadot    required:
986be33864SEmmanuel Vadot      - reg
996be33864SEmmanuel Vadot
1006be33864SEmmanuel Vadot    additionalProperties: false
1016be33864SEmmanuel Vadot
1026be33864SEmmanuel Vadotrequired:
1036be33864SEmmanuel Vadot  - compatible
1046be33864SEmmanuel Vadot  - reg
1056be33864SEmmanuel Vadot  - reg-names
1066be33864SEmmanuel Vadot  - clocks
1076be33864SEmmanuel Vadot  - clock-names
1086be33864SEmmanuel Vadot  - interrupts
1096be33864SEmmanuel Vadot  - interrupt-names
1106be33864SEmmanuel Vadot  - '#sound-dai-cells'
1116be33864SEmmanuel Vadot
1126be33864SEmmanuel VadotadditionalProperties: false
1136be33864SEmmanuel Vadot
1146be33864SEmmanuel VadotallOf:
1156be33864SEmmanuel Vadot  - if:
1166be33864SEmmanuel Vadot      properties:
1176be33864SEmmanuel Vadot        compatible:
1186be33864SEmmanuel Vadot          contains:
1196be33864SEmmanuel Vadot            const: qcom,lpass-cpu
1206be33864SEmmanuel Vadot
1216be33864SEmmanuel Vadot    then:
1226be33864SEmmanuel Vadot      properties:
1236be33864SEmmanuel Vadot        clock-names:
1246be33864SEmmanuel Vadot          items:
1256be33864SEmmanuel Vadot            - const: ahbix-clk
1266be33864SEmmanuel Vadot            - const: mi2s-osr-clk
1276be33864SEmmanuel Vadot            - const: mi2s-bit-clk
1286be33864SEmmanuel Vadot
1296be33864SEmmanuel Vadot  - if:
1306be33864SEmmanuel Vadot      properties:
1316be33864SEmmanuel Vadot        compatible:
1326be33864SEmmanuel Vadot          contains:
1336be33864SEmmanuel Vadot            const: qcom,apq8016-lpass-cpu
1346be33864SEmmanuel Vadot
1356be33864SEmmanuel Vadot    then:
1366be33864SEmmanuel Vadot      properties:
1376be33864SEmmanuel Vadot        clock-names:
1386be33864SEmmanuel Vadot          items:
1396be33864SEmmanuel Vadot            - const: ahbix-clk
1406be33864SEmmanuel Vadot            - const: mi2s-bit-clk0
1416be33864SEmmanuel Vadot            - const: mi2s-bit-clk1
1426be33864SEmmanuel Vadot            - const: mi2s-bit-clk2
1436be33864SEmmanuel Vadot            - const: mi2s-bit-clk3
1446be33864SEmmanuel Vadot            - const: pcnoc-mport-clk
1456be33864SEmmanuel Vadot            - const: pcnoc-sway-clk
1466be33864SEmmanuel Vadot
1476be33864SEmmanuel Vadot  - if:
1486be33864SEmmanuel Vadot      properties:
1496be33864SEmmanuel Vadot        compatible:
1506be33864SEmmanuel Vadot          contains:
1516be33864SEmmanuel Vadot            const: qcom,sc7180-lpass-cpu
1526be33864SEmmanuel Vadot
1536be33864SEmmanuel Vadot    then:
1546be33864SEmmanuel Vadot      properties:
1556be33864SEmmanuel Vadot        clock-names:
1566be33864SEmmanuel Vadot          oneOf:
1576be33864SEmmanuel Vadot            - items:   #for I2S
1586be33864SEmmanuel Vadot                - const: pcnoc-sway-clk
1596be33864SEmmanuel Vadot                - const: audio-core
1606be33864SEmmanuel Vadot                - const: mclk0
1616be33864SEmmanuel Vadot                - const: pcnoc-mport-clk
1626be33864SEmmanuel Vadot                - const: mi2s-bit-clk0
1636be33864SEmmanuel Vadot                - const: mi2s-bit-clk1
1646be33864SEmmanuel Vadot            - items:   #for HDMI
1656be33864SEmmanuel Vadot                - const: pcnoc-sway-clk
1666be33864SEmmanuel Vadot                - const: audio-core
1676be33864SEmmanuel Vadot                - const: pcnoc-mport-clk
1686be33864SEmmanuel Vadot        reg-names:
1696be33864SEmmanuel Vadot          anyOf:
1706be33864SEmmanuel Vadot            - items:   #for I2S
1716be33864SEmmanuel Vadot                - const: lpass-lpaif
1726be33864SEmmanuel Vadot            - items:   #for I2S and HDMI
1736be33864SEmmanuel Vadot                - const: lpass-hdmiif
1746be33864SEmmanuel Vadot                - const: lpass-lpaif
1756be33864SEmmanuel Vadot        interrupt-names:
1766be33864SEmmanuel Vadot          anyOf:
1776be33864SEmmanuel Vadot            - items:   #for I2S
1786be33864SEmmanuel Vadot                - const: lpass-irq-lpaif
1796be33864SEmmanuel Vadot            - items:   #for I2S and HDMI
1806be33864SEmmanuel Vadot                - const: lpass-irq-lpaif
1816be33864SEmmanuel Vadot                - const: lpass-irq-hdmi
1826be33864SEmmanuel Vadot      required:
1836be33864SEmmanuel Vadot        - iommus
1846be33864SEmmanuel Vadot        - power-domains
1856be33864SEmmanuel Vadot
186c9ccf3a3SEmmanuel Vadot  - if:
187c9ccf3a3SEmmanuel Vadot      properties:
188c9ccf3a3SEmmanuel Vadot        compatible:
189c9ccf3a3SEmmanuel Vadot          contains:
190c9ccf3a3SEmmanuel Vadot            const: qcom,sc7280-lpass-cpu
191c9ccf3a3SEmmanuel Vadot
192c9ccf3a3SEmmanuel Vadot    then:
193c9ccf3a3SEmmanuel Vadot      properties:
194c9ccf3a3SEmmanuel Vadot        clock-names:
195c9ccf3a3SEmmanuel Vadot          oneOf:
196c9ccf3a3SEmmanuel Vadot            - items:   #for I2S
197c9ccf3a3SEmmanuel Vadot                - const: aon_cc_audio_hm_h
198*d5b0e70fSEmmanuel Vadot                - const: audio_cc_ext_mclk0
199c9ccf3a3SEmmanuel Vadot                - const: core_cc_sysnoc_mport_core
200*d5b0e70fSEmmanuel Vadot                - const: core_cc_ext_if0_ibit
201c9ccf3a3SEmmanuel Vadot                - const: core_cc_ext_if1_ibit
202c9ccf3a3SEmmanuel Vadot            - items:   #for Soundwire
203c9ccf3a3SEmmanuel Vadot                - const: aon_cc_audio_hm_h
204*d5b0e70fSEmmanuel Vadot                - const: audio_cc_codec_mem
205c9ccf3a3SEmmanuel Vadot                - const: audio_cc_codec_mem0
206c9ccf3a3SEmmanuel Vadot                - const: audio_cc_codec_mem1
207c9ccf3a3SEmmanuel Vadot                - const: audio_cc_codec_mem2
208*d5b0e70fSEmmanuel Vadot                - const: aon_cc_va_mem0
209c9ccf3a3SEmmanuel Vadot            - items:   #for HDMI
210*d5b0e70fSEmmanuel Vadot                - const: core_cc_sysnoc_mport_core
211c9ccf3a3SEmmanuel Vadot
212c9ccf3a3SEmmanuel Vadot        reg-names:
213c9ccf3a3SEmmanuel Vadot          anyOf:
214c9ccf3a3SEmmanuel Vadot            - items:   #for I2S
215c9ccf3a3SEmmanuel Vadot                - const: lpass-lpaif
216c9ccf3a3SEmmanuel Vadot            - items:   #for I2S and HDMI
217c9ccf3a3SEmmanuel Vadot                - const: lpass-hdmiif
218c9ccf3a3SEmmanuel Vadot                - const: lpass-lpaif
219c9ccf3a3SEmmanuel Vadot            - items:   #for I2S, soundwire and HDMI
220c9ccf3a3SEmmanuel Vadot                - const: lpass-hdmiif
221c9ccf3a3SEmmanuel Vadot                - const: lpass-lpaif
222c9ccf3a3SEmmanuel Vadot                - const: lpass-rxtx-cdc-dma-lpm
223c9ccf3a3SEmmanuel Vadot                - const: lpass-rxtx-lpaif
224c9ccf3a3SEmmanuel Vadot                - const: lpass-va-lpaif
225c9ccf3a3SEmmanuel Vadot                - const: lpass-va-cdc-dma-lpm
226c9ccf3a3SEmmanuel Vadot        interrupt-names:
227c9ccf3a3SEmmanuel Vadot          anyOf:
228c9ccf3a3SEmmanuel Vadot            - items:   #for I2S
229c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-lpaif
230c9ccf3a3SEmmanuel Vadot            - items:   #for I2S and HDMI
231c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-lpaif
232c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-hdmi
233c9ccf3a3SEmmanuel Vadot            - items:   #for I2S, soundwire and HDMI
234c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-lpaif
235c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-hdmi
236c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-vaif
237c9ccf3a3SEmmanuel Vadot                - const: lpass-irq-rxtxif
238*d5b0e70fSEmmanuel Vadot        power-domain-names:
239*d5b0e70fSEmmanuel Vadot          allOf:
240*d5b0e70fSEmmanuel Vadot            - items:
241*d5b0e70fSEmmanuel Vadot                - const: lcx
242c9ccf3a3SEmmanuel Vadot
243c9ccf3a3SEmmanuel Vadot      required:
244c9ccf3a3SEmmanuel Vadot        - iommus
245c9ccf3a3SEmmanuel Vadot        - power-domains
246c9ccf3a3SEmmanuel Vadot
2476be33864SEmmanuel Vadotexamples:
2486be33864SEmmanuel Vadot  - |
2496be33864SEmmanuel Vadot    #include <dt-bindings/sound/sc7180-lpass.h>
2506be33864SEmmanuel Vadot
2516be33864SEmmanuel Vadot    soc {
2526be33864SEmmanuel Vadot        #address-cells = <2>;
2536be33864SEmmanuel Vadot        #size-cells = <2>;
2546be33864SEmmanuel Vadot        lpass@62d80000 {
2556be33864SEmmanuel Vadot            compatible = "qcom,sc7180-lpass-cpu";
2566be33864SEmmanuel Vadot
2576be33864SEmmanuel Vadot            reg = <0 0x62d87000 0 0x68000>,
2586be33864SEmmanuel Vadot                  <0 0x62f00000 0 0x29000>;
2596be33864SEmmanuel Vadot            reg-names = "lpass-hdmiif",
2606be33864SEmmanuel Vadot                        "lpass-lpaif";
2616be33864SEmmanuel Vadot            iommus = <&apps_smmu 0x1020 0>,
2626be33864SEmmanuel Vadot                     <&apps_smmu 0x1032 0>;
2636be33864SEmmanuel Vadot            power-domains = <&lpass_hm 0>;
2646be33864SEmmanuel Vadot
2656be33864SEmmanuel Vadot            clocks = <&gcc 131>,
2666be33864SEmmanuel Vadot                 <&lpasscorecc 6>,
2676be33864SEmmanuel Vadot                 <&lpasscorecc 7>,
2686be33864SEmmanuel Vadot                 <&lpasscorecc 10>,
2696be33864SEmmanuel Vadot                 <&lpasscorecc 8>,
2706be33864SEmmanuel Vadot                 <&lpasscorecc 9>;
2716be33864SEmmanuel Vadot
2726be33864SEmmanuel Vadot            clock-names = "pcnoc-sway-clk", "audio-core",
2736be33864SEmmanuel Vadot                          "mclk0", "pcnoc-mport-clk",
2746be33864SEmmanuel Vadot                          "mi2s-bit-clk0", "mi2s-bit-clk1";
2756be33864SEmmanuel Vadot
2766be33864SEmmanuel Vadot            interrupts = <0 160 1>,
2776be33864SEmmanuel Vadot                         <0 268 1>;
2786be33864SEmmanuel Vadot            interrupt-names = "lpass-irq-lpaif",
2796be33864SEmmanuel Vadot                              "lpass-irq-hdmi";
2806be33864SEmmanuel Vadot            #sound-dai-cells = <1>;
2816be33864SEmmanuel Vadot
2826be33864SEmmanuel Vadot            #address-cells = <1>;
2836be33864SEmmanuel Vadot            #size-cells = <0>;
2846be33864SEmmanuel Vadot            /* Optional to set different MI2S SD lines */
2856be33864SEmmanuel Vadot            dai-link@0 {
2866be33864SEmmanuel Vadot                reg = <MI2S_PRIMARY>;
2876be33864SEmmanuel Vadot                qcom,playback-sd-lines = <1>;
2886be33864SEmmanuel Vadot                qcom,capture-sd-lines = <0>;
2896be33864SEmmanuel Vadot            };
2906be33864SEmmanuel Vadot        };
2916be33864SEmmanuel Vadot    };
2926be33864SEmmanuel Vadot
2936be33864SEmmanuel Vadot...
294