diff mbox series

[v7,1/2] dt-bindings: misc: fastrpc convert bindings to yaml

Message ID 20220905144554.1772073-1-abel.vesa@linaro.org (mailing list archive)
State Superseded
Headers show
Series [v7,1/2] dt-bindings: misc: fastrpc convert bindings to yaml | expand

Commit Message

Abel Vesa Sept. 5, 2022, 2:45 p.m. UTC
Convert Qualcomm FastRPC bindings to yaml format, so that we could validate
dt-entries correctly and any future additions can go into yaml format.

Use compute-cb@ subnodes instead of just cb@.

Also add qcom,non-secure-domain, qcom,glink-channels and
qcom,smd-channels missing properties to make sure dtbs_check doesn't
fail right off the bat.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Co-developed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---

Changes since v6:
 * renamed the parent node name in the example from smd-edge to glink-edge

 .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
 .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++
 2 files changed, 118 insertions(+), 88 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
 create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml

Comments

Rob Herring Sept. 6, 2022, 2:29 a.m. UTC | #1
On Mon, 05 Sep 2022 17:45:53 +0300, Abel Vesa 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.
> 
> Use compute-cb@ subnodes instead of just cb@.
> 
> Also add qcom,non-secure-domain, qcom,glink-channels and
> qcom,smd-channels missing properties to make sure dtbs_check doesn't
> fail right off the bat.
> 
> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> 
> Changes since v6:
>  * renamed the parent node name in the example from smd-edge to glink-edge
> 
>  .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
>  .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++
>  2 files changed, 118 insertions(+), 88 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
>  create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:


doc reference errors (make refcheckdocs):
Documentation/devicetree/bindings/remoteproc/qcom,glink-edge.yaml: Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
MAINTAINERS: Documentation/devicetree/bindings/misc/qcom,fastrpc.txt

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Krzysztof Kozlowski Sept. 6, 2022, 6:45 a.m. UTC | #2
On 05/09/2022 16:45, Abel Vesa 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.
> 
> Use compute-cb@ subnodes instead of just cb@.
> 
> Also add qcom,non-secure-domain, qcom,glink-channels and
> qcom,smd-channels missing properties to make sure dtbs_check doesn't
> fail right off the bat.

qcom,non-secure-domain is in original binding, so I don't understand why
it is being "added".

> 
> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> 
> Changes since v6:
>  * renamed the parent node name in the example from smd-edge to glink-edge
> 
>  .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
>  .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++

As you can see in Rob's bot report - the patchset introduces errors and
is not bisectable.

You also need to fix qcom,glink-edge.yaml

>  2 files changed, 118 insertions(+), 88 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 5ec124b138a6..000000000000
> --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
> +++ /dev/null
> @@ -1,88 +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"
> -
> -- qcom,non-secure-domain:
> -	Usage: required
> -	Value type: <boolean>
> -	Definition: Property to specify that dsp domain is non-secure.
> -
> -- qcom,vmids:
> -	Usage: optional
> -	Value type: <u32 array>
> -	Definition: Virtual machine IDs for remote processor.

You miss qcom,vmids in the conversion.

> -
> -- #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..2b446272cc14
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> @@ -0,0 +1,118 @@
> +# SPDX-License-Identifier: (GPL-2.0-only 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 FastRPC Driver
> +
> +maintainers:
> +  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> +
> +description: |
> +  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.
> +
> +properties:
> +  compatible:
> +    items:

no "items", as it is not a list.

> +      - const: qcom,fastrpc
> +
> +  label:
> +    items:

ditto (plus this actually does not define even how many items)

> +      enum:
> +        - adsp
> +        - mdsp
> +        - sdsp
> +        - cdsp
> +
> +  qcom,glink-channels:
> +    description:
> +      A list of channels tied to this function, used for matching
> +      the function to a set of virtual channels.
> +    $ref: "/schemas/types.yaml#/definitions/string-array"

maxItems: 1

