1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/qcom/qcom,smd.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Shared Memory Driver
8
9maintainers:
10  - Andy Gross <agross@kernel.org>
11  - Bjorn Andersson <bjorn.andersson@linaro.org>
12  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
13
14description:
15  The Qualcomm Shared Memory Driver is a FIFO based communication channel for
16  sending data between the various subsystems in Qualcomm platforms.
17
18properties:
19  compatible:
20    const: qcom,smd
21
22patternProperties:
23  "^.*-edge|rpm$":
24    type: object
25    description:
26      Each subnode of the SMD node represents a remote subsystem or a remote
27      processor of some sort - or in SMD language an "edge". The name of the
28      edges are not important.
29
30    properties:
31      interrupts:
32        maxItems: 1
33
34      label:
35        $ref: /schemas/types.yaml#/definitions/string
36        description:
37          Name of the edge, used for debugging and identification purposes. The
38          node name will be used if this is not present.
39
40      mboxes:
41        maxItems: 1
42        description:
43          Reference to the mailbox representing the outgoing doorbell in APCS for
44          this client.
45
46      qcom,ipc:
47        $ref: /schemas/types.yaml#/definitions/phandle-array
48        items:
49          - items:
50              - description: phandle to a syscon node representing the APCS registers
51              - description: u32 representing offset to the register within the syscon
52              - description: u32 representing the ipc bit within the register
53        description:
54          Three entries specifying the outgoing ipc bit used for signaling the
55          remote processor.
56
57      qcom,smd-edge:
58        $ref: /schemas/types.yaml#/definitions/uint32
59        description:
60          The identifier of the remote processor in the smd channel allocation
61          table.
62
63      qcom,remote-pid:
64        $ref: /schemas/types.yaml#/definitions/uint32
65        description:
66          The identifier for the remote processor as known by the rest of the
67          system.
68
69    # Binding for edge subnodes is not complete
70    patternProperties:
71      "^rpm-requests$":
72        type: object
73        description:
74          In turn, subnodes of the "edges" represent devices tied to SMD
75          channels on that "edge". The names of the devices are not
76          important. The properties of these nodes are defined by the
77          individual bindings for the SMD devices.
78
79        properties:
80          qcom,smd-channels:
81            $ref: /schemas/types.yaml#/definitions/string-array
82            minItems: 1
83            maxItems: 32
84            description:
85              A list of channels tied to this device, used for matching the
86              device to channels.
87
88        required:
89          - compatible
90          - qcom,smd-channels
91
92        additionalProperties: true
93
94    required:
95      - interrupts
96      - qcom,smd-edge
97
98    oneOf:
99      - required:
100          - mboxes
101      - required:
102          - qcom,ipc
103
104    additionalProperties: false
105
106required:
107  - compatible
108
109additionalProperties: false
110
111examples:
112  # The following example represents a smd node, with one edge representing the
113  # "rpm" subsystem. For the "rpm" subsystem we have a device tied to the
114  # "rpm_request" channel.
115  - |
116    #include <dt-bindings/interrupt-controller/arm-gic.h>
117
118    shared-memory {
119        compatible = "qcom,smd";
120
121        rpm {
122            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
123            qcom,ipc = <&apcs 8 0>;
124            qcom,smd-edge = <15>;
125
126            rpm-requests {
127                compatible = "qcom,rpm-msm8974";
128                qcom,smd-channels = "rpm_requests";
129
130                clock-controller {
131                    compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc";
132                    #clock-cells = <1>;
133                };
134
135            };
136        };
137    };
138