Convert Qualcomm FastRPC bindings to yaml format, so that we could validate
dt-entries correctly and any future additions can go into yaml format.
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
Changes since v2:
fixed typo in pil compatible string
added required properties for pil example node
.../devicetree/bindings/misc/qcom,fastrpc.txt | 78 -------------
.../bindings/misc/qcom,fastrpc.yaml | 104 ++++++++++++++++++
2 files changed, 104 insertions(+), 78 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt b/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
deleted file mode 100644
index 2a1827ab50d2..000000000000
--- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-Qualcomm Technologies, Inc. FastRPC Driver
-
-The FastRPC implements an IPC (Inter-Processor Communication)
-mechanism that allows for clients to transparently make remote method
-invocations across DSP and APPS boundaries. This enables developers
-to offload tasks to the DSP and free up the application processor for
-other tasks.
-
-- compatible:
- Usage: required
- Value type: <stringlist>
- Definition: must be "qcom,fastrpc"
-
-- label
- Usage: required
- Value type: <string>
- Definition: should specify the dsp domain name this fastrpc
- corresponds to. must be one of this: "adsp", "mdsp", "sdsp", "cdsp"
-
-- #address-cells
- Usage: required
- Value type: <u32>
- Definition: Must be 1
-
-- #size-cells
- Usage: required
- Value type: <u32>
- Definition: Must be 0
-
-= COMPUTE BANKS
-Each subnode of the Fastrpc represents compute context banks available
-on the dsp.
-- All Compute context banks MUST contain the following properties:
-
-- compatible:
- Usage: required
- Value type: <stringlist>
- Definition: must be "qcom,fastrpc-compute-cb"
-
-- reg
- Usage: required
- Value type: <u32>
- Definition: Context Bank ID.
-
-- qcom,nsessions:
- Usage: Optional
- Value type: <u32>
- Defination: A value indicating how many sessions can share this
- context bank. Defaults to 1 when this property
- is not specified.
-
-Example:
-
-adsp-pil {
- compatible = "qcom,msm8996-adsp-pil";
- ...
- smd-edge {
- label = "lpass";
- fastrpc {
- compatible = "qcom,fastrpc";
- qcom,smd-channels = "fastrpcsmd-apps-dsp";
- label = "adsp";
- #address-cells = <1>;
- #size-cells = <0>;
-
- cb@1 {
- compatible = "qcom,fastrpc-compute-cb";
- reg = <1>;
- };
-
- cb@2 {
- compatible = "qcom,fastrpc-compute-cb";
- reg = <2>;
- };
- ...
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
new file mode 100644
index 000000000000..1840db08500c
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
@@ -0,0 +1,104 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/misc/qcom,fastrpc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Technologies, Inc. FastRPC Driver
+
+maintainers:
+ - Srinivas Kandagatla <[email protected]>
+
+description: |
+ This binding describes Qualcomm FastRPC an IPC (Inter-Processor Communication)
+ mechanism that allows for clients to transparently make remote method
+ invocations across DSP and APPS boundaries. This enables developers
+ to offload tasks to the DSP and free up the application processor for
+ other tasks.
+
+properties:
+ compatible:
+ const: qcom,fastrpc
+
+ label:
+ enum:
+ - adsp
+ - mdsp
+ - sdsp
+ - cdsp
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^cb@[0-9a-f]$":
+ type: object
+ description: |
+ Compute context bank
+
+ properties:
+ compatible:
+ const: qcom,fastrpc-compute-cb
+
+ reg:
+ maxItems: 1
+ description: Context Bank ID
+
+ qcom,nsessions:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: How many sessions can share this context bank.
+ Defaults to 1 when this property is not specified.
+
+ required:
+ - compatible
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - label
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ adsp {
+ compatible = "qcom,msm8996-adsp-pil";
+ interrupts-extended = <&intc 0 162 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ memory-region = <&adsp_region>;
+ qcom,smem-states = <&smp2p_adsp_out 0>;
+ qcom,smem-state-names = "stop";
+
+ smd-edge {
+ label = "lpass";
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ label = "adsp";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cb@1 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <1>;
+ };
+
+ cb@2 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <2>;
+ };
+ };
+ };
+ };
--
2.21.0
On Tue, 30 Nov 2021 09:28:46 +0000, Srinivas Kandagatla wrote:
> Convert Qualcomm FastRPC bindings to yaml format, so that we could validate
> dt-entries correctly and any future additions can go into yaml format.
>
> Signed-off-by: Srinivas Kandagatla <[email protected]>
> ---
>
> Changes since v2:
> fixed typo in pil compatible string
> added required properties for pil example node
>
> .../devicetree/bindings/misc/qcom,fastrpc.txt | 78 -------------
> .../bindings/misc/qcom,fastrpc.yaml | 104 ++++++++++++++++++
> 2 files changed, 104 insertions(+), 78 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
> create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
>
Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.
Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.
Full log is available here: https://patchwork.ozlabs.org/patch/1561468
fastrpc: 'compute-cb@1', 'compute-cb@2', 'compute-cb@3', 'compute-cb@4', 'compute-cb@5', 'compute-cb@6', 'compute-cb@7', 'compute-cb@8', 'qcom,glink-channels' do not match any of the regexes: '^cb@[0-9a-f]$', 'pinctrl-[0-9]+'
arch/arm64/boot/dts/qcom/qrb5165-rb5.dt.yaml
arch/arm64/boot/dts/qcom/sa8155p-adp.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-db845c.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dt.yaml
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-bahamut.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-griffin.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-mtp.dt.yaml
fastrpc: 'compute-cb@1', 'compute-cb@2', 'compute-cb@3', 'qcom,glink-channels' do not match any of the regexes: '^cb@[0-9a-f]$', 'pinctrl-[0-9]+'
arch/arm64/boot/dts/qcom/qrb5165-rb5.dt.yaml
arch/arm64/boot/dts/qcom/sa8155p-adp.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-bahamut.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-griffin.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-mtp.dt.yaml
fastrpc: 'compute-cb@3', 'compute-cb@4', 'compute-cb@5', 'qcom,glink-channels' do not match any of the regexes: '^cb@[0-9a-f]$', 'pinctrl-[0-9]+'
arch/arm64/boot/dts/qcom/qrb5165-rb5.dt.yaml
arch/arm64/boot/dts/qcom/sa8155p-adp.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-bahamut.dt.yaml
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-griffin.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dt.yaml
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-hdk.dt.yaml
arch/arm64/boot/dts/qcom/sm8350-mtp.dt.yaml
fastrpc: 'compute-cb@3', 'compute-cb@4', 'qcom,glink-channels' do not match any of the regexes: '^cb@[0-9a-f]$', 'pinctrl-[0-9]+'
arch/arm64/boot/dts/qcom/sdm845-cheza-r1.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-cheza-r2.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-db845c.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-mtp.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dt.yaml
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dt.yaml
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dt.yaml
fastrpc: 'qcom,smd-channels' does not match any of the regexes: '^cb@[0-9a-f]$', 'pinctrl-[0-9]+'
arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dt.yaml
arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml
arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dt.yaml
On Tue, Nov 30, 2021 at 09:28:46AM +0000, Srinivas Kandagatla wrote:
> Convert Qualcomm FastRPC bindings to yaml format, so that we could validate
> dt-entries correctly and any future additions can go into yaml format.
>
> Signed-off-by: Srinivas Kandagatla <[email protected]>
> ---
>
> Changes since v2:
> fixed typo in pil compatible string
> added required properties for pil example node
>
> .../devicetree/bindings/misc/qcom,fastrpc.txt | 78 -------------
> .../bindings/misc/qcom,fastrpc.yaml | 104 ++++++++++++++++++
> 2 files changed, 104 insertions(+), 78 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
> create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> new file mode 100644
> index 000000000000..1840db08500c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> @@ -0,0 +1,104 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/misc/qcom,fastrpc.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm Technologies, Inc. FastRPC Driver
> +
> +maintainers:
> + - Srinivas Kandagatla <[email protected]>
> +
> +description: |
> + This binding describes Qualcomm FastRPC an IPC (Inter-Processor Communication)
> + mechanism that allows for clients to transparently make remote method
> + invocations across DSP and APPS boundaries. This enables developers
> + to offload tasks to the DSP and free up the application processor for
> + other tasks.
> +
> +properties:
> + compatible:
> + const: qcom,fastrpc
> +
> + label:
> + enum:
> + - adsp
> + - mdsp
> + - sdsp
> + - cdsp
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> +patternProperties:
> + "^cb@[0-9a-f]$":
> + type: object
> + description: |
> + Compute context bank
> +
> + properties:
> + compatible:
> + const: qcom,fastrpc-compute-cb
> +
> + reg:
> + maxItems: 1
> + description: Context Bank ID
> +
> + qcom,nsessions:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: How many sessions can share this context bank.
> + Defaults to 1 when this property is not specified.
default: 1
Is there a maximum? Or 2^32 is good?
> +
> + required:
> + - compatible
> + - reg
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - label
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + adsp {
> + compatible = "qcom,msm8996-adsp-pil";
> + interrupts-extended = <&intc 0 162 IRQ_TYPE_EDGE_RISING>,
> + <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
> + <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
> + <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
> + <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
> + interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
> + clocks = <&xo_board>;
> + clock-names = "xo";
> + memory-region = <&adsp_region>;
> + qcom,smem-states = <&smp2p_adsp_out 0>;
> + qcom,smem-state-names = "stop";
> +
> + smd-edge {
> + label = "lpass";
> +
> + fastrpc {
> + compatible = "qcom,fastrpc";
> + label = "adsp";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cb@1 {
> + compatible = "qcom,fastrpc-compute-cb";
> + reg = <1>;
> + };
> +
> + cb@2 {
> + compatible = "qcom,fastrpc-compute-cb";
> + reg = <2>;
> + };
> + };
> + };
> + };
> --
> 2.21.0
>
>