> +
> +  qcom,non-secure-domain:
> +    description:
> +      Used to mark the current domain as non-secure.
> +    type: boolean
> +
> +  qcom,smd-channels:
> +    description:
> +      Channel name used for the RPM communication
> +    $ref: "/schemas/types.yaml#/definitions/string-array"

maxItems: 1


> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +patternProperties:
> +  "(compute-)?cb@[0-9]*$":
> +    type: object
> +
> +    description: >
> +      Each subnode of the Fastrpc represents compute context banks available on the dsp.
> +
> +    properties:
> +      compatible:
> +        items:

Drop items

> +          - const: qcom,fastrpc-compute-cb
> +
> +      reg:
> +        maxItems: 1
> +
> +      qcom,nsession:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        default: 1
> +        description: >
> +          A value indicating how many sessions can share this context bank.
> +
> +    required:
> +      - compatible
> +      - reg
> +
> +required:
> +  - compatible
> +  - label
> +  - '#address-cells'
> +  - '#size-cells'

Use consistent quotes, either ' or "



Best regards,
Krzysztof
Abel Vesa Sept. 6, 2022, 8:29 a.m. UTC | #3
On 22-09-06 08:45:22, Krzysztof Kozlowski wrote:
> On 05/09/2022 16:45, Abel Vesa 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.
> > 
> > Use compute-cb@ subnodes instead of just cb@.
> > 
> > Also add qcom,non-secure-domain, qcom,glink-channels and
> > qcom,smd-channels missing properties to make sure dtbs_check doesn't
> > fail right off the bat.
> 
> qcom,non-secure-domain is in original binding, so I don't understand why
> it is being "added".
> 

Yeah, my bad, I should've added this line to the changes since v4.

> > 
> > Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Co-developed-by: David Heidelberg <david@ixit.cz>
> > Signed-off-by: David Heidelberg <david@ixit.cz>
> > Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> > ---
> > 
> > Changes since v6:
> >  * renamed the parent node name in the example from smd-edge to glink-edge
> > 
> >  .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
> >  .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++
> 
> As you can see in Rob's bot report - the patchset introduces errors and
> is not bisectable.

Please note that Rob's bot report is for v6.

v7 fixes the errors reported, by using glink-edge instead of smd-edge.

Looking at all QCOM SoCs that have fastrpc node in devicetree, they all
seem to be using glink-edge.

> 
> You also need to fix qcom,glink-edge.yaml
> 

I don't see why, with the changes I made in v7, there are no errors
anymore.

