xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm Shared Memory Point 2 Point binding
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe Shared Memory Point to Point (SMP2P) protocol facilitates communication of
4*4882a593Smuzhiyuna single 32-bit value between two processors.  Each value has a single writer
5*4882a593Smuzhiyun(the local side) and a single reader (the remote side).  Values are uniquely
6*4882a593Smuzhiyunidentified in the system by the directed edge (local processor ID to remote
7*4882a593Smuzhiyunprocessor ID) and a string identifier.
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun- compatible:
10*4882a593Smuzhiyun	Usage: required
11*4882a593Smuzhiyun	Value type: <string>
12*4882a593Smuzhiyun	Definition: must be one of:
13*4882a593Smuzhiyun		    "qcom,smp2p"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- interrupts:
16*4882a593Smuzhiyun	Usage: required
17*4882a593Smuzhiyun	Value type: <prop-encoded-array>
18*4882a593Smuzhiyun	Definition: one entry specifying the smp2p notification interrupt
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun- mboxes:
21*4882a593Smuzhiyun	Usage: required
22*4882a593Smuzhiyun	Value type: <prop-encoded-array>
23*4882a593Smuzhiyun	Definition: reference to the associated doorbell in APCS, as described
24*4882a593Smuzhiyun		    in mailbox/mailbox.txt
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun- qcom,ipc:
27*4882a593Smuzhiyun	Usage: required, unless mboxes is specified
28*4882a593Smuzhiyun	Value type: <prop-encoded-array>
29*4882a593Smuzhiyun	Definition: three entries specifying the outgoing ipc bit used for
30*4882a593Smuzhiyun		    signaling the remote end of the smp2p edge:
31*4882a593Smuzhiyun		    - phandle to a syscon node representing the apcs registers
32*4882a593Smuzhiyun		    - u32 representing offset to the register within the syscon
33*4882a593Smuzhiyun		    - u32 representing the ipc bit within the register
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun- qcom,smem:
36*4882a593Smuzhiyun	Usage: required
37*4882a593Smuzhiyun	Value type: <u32 array>
38*4882a593Smuzhiyun	Definition: two identifiers of the inbound and outbound smem items used
39*4882a593Smuzhiyun		    for this edge
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun- qcom,local-pid:
42*4882a593Smuzhiyun	Usage: required
43*4882a593Smuzhiyun	Value type: <u32>
44*4882a593Smuzhiyun	Definition: specifies the identifier of the local endpoint of this edge
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun- qcom,remote-pid:
47*4882a593Smuzhiyun	Usage: required
48*4882a593Smuzhiyun	Value type: <u32>
49*4882a593Smuzhiyun	Definition: specifies the identifier of the remote endpoint of this edge
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun= SUBNODES
52*4882a593SmuzhiyunEach SMP2P pair contain a set of inbound and outbound entries, these are
53*4882a593Smuzhiyundescribed in subnodes of the smp2p device node. The node names are not
54*4882a593Smuzhiyunimportant.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun- qcom,entry-name:
57*4882a593Smuzhiyun	Usage: required
58*4882a593Smuzhiyun	Value type: <string>
59*4882a593Smuzhiyun	Definition: specifies the name of this entry, for inbound entries this
60*4882a593Smuzhiyun		    will be used to match against the remotely allocated entry
61*4882a593Smuzhiyun		    and for outbound entries this name is used for allocating
62*4882a593Smuzhiyun		    entries
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun- interrupt-controller:
65*4882a593Smuzhiyun	Usage: required for incoming entries
66*4882a593Smuzhiyun	Value type: <empty>
67*4882a593Smuzhiyun	Definition: marks the entry as inbound; the node should be specified
68*4882a593Smuzhiyun		    as a two cell interrupt-controller as defined in
69*4882a593Smuzhiyun		    "../interrupt-controller/interrupts.txt"
70*4882a593Smuzhiyun		    If not specified this node will denote the outgoing entry
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun- #interrupt-cells:
73*4882a593Smuzhiyun	Usage: required for incoming entries
74*4882a593Smuzhiyun	Value type: <u32>
75*4882a593Smuzhiyun	Definition: must be 2 - denoting the bit in the entry and IRQ flags
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun- #qcom,smem-state-cells:
78*4882a593Smuzhiyun	Usage: required for outgoing entries
79*4882a593Smuzhiyun	Value type: <u32>
80*4882a593Smuzhiyun	Definition: must be 1 - denoting the bit in the entry
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun= EXAMPLE
83*4882a593SmuzhiyunThe following example shows the SMP2P setup with the wireless processor,
84*4882a593Smuzhiyundefined from the 8974 apps processor's point-of-view. It encompasses one
85*4882a593Smuzhiyuninbound and one outbound entry:
86*4882a593Smuzhiyun
87*4882a593Smuzhiyunwcnss-smp2p {
88*4882a593Smuzhiyun	compatible = "qcom,smp2p";
89*4882a593Smuzhiyun	qcom,smem = <431>, <451>;
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	interrupts = <0 143 1>;
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	qcom,ipc = <&apcs 8 18>;
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun	qcom,local-pid = <0>;
96*4882a593Smuzhiyun	qcom,remote-pid = <4>;
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	wcnss_smp2p_out: master-kernel {
99*4882a593Smuzhiyun		qcom,entry-name = "master-kernel";
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun		#qcom,smem-state-cells = <1>;
102*4882a593Smuzhiyun	};
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun	wcnss_smp2p_in: slave-kernel {
105*4882a593Smuzhiyun		qcom,entry-name = "slave-kernel";
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun		interrupt-controller;
108*4882a593Smuzhiyun		#interrupt-cells = <2>;
109*4882a593Smuzhiyun	};
110*4882a593Smuzhiyun};
111