Commit 375eed5f authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Bjorn Andersson
Browse files

dt-bindings: soc: qcom,smd: convert to dtschema



Convert the Qualcomm Shared Memory Driver bindings to DT Schema.

Changes against original bindings: enforce only specific names of child
nodes, instead of any names.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220401201035.189106-9-krzysztof.kozlowski@linaro.org
parent 34128350
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ description:
  resides as a subnode of the SMD.  As such, the SMD-RPM regulator requires
  that the SMD and RPM nodes be present.

  Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt for
  Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml for
  information pertaining to the SMD node.

  Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ the memory regions used by the Hexagon firmware. Each sub-node must contain:

The Hexagon node may also have an subnode named either "smd-edge" or
"glink-edge" that describes the communication edge, channels and devices
related to the Hexagon.  See ../soc/qcom/qcom,smd.txt and
related to the Hexagon.  See ../soc/qcom/qcom,smd.yaml and
../soc/qcom/qcom,glink.txt for details on how to describe these.

= EXAMPLE
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ and its resource dependencies. It is described by the following properties:

The wcnss node can also have an subnode named "smd-edge" that describes the SMD
edge, channels and devices related to the WCNSS.
See ../soc/qcom/qcom,smd.txt for details on how to describe the SMD edge.
See ../soc/qcom/qcom,smd.yaml for details on how to describe the SMD edge.

= EXAMPLE
The following example describes the resources needed to boot control the WCNSS,
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ description: |
  to vote for state of the system resources, such as clocks, regulators and bus
  frequencies.

  The SMD information for the RPM edge should be filled out.  See qcom,smd.txt
  The SMD information for the RPM edge should be filled out.  See qcom,smd.yaml
  for the required edge properties.  All SMD related properties will reside
  within the RPM node itself.

@@ -83,7 +83,7 @@ examples:
            qcom,ipc = <&apcs 8 0>;
            qcom,smd-edge = <15>;

                rpm_requests {
                rpm-requests {
                        compatible = "qcom,rpm-msm8974";
                        qcom,smd-channels = "rpm_requests";

+0 −98
Original line number Diff line number Diff line
Qualcomm Shared Memory Driver (SMD) binding

This binding describes the Qualcomm Shared Memory Driver, a fifo based
communication channel for sending data between the various subsystems in
Qualcomm platforms.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,smd"

= EDGES

Each subnode of the SMD node represents a remote subsystem or a remote
processor of some sort - or in SMD language an "edge". The name of the edges
are not important.
The edge is described by the following properties:

- interrupts:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: should specify the IRQ used by the remote processor to
		    signal this processor about communication related updates

- mboxes:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: reference to the associated doorbell in APCS, as described
		    in mailbox/mailbox.txt

- qcom,ipc:
	Usage: required, unless mboxes is specified
	Value type: <prop-encoded-array>
	Definition: three entries specifying the outgoing ipc bit used for
		    signaling the remote processor:
		    - phandle to a syscon node representing the apcs registers
		    - u32 representing offset to the register within the syscon
		    - u32 representing the ipc bit within the register

- qcom,smd-edge:
	Usage: required
	Value type: <u32>
	Definition: the identifier of the remote processor in the smd channel
		    allocation table

- qcom,remote-pid:
	Usage: optional
	Value type: <u32>
	Definition: the identifier for the remote processor as known by the rest
		    of the system.

- label:
	Usage: optional
	Value type: <string>
	Definition: name of the edge, used for debugging and identification
		    purposes. The node name will be used if this is not
		    present.

= SMD DEVICES

In turn, subnodes of the "edges" represent devices tied to SMD channels on that
"edge". The names of the devices are not important. The properties of these
nodes are defined by the individual bindings for the SMD devices - but must
contain the following property:

- qcom,smd-channels:
	Usage: required
	Value type: <stringlist>
	Definition: a list of channels tied to this device, used for matching
		    the device to channels

= EXAMPLE

The following example represents a smd node, with one edge representing the
"rpm" subsystem. For the "rpm" subsystem we have a device tied to the
"rpm_request" channel.

	apcs: syscon@f9011000 {
		compatible = "syscon";
		reg = <0xf9011000 0x1000>;
	};

	smd {
		compatible = "qcom,smd";

		rpm {
			interrupts = <0 168 1>;
			qcom,ipc = <&apcs 8 0>;
			qcom,smd-edge = <15>;

			rpm_requests {
				compatible = "qcom,rpm-msm8974";
				qcom,smd-channels = "rpm_requests";

				...
			};
		};
	};
Loading