> >  2 files changed, 118 insertions(+), 88 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 5ec124b138a6..000000000000
> > --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
> > +++ /dev/null
> > @@ -1,88 +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"
> > -
> > -- qcom,non-secure-domain:
> > -	Usage: required
> > -	Value type: <boolean>
> > -	Definition: Property to specify that dsp domain is non-secure.
> > -
> > -- qcom,vmids:
> > -	Usage: optional
> > -	Value type: <u32 array>
> > -	Definition: Virtual machine IDs for remote processor.
> 
> You miss qcom,vmids in the conversion.
> 
> > -
> > -- #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..2b446272cc14
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
> > @@ -0,0 +1,118 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only 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 FastRPC Driver
> > +
> > +maintainers:
> > +  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > +
> > +description: |
> > +  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.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> 
> no "items", as it is not a list.
> 
> > +      - const: qcom,fastrpc
> > +
> > +  label:
> > +    items:
> 
> ditto (plus this actually does not define even how many items)
> 
> > +      enum:
> > +        - adsp
> > +        - mdsp
> > +        - sdsp
> > +        - cdsp
> > +
> > +  qcom,glink-channels:
> > +    description:
> > +      A list of channels tied to this function, used for matching
> > +      the function to a set of virtual channels.
> > +    $ref: "/schemas/types.yaml#/definitions/string-array"
> 
> maxItems: 1
> 
> > +
> > +  qcom,non-secure-domain:
> > +    description:
> > +      Used to mark the current domain as non-secure.
> > +    type: boolean
> > +
> > +  qcom,smd-channels:
> > +    description:
> > +      Channel name used for the RPM communication
> > +    $ref: "/schemas/types.yaml#/definitions/string-array"
> 
> maxItems: 1
> 
> 
> > +
> > +  '#address-cells':
> > +    const: 1
> > +
> > +  '#size-cells':
> > +    const: 0
> > +
> > +patternProperties:
> > +  "(compute-)?cb@[0-9]*$":
> > +    type: object
> > +
> > +    description: >
> > +      Each subnode of the Fastrpc represents compute context banks available on the dsp.
> > +
> > +    properties:
> > +      compatible:
> > +        items:
> 
> Drop items
> 
> > +          - const: qcom,fastrpc-compute-cb
> > +
> > +      reg:
> > +        maxItems: 1
> > +
> > +      qcom,nsession:
> > +        $ref: /schemas/types.yaml#/definitions/uint32
> > +        default: 1
> > +        description: >
> > +          A value indicating how many sessions can share this context bank.
> > +
> > +    required:
> > +      - compatible
> > +      - reg
> > +
> > +required:
> > +  - compatible
> > +  - label
> > +  - '#address-cells'
> > +  - '#size-cells'
> 
> Use consistent quotes, either ' or "
> 
> 
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski Sept. 6, 2022, 8:36 a.m. UTC | #4
On 06/09/2022 10:29, Abel Vesa wrote:
> On 22-09-06 08:45:22, Krzysztof Kozlowski wrote:
>> On 05/09/2022 16:45, Abel Vesa 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.
>>>
>>> Use compute-cb@ subnodes instead of just cb@.
>>>
>>> Also add qcom,non-secure-domain, qcom,glink-channels and
>>> qcom,smd-channels missing properties to make sure dtbs_check doesn't
>>> fail right off the bat.
>>
>> qcom,non-secure-domain is in original binding, so I don't understand why
>> it is being "added".
>>
> 
> Yeah, my bad, I should've added this line to the changes since v4.
> 
>>>
>>> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> Co-developed-by: David Heidelberg <david@ixit.cz>
>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
>>> ---
>>>
>>> Changes since v6:
>>>  * renamed the parent node name in the example from smd-edge to glink-edge
>>>
>>>  .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
>>>  .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++
>>
>> As you can see in Rob's bot report - the patchset introduces errors and
>> is not bisectable.
> 
> Please note that Rob's bot report is for v6.

I see report as a reply to this patch, so for v7. Why do you think it is v6?

> 
> v7 fixes the errors reported, by using glink-edge instead of smd-edge.
> 
> Looking at all QCOM SoCs that have fastrpc node in devicetree, they all
> seem to be using glink-edge.

I was not talking about these errors (they were separate issue). I am
talking about wrong path error.

> 
>>
>> You also need to fix qcom,glink-edge.yaml
>>
> 
> I don't see why, with the changes I made in v7, there are no errors
> anymore.

There are, but not from tooling. The error is wrong path. It should be
converted to proper schema $ref.

Best regards,
Krzysztof
Abel Vesa Sept. 6, 2022, 8:46 a.m. UTC | #5
On 22-09-06 10:36:14, Krzysztof Kozlowski wrote:
> On 06/09/2022 10:29, Abel Vesa wrote:
> > On 22-09-06 08:45:22, Krzysztof Kozlowski wrote:
> >> On 05/09/2022 16:45, Abel Vesa 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.
> >>>
> >>> Use compute-cb@ subnodes instead of just cb@.
> >>>
> >>> Also add qcom,non-secure-domain, qcom,glink-channels and
> >>> qcom,smd-channels missing properties to make sure dtbs_check doesn't
> >>> fail right off the bat.
> >>
> >> qcom,non-secure-domain is in original binding, so I don't understand why
> >> it is being "added".
> >>
> > 
> > Yeah, my bad, I should've added this line to the changes since v4.
> > 
> >>>
> >>> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >>> Co-developed-by: David Heidelberg <david@ixit.cz>
> >>> Signed-off-by: David Heidelberg <david@ixit.cz>
> >>> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> >>> ---
> >>>
> >>> Changes since v6:
> >>>  * renamed the parent node name in the example from smd-edge to glink-edge
> >>>
> >>>  .../devicetree/bindings/misc/qcom,fastrpc.txt |  88 -------------
> >>>  .../bindings/misc/qcom,fastrpc.yaml           | 118 ++++++++++++++++++
> >>
> >> As you can see in Rob's bot report - the patchset introduces errors and
> >> is not bisectable.
> > 
> > Please note that Rob's bot report is for v6.
> 
> I see report as a reply to this patch, so for v7. Why do you think it is v6?

