0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/soc/qcom/qcom,smp2p.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Qualcomm Shared Memory Point 2 Point
0008
0009 maintainers:
0010 - Andy Gross <agross@kernel.org>
0011 - Bjorn Andersson <bjorn.andersson@linaro.org>
0012 - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
0013
0014 description:
0015 The Shared Memory Point to Point (SMP2P) protocol facilitates communication
0016 of a single 32-bit value between two processors. Each value has a single
0017 writer (the local side) and a single reader (the remote side). Values are
0018 uniquely identified in the system by the directed edge (local processor ID to
0019 remote processor ID) and a string identifier.
0020
0021 properties:
0022 compatible:
0023 const: qcom,smp2p
0024
0025 interrupts:
0026 maxItems: 1
0027
0028 mboxes:
0029 maxItems: 1
0030 description:
0031 Reference to the mailbox representing the outgoing doorbell in APCS for
0032 this client.
0033
0034 qcom,ipc:
0035 $ref: /schemas/types.yaml#/definitions/phandle-array
0036 items:
0037 - items:
0038 - description: phandle to a syscon node representing the APCS registers
0039 - description: u32 representing offset to the register within the syscon
0040 - description: u32 representing the ipc bit within the register
0041 description:
0042 Three entries specifying the outgoing ipc bit used for signaling the
0043 remote end of the smp2p edge.
0044
0045 qcom,local-pid:
0046 $ref: /schemas/types.yaml#/definitions/uint32
0047 description:
0048 The identifier of the local endpoint of this edge.
0049
0050 qcom,remote-pid:
0051 $ref: /schemas/types.yaml#/definitions/uint32
0052 description:
0053 The identifier of the remote endpoint of this edge.
0054
0055 qcom,smem:
0056 $ref: /schemas/types.yaml#/definitions/uint32-array
0057 items:
0058 maxItems: 2
0059 description:
0060 Two identifiers of the inbound and outbound smem items used for this edge.
0061
0062 patternProperties:
0063 "^master-kernel|slave-kernel|ipa-ap-to-modem|ipa-modem-to-ap$":
0064 type: object
0065 description:
0066 Each SMP2P pair contain a set of inbound and outbound entries, these are
0067 described in subnodes of the smp2p device node. The node names are not
0068 important.
0069
0070 properties:
0071 interrupt-controller:
0072 description:
0073 Marks the entry as inbound; the node should be specified as a two
0074 cell interrupt-controller. If not specified this node will denote
0075 the outgoing entry.
0076
0077 '#interrupt-cells':
0078 const: 2
0079
0080 qcom,entry-name:
0081 $ref: /schemas/types.yaml#/definitions/string
0082 description:
0083 The name of this entry, for inbound entries this will be used to
0084 match against the remotely allocated entry and for outbound entries
0085 this name is used for allocating entries.
0086
0087 '#qcom,smem-state-cells':
0088 $ref: /schemas/types.yaml#/definitions/uint32
0089 const: 1
0090 description:
0091 Required for outgoing entries.
0092
0093 required:
0094 - qcom,entry-name
0095
0096 oneOf:
0097 - required:
0098 - interrupt-controller
0099 - '#interrupt-cells'
0100 - required:
0101 - '#qcom,smem-state-cells'
0102
0103 additionalProperties: false
0104
0105 required:
0106 - compatible
0107 - interrupts
0108 - qcom,local-pid
0109 - qcom,remote-pid
0110 - qcom,smem
0111
0112 oneOf:
0113 - required:
0114 - mboxes
0115 - required:
0116 - qcom,ipc
0117
0118 additionalProperties: false
0119
0120 examples:
0121 # The following example shows the SMP2P setup with the wireless processor,
0122 # defined from the 8974 apps processor's point-of-view. It encompasses one
0123 # inbound and one outbound entry.
0124 - |
0125 #include <dt-bindings/interrupt-controller/arm-gic.h>
0126
0127 shared-memory {
0128 compatible = "qcom,smp2p";
0129 qcom,smem = <431>, <451>;
0130 interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
0131 qcom,ipc = <&apcs 8 18>;
0132 qcom,local-pid = <0>;
0133 qcom,remote-pid = <4>;
0134
0135 wcnss_smp2p_out: master-kernel {
0136 qcom,entry-name = "master-kernel";
0137 #qcom,smem-state-cells = <1>;
0138 };
0139
0140 wcnss_smp2p_in: slave-kernel {
0141 qcom,entry-name = "slave-kernel";
0142 interrupt-controller;
0143 #interrupt-cells = <2>;
0144 };
0145 };