xref: /linux/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
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,smp2p.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Shared Memory Point 2 Point
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 Shared Memory Point to Point (SMP2P) protocol facilitates communication
16  of a single 32-bit value between two processors.  Each value has a single
17  writer (the local side) and a single reader (the remote side).  Values are
18  uniquely identified in the system by the directed edge (local processor ID to
19  remote processor ID) and a string identifier.
20
21properties:
22  compatible:
23    const: qcom,smp2p
24
25  interrupts:
26    maxItems: 1
27
28  mboxes:
29    maxItems: 1
30    description:
31      Reference to the mailbox representing the outgoing doorbell in APCS for
32      this client.
33
34  qcom,ipc:
35    $ref: /schemas/types.yaml#/definitions/phandle-array
36    items:
37      - items:
38          - description: phandle to a syscon node representing the APCS registers
39          - description: u32 representing offset to the register within the syscon
40          - description: u32 representing the ipc bit within the register
41    description:
42      Three entries specifying the outgoing ipc bit used for signaling the
43      remote end of the smp2p edge.
44    deprecated: true
45
46  qcom,local-pid:
47    $ref: /schemas/types.yaml#/definitions/uint32
48    description:
49      The identifier of the local endpoint of this edge.
50
51  qcom,remote-pid:
52    $ref: /schemas/types.yaml#/definitions/uint32
53    description:
54      The identifier of the remote endpoint of this edge.
55
56  qcom,smem:
57    $ref: /schemas/types.yaml#/definitions/uint32-array
58    items:
59      maxItems: 2
60    description:
61      Two identifiers of the inbound and outbound smem items used for this edge.
62
63patternProperties:
64  "^master-kernel|slave-kernel|ipa-ap-to-modem|ipa-modem-to-ap|wlan-ap-to-wpss|wlan-wpss-to-ap$":
65    type: object
66    description:
67      Each SMP2P pair contain a set of inbound and outbound entries, these are
68      described in subnodes of the smp2p device node. The node names are not
69      important.
70
71    properties:
72      interrupt-controller:
73        description:
74          Marks the entry as inbound; the node should be specified as a two
75          cell interrupt-controller.  If not specified this node will denote
76          the outgoing entry.
77
78      '#interrupt-cells':
79        const: 2
80
81      qcom,entry-name:
82        $ref: /schemas/types.yaml#/definitions/string
83        description:
84          The name of this entry, for inbound entries this will be used to
85          match against the remotely allocated entry and for outbound entries
86          this name is used for allocating entries.
87
88      '#qcom,smem-state-cells':
89        $ref: /schemas/types.yaml#/definitions/uint32
90        const: 1
91        description:
92          Required for outgoing entries.
93
94    required:
95      - qcom,entry-name
96
97    oneOf:
98      - required:
99          - interrupt-controller
100          - '#interrupt-cells'
101      - required:
102          - '#qcom,smem-state-cells'
103
104    additionalProperties: false
105
106required:
107  - compatible
108  - interrupts
109  - qcom,local-pid
110  - qcom,remote-pid
111  - qcom,smem
112
113oneOf:
114  - required:
115      - mboxes
116  - required:
117      - qcom,ipc
118
119additionalProperties: false
120
121examples:
122  # The following example shows the SMP2P setup with the wireless processor,
123  # defined from the 8974 apps processor's point-of-view. It encompasses one
124  # inbound and one outbound entry.
125  - |
126    #include <dt-bindings/interrupt-controller/arm-gic.h>
127
128    shared-memory {
129        compatible = "qcom,smp2p";
130        qcom,smem = <431>, <451>;
131        interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
132        mboxes = <&apcs 18>;
133        qcom,local-pid = <0>;
134        qcom,remote-pid = <4>;
135
136        wcnss_smp2p_out: master-kernel {
137            qcom,entry-name = "master-kernel";
138            #qcom,smem-state-cells = <1>;
139        };
140
141        wcnss_smp2p_in: slave-kernel {
142            qcom,entry-name = "slave-kernel";
143            interrupt-controller;
144            #interrupt-cells = <2>;
145        };
146    };
147