18c2ecf20Sopenharmony_ciQualcomm Shared Memory Point 2 Point binding
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe Shared Memory Point to Point (SMP2P) protocol facilitates communication of
48c2ecf20Sopenharmony_cia single 32-bit value between two processors.  Each value has a single writer
58c2ecf20Sopenharmony_ci(the local side) and a single reader (the remote side).  Values are uniquely
68c2ecf20Sopenharmony_ciidentified in the system by the directed edge (local processor ID to remote
78c2ecf20Sopenharmony_ciprocessor ID) and a string identifier.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci- compatible:
108c2ecf20Sopenharmony_ci	Usage: required
118c2ecf20Sopenharmony_ci	Value type: <string>
128c2ecf20Sopenharmony_ci	Definition: must be one of:
138c2ecf20Sopenharmony_ci		    "qcom,smp2p"
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci- interrupts:
168c2ecf20Sopenharmony_ci	Usage: required
178c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
188c2ecf20Sopenharmony_ci	Definition: one entry specifying the smp2p notification interrupt
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci- mboxes:
218c2ecf20Sopenharmony_ci	Usage: required
228c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
238c2ecf20Sopenharmony_ci	Definition: reference to the associated doorbell in APCS, as described
248c2ecf20Sopenharmony_ci		    in mailbox/mailbox.txt
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci- qcom,ipc:
278c2ecf20Sopenharmony_ci	Usage: required, unless mboxes is specified
288c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
298c2ecf20Sopenharmony_ci	Definition: three entries specifying the outgoing ipc bit used for
308c2ecf20Sopenharmony_ci		    signaling the remote end of the smp2p edge:
318c2ecf20Sopenharmony_ci		    - phandle to a syscon node representing the apcs registers
328c2ecf20Sopenharmony_ci		    - u32 representing offset to the register within the syscon
338c2ecf20Sopenharmony_ci		    - u32 representing the ipc bit within the register
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- qcom,smem:
368c2ecf20Sopenharmony_ci	Usage: required
378c2ecf20Sopenharmony_ci	Value type: <u32 array>
388c2ecf20Sopenharmony_ci	Definition: two identifiers of the inbound and outbound smem items used
398c2ecf20Sopenharmony_ci		    for this edge
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci- qcom,local-pid:
428c2ecf20Sopenharmony_ci	Usage: required
438c2ecf20Sopenharmony_ci	Value type: <u32>
448c2ecf20Sopenharmony_ci	Definition: specifies the identifier of the local endpoint of this edge
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci- qcom,remote-pid:
478c2ecf20Sopenharmony_ci	Usage: required
488c2ecf20Sopenharmony_ci	Value type: <u32>
498c2ecf20Sopenharmony_ci	Definition: specifies the identifier of the remote endpoint of this edge
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci= SUBNODES
528c2ecf20Sopenharmony_ciEach SMP2P pair contain a set of inbound and outbound entries, these are
538c2ecf20Sopenharmony_cidescribed in subnodes of the smp2p device node. The node names are not
548c2ecf20Sopenharmony_ciimportant.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci- qcom,entry-name:
578c2ecf20Sopenharmony_ci	Usage: required
588c2ecf20Sopenharmony_ci	Value type: <string>
598c2ecf20Sopenharmony_ci	Definition: specifies the name of this entry, for inbound entries this
608c2ecf20Sopenharmony_ci		    will be used to match against the remotely allocated entry
618c2ecf20Sopenharmony_ci		    and for outbound entries this name is used for allocating
628c2ecf20Sopenharmony_ci		    entries
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci- interrupt-controller:
658c2ecf20Sopenharmony_ci	Usage: required for incoming entries
668c2ecf20Sopenharmony_ci	Value type: <empty>
678c2ecf20Sopenharmony_ci	Definition: marks the entry as inbound; the node should be specified
688c2ecf20Sopenharmony_ci		    as a two cell interrupt-controller as defined in
698c2ecf20Sopenharmony_ci		    "../interrupt-controller/interrupts.txt"
708c2ecf20Sopenharmony_ci		    If not specified this node will denote the outgoing entry
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci- #interrupt-cells:
738c2ecf20Sopenharmony_ci	Usage: required for incoming entries
748c2ecf20Sopenharmony_ci	Value type: <u32>
758c2ecf20Sopenharmony_ci	Definition: must be 2 - denoting the bit in the entry and IRQ flags
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci- #qcom,smem-state-cells:
788c2ecf20Sopenharmony_ci	Usage: required for outgoing entries
798c2ecf20Sopenharmony_ci	Value type: <u32>
808c2ecf20Sopenharmony_ci	Definition: must be 1 - denoting the bit in the entry
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci= EXAMPLE
838c2ecf20Sopenharmony_ciThe following example shows the SMP2P setup with the wireless processor,
848c2ecf20Sopenharmony_cidefined from the 8974 apps processor's point-of-view. It encompasses one
858c2ecf20Sopenharmony_ciinbound and one outbound entry:
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ciwcnss-smp2p {
888c2ecf20Sopenharmony_ci	compatible = "qcom,smp2p";
898c2ecf20Sopenharmony_ci	qcom,smem = <431>, <451>;
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci	interrupts = <0 143 1>;
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci	qcom,ipc = <&apcs 8 18>;
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci	qcom,local-pid = <0>;
968c2ecf20Sopenharmony_ci	qcom,remote-pid = <4>;
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci	wcnss_smp2p_out: master-kernel {
998c2ecf20Sopenharmony_ci		qcom,entry-name = "master-kernel";
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci		#qcom,smem-state-cells = <1>;
1028c2ecf20Sopenharmony_ci	};
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci	wcnss_smp2p_in: slave-kernel {
1058c2ecf20Sopenharmony_ci		qcom,entry-name = "slave-kernel";
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci		interrupt-controller;
1088c2ecf20Sopenharmony_ci		#interrupt-cells = <2>;
1098c2ecf20Sopenharmony_ci	};
1108c2ecf20Sopenharmony_ci};
111