Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220401201035.189106-9-krzysztof.kozlowski@linaro.org

authored by

Krzysztof Kozlowski and committed by
Bjorn Andersson
375eed5f 34128350

+142 -103
+1 -1
Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
··· 12 12 resides as a subnode of the SMD. As such, the SMD-RPM regulator requires 13 13 that the SMD and RPM nodes be present. 14 14 15 - Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt for 15 + Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml for 16 16 information pertaining to the SMD node. 17 17 18 18 Please refer to Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
+1 -1
Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
··· 250 250 251 251 The Hexagon node may also have an subnode named either "smd-edge" or 252 252 "glink-edge" that describes the communication edge, channels and devices 253 - related to the Hexagon. See ../soc/qcom/qcom,smd.txt and 253 + related to the Hexagon. See ../soc/qcom/qcom,smd.yaml and 254 254 ../soc/qcom/qcom,glink.txt for details on how to describe these. 255 255 256 256 = EXAMPLE
+1 -1
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
··· 111 111 112 112 The wcnss node can also have an subnode named "smd-edge" that describes the SMD 113 113 edge, channels and devices related to the WCNSS. 114 - See ../soc/qcom/qcom,smd.txt for details on how to describe the SMD edge. 114 + See ../soc/qcom/qcom,smd.yaml for details on how to describe the SMD edge. 115 115 116 116 = EXAMPLE 117 117 The following example describes the resources needed to boot control the WCNSS,
+2 -2
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
··· 12 12 to vote for state of the system resources, such as clocks, regulators and bus 13 13 frequencies. 14 14 15 - The SMD information for the RPM edge should be filled out. See qcom,smd.txt 15 + The SMD information for the RPM edge should be filled out. See qcom,smd.yaml 16 16 for the required edge properties. All SMD related properties will reside 17 17 within the RPM node itself. 18 18 ··· 83 83 qcom,ipc = <&apcs 8 0>; 84 84 qcom,smd-edge = <15>; 85 85 86 - rpm_requests { 86 + rpm-requests { 87 87 compatible = "qcom,rpm-msm8974"; 88 88 qcom,smd-channels = "rpm_requests"; 89 89
-98
Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt
··· 1 - Qualcomm Shared Memory Driver (SMD) binding 2 - 3 - This binding describes the Qualcomm Shared Memory Driver, a fifo based 4 - communication channel for sending data between the various subsystems in 5 - Qualcomm platforms. 6 - 7 - - compatible: 8 - Usage: required 9 - Value type: <stringlist> 10 - Definition: must be "qcom,smd" 11 - 12 - = EDGES 13 - 14 - Each subnode of the SMD node represents a remote subsystem or a remote 15 - processor of some sort - or in SMD language an "edge". The name of the edges 16 - are not important. 17 - The edge is described by the following properties: 18 - 19 - - interrupts: 20 - Usage: required 21 - Value type: <prop-encoded-array> 22 - Definition: should specify the IRQ used by the remote processor to 23 - signal this processor about communication related updates 24 - 25 - - mboxes: 26 - Usage: required 27 - Value type: <prop-encoded-array> 28 - Definition: reference to the associated doorbell in APCS, as described 29 - in mailbox/mailbox.txt 30 - 31 - - qcom,ipc: 32 - Usage: required, unless mboxes is specified 33 - Value type: <prop-encoded-array> 34 - Definition: three entries specifying the outgoing ipc bit used for 35 - signaling the remote processor: 36 - - phandle to a syscon node representing the apcs registers 37 - - u32 representing offset to the register within the syscon 38 - - u32 representing the ipc bit within the register 39 - 40 - - qcom,smd-edge: 41 - Usage: required 42 - Value type: <u32> 43 - Definition: the identifier of the remote processor in the smd channel 44 - allocation table 45 - 46 - - qcom,remote-pid: 47 - Usage: optional 48 - Value type: <u32> 49 - Definition: the identifier for the remote processor as known by the rest 50 - of the system. 51 - 52 - - label: 53 - Usage: optional 54 - Value type: <string> 55 - Definition: name of the edge, used for debugging and identification 56 - purposes. The node name will be used if this is not 57 - present. 58 - 59 - = SMD DEVICES 60 - 61 - In turn, subnodes of the "edges" represent devices tied to SMD channels on that 62 - "edge". The names of the devices are not important. The properties of these 63 - nodes are defined by the individual bindings for the SMD devices - but must 64 - contain the following property: 65 - 66 - - qcom,smd-channels: 67 - Usage: required 68 - Value type: <stringlist> 69 - Definition: a list of channels tied to this device, used for matching 70 - the device to channels 71 - 72 - = EXAMPLE 73 - 74 - The following example represents a smd node, with one edge representing the 75 - "rpm" subsystem. For the "rpm" subsystem we have a device tied to the 76 - "rpm_request" channel. 77 - 78 - apcs: syscon@f9011000 { 79 - compatible = "syscon"; 80 - reg = <0xf9011000 0x1000>; 81 - }; 82 - 83 - smd { 84 - compatible = "qcom,smd"; 85 - 86 - rpm { 87 - interrupts = <0 168 1>; 88 - qcom,ipc = <&apcs 8 0>; 89 - qcom,smd-edge = <15>; 90 - 91 - rpm_requests { 92 - compatible = "qcom,rpm-msm8974"; 93 - qcom,smd-channels = "rpm_requests"; 94 - 95 - ... 96 - }; 97 - }; 98 - };
+137
Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/qcom/qcom,smd.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Shared Memory Driver 8 + 9 + maintainers: 10 + - Andy Gross <agross@kernel.org> 11 + - Bjorn Andersson <bjorn.andersson@linaro.org> 12 + - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 13 + 14 + description: 15 + The Qualcomm Shared Memory Driver is a FIFO based communication channel for 16 + sending data between the various subsystems in Qualcomm platforms. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,smd 21 + 22 + patternProperties: 23 + "^.*-edge|rpm$": 24 + type: object 25 + description: 26 + Each subnode of the SMD node represents a remote subsystem or a remote 27 + processor of some sort - or in SMD language an "edge". The name of the 28 + edges are not important. 29 + 30 + properties: 31 + interrupts: 32 + maxItems: 1 33 + 34 + label: 35 + $ref: /schemas/types.yaml#/definitions/string 36 + description: 37 + Name of the edge, used for debugging and identification purposes. The 38 + node name will be used if this is not present. 39 + 40 + mboxes: 41 + maxItems: 1 42 + description: 43 + Reference to the mailbox representing the outgoing doorbell in APCS for 44 + this client. 45 + 46 + qcom,ipc: 47 + $ref: /schemas/types.yaml#/definitions/phandle-array 48 + items: 49 + - items: 50 + - description: phandle to a syscon node representing the APCS registers 51 + - description: u32 representing offset to the register within the syscon 52 + - description: u32 representing the ipc bit within the register 53 + description: 54 + Three entries specifying the outgoing ipc bit used for signaling the 55 + remote processor. 56 + 57 + qcom,smd-edge: 58 + $ref: /schemas/types.yaml#/definitions/uint32 59 + description: 60 + The identifier of the remote processor in the smd channel allocation 61 + table. 62 + 63 + qcom,remote-pid: 64 + $ref: /schemas/types.yaml#/definitions/uint32 65 + description: 66 + The identifier for the remote processor as known by the rest of the 67 + system. 68 + 69 + # Binding for edge subnodes is not complete 70 + patternProperties: 71 + "^rpm-requests$": 72 + type: object 73 + description: 74 + In turn, subnodes of the "edges" represent devices tied to SMD 75 + channels on that "edge". The names of the devices are not 76 + important. The properties of these nodes are defined by the 77 + individual bindings for the SMD devices. 78 + 79 + properties: 80 + qcom,smd-channels: 81 + $ref: /schemas/types.yaml#/definitions/string-array 82 + minItems: 1 83 + maxItems: 32 84 + description: 85 + A list of channels tied to this device, used for matching the 86 + device to channels. 87 + 88 + required: 89 + - compatible 90 + - qcom,smd-channels 91 + 92 + additionalProperties: true 93 + 94 + required: 95 + - interrupts 96 + - qcom,smd-edge 97 + 98 + oneOf: 99 + - required: 100 + - mboxes 101 + - required: 102 + - qcom,ipc 103 + 104 + additionalProperties: false 105 + 106 + required: 107 + - compatible 108 + 109 + additionalProperties: false 110 + 111 + examples: 112 + # The following example represents a smd node, with one edge representing the 113 + # "rpm" subsystem. For the "rpm" subsystem we have a device tied to the 114 + # "rpm_request" channel. 115 + - | 116 + #include <dt-bindings/interrupt-controller/arm-gic.h> 117 + 118 + shared-memory { 119 + compatible = "qcom,smd"; 120 + 121 + rpm { 122 + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>; 123 + qcom,ipc = <&apcs 8 0>; 124 + qcom,smd-edge = <15>; 125 + 126 + rpm-requests { 127 + compatible = "qcom,rpm-msm8974"; 128 + qcom,smd-channels = "rpm_requests"; 129 + 130 + clock-controller { 131 + compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc"; 132 + #clock-cells = <1>; 133 + }; 134 + 135 + }; 136 + }; 137 + };