xref: /freebsd/sys/contrib/device-tree/Bindings/soc/qcom/qcom,apr.yaml (revision 38a52bd3b5cac3da6f7f6eef3dd050e6aa08ebb3)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12description: |
13  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
14  communication between Application processor and QDSP. APR/GPR is mainly
15  used for audio/voice services on the QDSP.
16
17properties:
18  compatible:
19    enum:
20      - qcom,apr-v2
21      - qcom,gpr
22
23  qcom,apr-domain:
24    $ref: /schemas/types.yaml#/definitions/uint32
25    enum: [1, 2, 3, 4, 5, 6, 7]
26    description:
27      Selects the processor domain for apr
28        1 = APR simulator
29        2 = PC Domain
30        3 = Modem Domain
31        4 = ADSP Domain
32        5 = Application processor Domain
33        6 = Modem2 Domain
34        7 = Application Processor2 Domain
35    deprecated: true
36
37  qcom,domain:
38    $ref: /schemas/types.yaml#/definitions/uint32
39    minimum: 1
40    maximum: 7
41    description:
42      Selects the processor domain for apr
43        1 = APR simulator
44        2 = PC Domain
45        3 = Modem Domain
46        4 = ADSP Domain
47        5 = Application processor Domain
48        6 = Modem2 Domain
49        7 = Application Processor2 Domain
50      Selects the processor domain for gpr
51        1 = Modem Domain
52        2 = Audio DSP Domain
53        3 = Application Processor Domain
54
55  '#address-cells':
56    const: 1
57
58  '#size-cells':
59    const: 0
60
61#APR/GPR Services
62patternProperties:
63  "^service@[1-9a-d]$":
64    type: object
65    description:
66      APR/GPR node's client devices use subnodes for desired static port services.
67
68    properties:
69      compatible:
70        enum:
71          - qcom,q6core
72          - qcom,q6asm
73          - qcom,q6afe
74          - qcom,q6adm
75          - qcom,q6apm
76          - qcom,q6prm
77
78      reg:
79        minimum: 1
80        maximum: 13
81        description:
82          APR Service ID
83            3 = DSP Core Service
84            4 = Audio  Front End Service.
85            5 = Voice Stream Manager Service.
86            6 = Voice processing manager.
87            7 = Audio Stream Manager Service.
88            8 = Audio Device Manager Service.
89            9 = Multimode voice manager.
90            10 = Core voice stream.
91            11 = Core voice processor.
92            12 = Ultrasound stream manager.
93            13 = Listen stream manager.
94          GPR Service ID
95            1 = Audio Process Manager Service
96            2 = Proxy Resource Manager Service.
97            3 = AMDB Service.
98            4 = Voice processing manager.
99
100      qcom,protection-domain:
101        $ref: /schemas/types.yaml#/definitions/string-array
102        description: protection domain service name and path for apr service
103          possible values are
104          "avs/audio", "msm/adsp/audio_pd".
105          "kernel/elf_loader", "msm/modem/wlan_pd".
106          "tms/servreg", "msm/adsp/audio_pd".
107          "tms/servreg", "msm/modem/wlan_pd".
108          "tms/servreg", "msm/slpi/sensor_pd".
109
110      '#address-cells':
111        const: 1
112
113      '#size-cells':
114        const: 0
115
116    patternProperties:
117      "^.*@[0-9a-f]+$":
118        type: object
119        description:
120          Service based devices like clock controllers or digital audio interfaces.
121
122    additionalProperties: false
123
124required:
125  - compatible
126  - qcom,domain
127
128additionalProperties: false
129
130examples:
131  - |
132    #include <dt-bindings/soc/qcom,apr.h>
133    apr {
134        compatible = "qcom,apr-v2";
135        qcom,domain = <APR_DOMAIN_ADSP>;
136        #address-cells = <1>;
137        #size-cells = <0>;
138
139        q6core: service@3 {
140          compatible = "qcom,q6core";
141          reg = <APR_SVC_ADSP_CORE>;
142          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
143        };
144
145        q6afe: service@4 {
146          compatible = "qcom,q6afe";
147          reg = <APR_SVC_AFE>;
148          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
149        };
150
151        q6asm: service@7 {
152          compatible = "qcom,q6asm";
153          reg = <APR_SVC_ASM>;
154          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
155        };
156
157        q6adm: service@8 {
158          compatible = "qcom,q6adm";
159          reg = <APR_SVC_ADM>;
160          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
161        };
162    };
163
164  - |
165    #include <dt-bindings/soc/qcom,gpr.h>
166    gpr {
167        compatible = "qcom,gpr";
168        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
169        #address-cells = <1>;
170        #size-cells = <0>;
171
172        service@1 {
173          compatible = "qcom,q6apm";
174          reg = <GPR_APM_MODULE_IID>;
175          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
176        };
177    };
178