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