Oh, didn't see Rob's bot reply to v7 before.

> 
> > 
> > v7 fixes the errors reported, by using glink-edge instead of smd-edge.
> > 
> > Looking at all QCOM SoCs that have fastrpc node in devicetree, they all
> > seem to be using glink-edge.
> 
> I was not talking about these errors (they were separate issue). I am
> talking about wrong path error.
> 

Yes, got it now. Will resend.

> > 
> >>
> >> You also need to fix qcom,glink-edge.yaml
> >>
> > 
> > I don't see why, with the changes I made in v7, there are no errors
> > anymore.
> 
> There are, but not from tooling. The error is wrong path. It should be
> converted to proper schema $ref.

Sure. Will do.

Thanks!

> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt b/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
deleted file mode 100644
index 5ec124b138a6..000000000000
--- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
+++ /dev/null
@@ -1,88 +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"
-
-- qcom,non-secure-domain:
-	Usage: required
-	Value type: <boolean>
-	Definition: Property to specify that dsp domain is non-secure.
-
-- qcom,vmids:
-	Usage: optional
-	Value type: <u32 array>
-	Definition: Virtual machine IDs for remote processor.
-
-- #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..2b446272cc14
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
@@ -0,0 +1,118 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only 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 FastRPC Driver
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  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.
+
+properties:
+  compatible:
+    items:
+      - const: qcom,fastrpc
+
+  label:
+    items:
+      enum:
+        - adsp
+        - mdsp
+        - sdsp
+        - cdsp
+
+  qcom,glink-channels:
+    description:
+      A list of channels tied to this function, used for matching
+      the function to a set of virtual channels.
+    $ref: "/schemas/types.yaml#/definitions/string-array"
+
+  qcom,non-secure-domain:
+    description:
+      Used to mark the current domain as non-secure.
+    type: boolean
+
+  qcom,smd-channels:
+    description:
+      Channel name used for the RPM communication
+    $ref: "/schemas/types.yaml#/definitions/string-array"
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+patternProperties:
+  "(compute-)?cb@[0-9]*$":
+    type: object
+
+    description: >
+      Each subnode of the Fastrpc represents compute context banks available on the dsp.
+
+    properties:
+      compatible:
+        items:
+          - const: qcom,fastrpc-compute-cb
+
+      reg:
+        maxItems: 1
+
+      qcom,nsession:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        default: 1
+        description: >
+          A value indicating how many sessions can share this context bank.
+
+    required:
+      - compatible
+      - reg
+
+required:
+  - compatible
+  - label
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/mailbox/qcom-ipcc.h>
+
+    glink-edge {
+        interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+                                     IPCC_MPROC_SIGNAL_GLINK_QMP
+                                     IRQ_TYPE_EDGE_RISING>;
+        mboxes = <&ipcc IPCC_CLIENT_LPASS
+                        IPCC_MPROC_SIGNAL_GLINK_QMP>;
+        label = "lpass";
+        qcom,remote-pid = <2>;
+
+        fastrpc {
+            compatible = "qcom,fastrpc";
+            label = "adsp";
+            qcom,smd-channels = "fastrpcsmd-apps-dsp";
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            compute-cb@1 {
+                compatible = "qcom,fastrpc-compute-cb";
+                reg = <1>;
+            };
+
+            compute-cb@2 {
+                compatible = "qcom,fastrpc-compute-cb";
+                reg = <2>;
+            };
+        };
+    };