xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm Shared Memory Driver (SMD) binding
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis binding describes the Qualcomm Shared Memory Driver, a fifo based
4*4882a593Smuzhiyuncommunication channel for sending data between the various subsystems in
5*4882a593SmuzhiyunQualcomm platforms.
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun- compatible:
8*4882a593Smuzhiyun	Usage: required
9*4882a593Smuzhiyun	Value type: <stringlist>
10*4882a593Smuzhiyun	Definition: must be "qcom,smd"
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun= EDGES
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunEach subnode of the SMD node represents a remote subsystem or a remote
15*4882a593Smuzhiyunprocessor of some sort - or in SMD language an "edge". The name of the edges
16*4882a593Smuzhiyunare not important.
17*4882a593SmuzhiyunThe edge is described by the following properties:
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun- interrupts:
20*4882a593Smuzhiyun	Usage: required
21*4882a593Smuzhiyun	Value type: <prop-encoded-array>
22*4882a593Smuzhiyun	Definition: should specify the IRQ used by the remote processor to
23*4882a593Smuzhiyun		    signal this processor about communication related updates
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun- mboxes:
26*4882a593Smuzhiyun	Usage: required
27*4882a593Smuzhiyun	Value type: <prop-encoded-array>
28*4882a593Smuzhiyun	Definition: reference to the associated doorbell in APCS, as described
29*4882a593Smuzhiyun		    in mailbox/mailbox.txt
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun- qcom,ipc:
32*4882a593Smuzhiyun	Usage: required, unless mboxes is specified
33*4882a593Smuzhiyun	Value type: <prop-encoded-array>
34*4882a593Smuzhiyun	Definition: three entries specifying the outgoing ipc bit used for
35*4882a593Smuzhiyun		    signaling the remote processor:
36*4882a593Smuzhiyun		    - phandle to a syscon node representing the apcs registers
37*4882a593Smuzhiyun		    - u32 representing offset to the register within the syscon
38*4882a593Smuzhiyun		    - u32 representing the ipc bit within the register
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun- qcom,smd-edge:
41*4882a593Smuzhiyun	Usage: required
42*4882a593Smuzhiyun	Value type: <u32>
43*4882a593Smuzhiyun	Definition: the identifier of the remote processor in the smd channel
44*4882a593Smuzhiyun		    allocation table
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun- qcom,remote-pid:
47*4882a593Smuzhiyun	Usage: optional
48*4882a593Smuzhiyun	Value type: <u32>
49*4882a593Smuzhiyun	Definition: the identifier for the remote processor as known by the rest
50*4882a593Smuzhiyun		    of the system.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun- label:
53*4882a593Smuzhiyun	Usage: optional
54*4882a593Smuzhiyun	Value type: <string>
55*4882a593Smuzhiyun	Definition: name of the edge, used for debugging and identification
56*4882a593Smuzhiyun		    purposes. The node name will be used if this is not
57*4882a593Smuzhiyun		    present.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun= SMD DEVICES
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunIn turn, subnodes of the "edges" represent devices tied to SMD channels on that
62*4882a593Smuzhiyun"edge". The names of the devices are not important. The properties of these
63*4882a593Smuzhiyunnodes are defined by the individual bindings for the SMD devices - but must
64*4882a593Smuzhiyuncontain the following property:
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun- qcom,smd-channels:
67*4882a593Smuzhiyun	Usage: required
68*4882a593Smuzhiyun	Value type: <stringlist>
69*4882a593Smuzhiyun	Definition: a list of channels tied to this device, used for matching
70*4882a593Smuzhiyun		    the device to channels
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun= EXAMPLE
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunThe following example represents a smd node, with one edge representing the
75*4882a593Smuzhiyun"rpm" subsystem. For the "rpm" subsystem we have a device tied to the
76*4882a593Smuzhiyun"rpm_request" channel.
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun	apcs: syscon@f9011000 {
79*4882a593Smuzhiyun		compatible = "syscon";
80*4882a593Smuzhiyun		reg = <0xf9011000 0x1000>;
81*4882a593Smuzhiyun	};
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun	smd {
84*4882a593Smuzhiyun		compatible = "qcom,smd";
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun		rpm {
87*4882a593Smuzhiyun			interrupts = <0 168 1>;
88*4882a593Smuzhiyun			qcom,ipc = <&apcs 8 0>;
89*4882a593Smuzhiyun			qcom,smd-edge = <15>;
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun			rpm_requests {
92*4882a593Smuzhiyun				compatible = "qcom,rpm-msm8974";
93*4882a593Smuzhiyun				qcom,smd-channels = "rpm_requests";
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun				...
96*4882a593Smuzhiyun			};
97*4882a593Smuzhiyun		};
98*4882a593Smuzhiyun	};
99