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