xref: /freebsd/sys/contrib/device-tree/Bindings/soc/qcom/qcom,apr.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm APR/GPR (Asynchronous/Generic Packet Router)
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
108cc087a1SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotdescription: |
138cc087a1SEmmanuel Vadot  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
148cc087a1SEmmanuel Vadot  communication between Application processor and QDSP. APR/GPR is mainly
158cc087a1SEmmanuel Vadot  used for audio/voice services on the QDSP.
168cc087a1SEmmanuel Vadot
178cc087a1SEmmanuel Vadotproperties:
188cc087a1SEmmanuel Vadot  compatible:
198cc087a1SEmmanuel Vadot    enum:
208bab661aSEmmanuel Vadot      - qcom,apr
218cc087a1SEmmanuel Vadot      - qcom,apr-v2
228cc087a1SEmmanuel Vadot      - qcom,gpr
238cc087a1SEmmanuel Vadot
247ef62cebSEmmanuel Vadot  power-domains:
257ef62cebSEmmanuel Vadot    maxItems: 1
267ef62cebSEmmanuel Vadot
278cc087a1SEmmanuel Vadot  qcom,apr-domain:
288cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
298cc087a1SEmmanuel Vadot    enum: [1, 2, 3, 4, 5, 6, 7]
308cc087a1SEmmanuel Vadot    description:
318cc087a1SEmmanuel Vadot      Selects the processor domain for apr
328cc087a1SEmmanuel Vadot        1 = APR simulator
338cc087a1SEmmanuel Vadot        2 = PC Domain
348cc087a1SEmmanuel Vadot        3 = Modem Domain
358cc087a1SEmmanuel Vadot        4 = ADSP Domain
368cc087a1SEmmanuel Vadot        5 = Application processor Domain
378cc087a1SEmmanuel Vadot        6 = Modem2 Domain
388cc087a1SEmmanuel Vadot        7 = Application Processor2 Domain
398cc087a1SEmmanuel Vadot    deprecated: true
408cc087a1SEmmanuel Vadot
418cc087a1SEmmanuel Vadot  qcom,domain:
428cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
438cc087a1SEmmanuel Vadot    minimum: 1
448cc087a1SEmmanuel Vadot    maximum: 7
458cc087a1SEmmanuel Vadot    description:
468cc087a1SEmmanuel Vadot      Selects the processor domain for apr
478cc087a1SEmmanuel Vadot        1 = APR simulator
488cc087a1SEmmanuel Vadot        2 = PC Domain
498cc087a1SEmmanuel Vadot        3 = Modem Domain
508cc087a1SEmmanuel Vadot        4 = ADSP Domain
518cc087a1SEmmanuel Vadot        5 = Application processor Domain
528cc087a1SEmmanuel Vadot        6 = Modem2 Domain
538cc087a1SEmmanuel Vadot        7 = Application Processor2 Domain
548cc087a1SEmmanuel Vadot      Selects the processor domain for gpr
558cc087a1SEmmanuel Vadot        1 = Modem Domain
568cc087a1SEmmanuel Vadot        2 = Audio DSP Domain
578cc087a1SEmmanuel Vadot        3 = Application Processor Domain
588cc087a1SEmmanuel Vadot
597ef62cebSEmmanuel Vadot  qcom,glink-channels:
607ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string-array
617ef62cebSEmmanuel Vadot    description: Channel name used for the communication
628bab661aSEmmanuel Vadot    maxItems: 1
637ef62cebSEmmanuel Vadot
647ef62cebSEmmanuel Vadot  qcom,intents:
65*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-matrix
66*fac71e4eSEmmanuel Vadot    minItems: 1
67*fac71e4eSEmmanuel Vadot    maxItems: 32
68*fac71e4eSEmmanuel Vadot    items:
69*fac71e4eSEmmanuel Vadot      items:
70*fac71e4eSEmmanuel Vadot        - description: size of each intent to preallocate
71*fac71e4eSEmmanuel Vadot        - description: amount of intents to preallocate
72*fac71e4eSEmmanuel Vadot          minimum: 1
737ef62cebSEmmanuel Vadot    description:
747ef62cebSEmmanuel Vadot      List of (size, amount) pairs describing what intents should be
757ef62cebSEmmanuel Vadot      preallocated for this virtual channel. This can be used to tweak the
767ef62cebSEmmanuel Vadot      default intents available for the channel to meet expectations of the
777ef62cebSEmmanuel Vadot      remote.
787ef62cebSEmmanuel Vadot
797ef62cebSEmmanuel Vadot  qcom,smd-channels:
807ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string-array
817ef62cebSEmmanuel Vadot    description: Channel name used for the communication
827ef62cebSEmmanuel Vadot    items:
837ef62cebSEmmanuel Vadot      - const: apr_audio_svc
847ef62cebSEmmanuel Vadot
858cc087a1SEmmanuel Vadot  '#address-cells':
868cc087a1SEmmanuel Vadot    const: 1
878cc087a1SEmmanuel Vadot
888cc087a1SEmmanuel Vadot  '#size-cells':
898cc087a1SEmmanuel Vadot    const: 0
908cc087a1SEmmanuel Vadot
918cc087a1SEmmanuel VadotpatternProperties:
928cc087a1SEmmanuel Vadot  "^service@[1-9a-d]$":
938cc087a1SEmmanuel Vadot    type: object
948bab661aSEmmanuel Vadot    $ref: /schemas/soc/qcom/qcom,apr-services.yaml
958bab661aSEmmanuel Vadot    additionalProperties: true
968cc087a1SEmmanuel Vadot    description:
978bab661aSEmmanuel Vadot      APR/GPR static port services.
988cc087a1SEmmanuel Vadot
998cc087a1SEmmanuel Vadot    properties:
1008cc087a1SEmmanuel Vadot      compatible:
1018cc087a1SEmmanuel Vadot        enum:
1028cc087a1SEmmanuel Vadot          - qcom,q6core
1038cc087a1SEmmanuel Vadot          - qcom,q6asm
1048cc087a1SEmmanuel Vadot          - qcom,q6afe
1058cc087a1SEmmanuel Vadot          - qcom,q6adm
1068cc087a1SEmmanuel Vadot          - qcom,q6apm
1078cc087a1SEmmanuel Vadot          - qcom,q6prm
1088cc087a1SEmmanuel Vadot
1098cc087a1SEmmanuel Vadotrequired:
1108cc087a1SEmmanuel Vadot  - compatible
1118cc087a1SEmmanuel Vadot  - qcom,domain
1128cc087a1SEmmanuel Vadot
1137ef62cebSEmmanuel VadotallOf:
1147ef62cebSEmmanuel Vadot  - if:
1157ef62cebSEmmanuel Vadot      properties:
1167ef62cebSEmmanuel Vadot        compatible:
1177ef62cebSEmmanuel Vadot          enum:
1187ef62cebSEmmanuel Vadot            - qcom,gpr
1197ef62cebSEmmanuel Vadot    then:
1207ef62cebSEmmanuel Vadot      properties:
1218bab661aSEmmanuel Vadot        qcom,glink-channels:
1228bab661aSEmmanuel Vadot          items:
1238bab661aSEmmanuel Vadot            - const: adsp_apps
1247ef62cebSEmmanuel Vadot        power-domains: false
1258bab661aSEmmanuel Vadot    else:
1268bab661aSEmmanuel Vadot      properties:
1278bab661aSEmmanuel Vadot        qcom,glink-channels:
1288bab661aSEmmanuel Vadot          items:
1298bab661aSEmmanuel Vadot            - const: apr_audio_svc
1307ef62cebSEmmanuel Vadot
1317ef62cebSEmmanuel Vadot  - if:
1327ef62cebSEmmanuel Vadot      required:
1337ef62cebSEmmanuel Vadot        - qcom,glink-channels
1347ef62cebSEmmanuel Vadot    then:
1357ef62cebSEmmanuel Vadot      properties:
1367ef62cebSEmmanuel Vadot        qcom,smd-channels: false
1377ef62cebSEmmanuel Vadot
1387ef62cebSEmmanuel Vadot  - if:
1397ef62cebSEmmanuel Vadot      required:
1407ef62cebSEmmanuel Vadot        - qcom,smd-channels
1417ef62cebSEmmanuel Vadot    then:
1427ef62cebSEmmanuel Vadot      properties:
1437ef62cebSEmmanuel Vadot        qcom,glink-channels: false
1447ef62cebSEmmanuel Vadot
1458cc087a1SEmmanuel VadotadditionalProperties: false
1468cc087a1SEmmanuel Vadot
1478cc087a1SEmmanuel Vadotexamples:
1488cc087a1SEmmanuel Vadot  - |
1498cc087a1SEmmanuel Vadot    #include <dt-bindings/soc/qcom,apr.h>
1508cc087a1SEmmanuel Vadot    apr {
1518cc087a1SEmmanuel Vadot        compatible = "qcom,apr-v2";
1528cc087a1SEmmanuel Vadot        qcom,domain = <APR_DOMAIN_ADSP>;
1538bab661aSEmmanuel Vadot        qcom,glink-channels = "apr_audio_svc";
1548bab661aSEmmanuel Vadot        qcom,intents = <512 20>;
1558cc087a1SEmmanuel Vadot        #address-cells = <1>;
1568cc087a1SEmmanuel Vadot        #size-cells = <0>;
1578cc087a1SEmmanuel Vadot
1588cc087a1SEmmanuel Vadot        q6core: service@3 {
1598cc087a1SEmmanuel Vadot            compatible = "qcom,q6core";
1608cc087a1SEmmanuel Vadot            reg = <APR_SVC_ADSP_CORE>;
1618cc087a1SEmmanuel Vadot            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
1628cc087a1SEmmanuel Vadot        };
1638cc087a1SEmmanuel Vadot
1648bab661aSEmmanuel Vadot        service@4 {
1658cc087a1SEmmanuel Vadot            compatible = "qcom,q6afe";
1668cc087a1SEmmanuel Vadot            reg = <APR_SVC_AFE>;
1678cc087a1SEmmanuel Vadot            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
1688bab661aSEmmanuel Vadot
1698bab661aSEmmanuel Vadot            clock-controller {
1708bab661aSEmmanuel Vadot                compatible = "qcom,q6afe-clocks";
1718bab661aSEmmanuel Vadot                #clock-cells = <2>;
1728cc087a1SEmmanuel Vadot            };
1738cc087a1SEmmanuel Vadot
1748bab661aSEmmanuel Vadot            dais {
1758bab661aSEmmanuel Vadot                compatible = "qcom,q6afe-dais";
1768bab661aSEmmanuel Vadot                #address-cells = <1>;
1778bab661aSEmmanuel Vadot                #size-cells = <0>;
1788bab661aSEmmanuel Vadot                #sound-dai-cells = <1>;
1798bab661aSEmmanuel Vadot                /* ... */
1808cc087a1SEmmanuel Vadot            };
1818bab661aSEmmanuel Vadot            /* ... */
1828cc087a1SEmmanuel Vadot        };
1838cc087a1SEmmanuel Vadot    };
1848cc087a1SEmmanuel Vadot
1858cc087a1SEmmanuel Vadot  - |
1868cc087a1SEmmanuel Vadot    #include <dt-bindings/soc/qcom,gpr.h>
1878cc087a1SEmmanuel Vadot    gpr {
1888cc087a1SEmmanuel Vadot        compatible = "qcom,gpr";
1898cc087a1SEmmanuel Vadot        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
1908bab661aSEmmanuel Vadot        qcom,glink-channels = "adsp_apps";
1918bab661aSEmmanuel Vadot        qcom,intents = <512 20>;
1928cc087a1SEmmanuel Vadot        #address-cells = <1>;
1938cc087a1SEmmanuel Vadot        #size-cells = <0>;
1948cc087a1SEmmanuel Vadot
1958cc087a1SEmmanuel Vadot        service@1 {
1968cc087a1SEmmanuel Vadot            compatible = "qcom,q6apm";
1978cc087a1SEmmanuel Vadot            reg = <GPR_APM_MODULE_IID>;
1988bab661aSEmmanuel Vadot            #sound-dai-cells = <0>;
1998cc087a1SEmmanuel Vadot            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
2008bab661aSEmmanuel Vadot
2018bab661aSEmmanuel Vadot            dais {
2028bab661aSEmmanuel Vadot                compatible = "qcom,q6apm-dais";
2038bab661aSEmmanuel Vadot                iommus = <&apps_smmu 0x1801 0x0>;
2048bab661aSEmmanuel Vadot            };
2058bab661aSEmmanuel Vadot
2068bab661aSEmmanuel Vadot            bedais {
2078bab661aSEmmanuel Vadot                compatible = "qcom,q6apm-lpass-dais";
2088bab661aSEmmanuel Vadot                #sound-dai-cells = <1>;
2098bab661aSEmmanuel Vadot            };
2108cc087a1SEmmanuel Vadot        };
2118cc087a1SEmmanuel Vadot    };
212