Message ID | 20211018114046.25571-1-etienne.carriere@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/2] dt-bindings: arm: Add OP-TEE transport for SCMI | expand |
On Mon, 18 Oct 2021 13:40:45 +0200, Etienne Carriere wrote: > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > based on an OP-TEE service invocation. The compatible mandates a > channel ID defined with property "linaro,optee-channel-id". > > Cc: devicetree@vger.kernel.org > Cc: Rob Herring <robh+dt@kernel.org> > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> > --- > Changes since v2: > - Define mandatory property linaro,optee-channel-id > - Rebased on yaml description file > > Changes since v1: > - Removed modification regarding mboxes property description. > --- > .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ > 1 file changed, 44 insertions(+) > 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: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'description' is a required property hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: 'type' is a required property hint: A vendor boolean property can use "type: boolean" Additional properties are not allowed ('maxItems' was unexpected) hint: A vendor boolean property can use "type: boolean" /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: 'enum' is a required property 'const' is a required property hint: A vendor string property with exact values has an implicit type from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: '$ref' is a required property 'allOf' is a required property hint: A vendor property needs a $ref to types.yaml from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: ignoring, error in schema: patternProperties: ^protocol@[0-9a-f]+$: properties: linaro,optee-channel-id warning: no schema found in file: ./Documentation/devicetree/bindings/firmware/arm,scmi.yaml Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml:0:0: /example-1/firmware/scmi: failed to match any schema with compatible: ['arm,scmi'] Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:175.39-178.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@14: Duplicate label 'scmi_clk' on /example-2/firmware/scmi/protocol@14 and /example-0/firmware/scmi/protocol@14 Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:180.40-186.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@13: Duplicate label 'scmi_dvfs' on /example-2/firmware/scmi/protocol@13 and /example-0/firmware/scmi/protocol@13 ERROR: Input tree has errors, aborting (use -f to force output) make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1441: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/1542547 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.
On Mon, Oct 18, 2021 at 01:40:45PM +0200, Etienne Carriere wrote: > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > based on an OP-TEE service invocation. The compatible mandates a > channel ID defined with property "linaro,optee-channel-id". > > Cc: devicetree@vger.kernel.org > Cc: Rob Herring <robh+dt@kernel.org> > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> > --- > Changes since v2: > - Define mandatory property linaro,optee-channel-id > - Rebased on yaml description file > > Changes since v1: > - Removed modification regarding mboxes property description. > --- > .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ > 1 file changed, 44 insertions(+) > > diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > index 5c4c6782e052..12154ecc081b 100644 > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > @@ -38,6 +38,9 @@ properties: > The virtio transport only supports a single device. > items: > - const: arm,scmi-virtio > + - description: SCMI compliant firmware with OP-TEE transport > + items: > + - const: linaro,scmi-optee > > interrupts: > description: > @@ -83,6 +86,11 @@ properties: > description: > SMC id required when using smc or hvc transports > > + linaro,optee-channel-id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Channel id required when using OP-TEE transports > + > protocol@11: > type: object > properties: > @@ -195,6 +203,9 @@ patternProperties: > minItems: 1 > maxItems: 2 > > + linaro,optee-channel-id: > + maxItems: 1 Why is the same property in 2 different spots? That doesn't seem ideal. Unfortunately, you have to duplicate the definition. > + > required: > - reg > > @@ -226,6 +237,16 @@ else: > - arm,smc-id > - shmem > > + else: > + if: > + properties: > + compatible: > + contains: > + const: linaro,scmi-optee > + then: > + required: > + - linaro,optee-channel-id > + > examples: > - | > firmware { > @@ -340,7 +361,30 @@ examples: > reg = <0x11>; > #power-domain-cells = <1>; > }; > + }; > + }; > + > + - | > + firmware { > + scmi { > + compatible = "linaro,scmi-optee"; > + linaro,optee-channel = <0>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + scmi_clk: protocol@14 { > + reg = <0x14>; > + #clock-cells = <1>; > + }; > + > + scmi_dvfs: protocol@13 { > + reg = <0x13>; > > + #clock-cells = <1>; > + linaro,optee-channel = <1>; > + shmem = <&cpu_scp_hpri0>; > + }; > }; > }; > > -- > 2.17.1 > >
On Mon, 18 Oct 2021 at 19:40, Rob Herring <robh@kernel.org> wrote: > > On Mon, Oct 18, 2021 at 01:40:45PM +0200, Etienne Carriere wrote: > > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > > based on an OP-TEE service invocation. The compatible mandates a > > channel ID defined with property "linaro,optee-channel-id". > > > > Cc: devicetree@vger.kernel.org > > Cc: Rob Herring <robh+dt@kernel.org> > > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> > > --- > > Changes since v2: > > - Define mandatory property linaro,optee-channel-id > > - Rebased on yaml description file > > > > Changes since v1: > > - Removed modification regarding mboxes property description. > > --- > > .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > index 5c4c6782e052..12154ecc081b 100644 > > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > @@ -38,6 +38,9 @@ properties: > > The virtio transport only supports a single device. > > items: > > - const: arm,scmi-virtio > > + - description: SCMI compliant firmware with OP-TEE transport > > + items: > > + - const: linaro,scmi-optee > > > > interrupts: > > description: > > @@ -83,6 +86,11 @@ properties: > > description: > > SMC id required when using smc or hvc transports > > > > + linaro,optee-channel-id: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + Channel id required when using OP-TEE transports > > + > > protocol@11: > > type: object > > properties: > > @@ -195,6 +203,9 @@ patternProperties: > > minItems: 1 > > maxItems: 2 > > > > + linaro,optee-channel-id: > > + maxItems: 1 > > Why is the same property in 2 different spots? That doesn't seem ideal. > > Unfortunately, you have to duplicate the definition. Property linaro,optee-channel-id for compatible linaro,scmi-optee is like properties mboxes and shmem for compatibile arm,scmi. There are mandated in the scmi node and are optional in its subnodes: an scmi protocol (a subnode), can have a dedicated scmi channel. The yaml description is expected to reflect that. Regards, Etienne > > > + > > required: > > - reg > > > > @@ -226,6 +237,16 @@ else: > > - arm,smc-id > > - shmem > > > > + else: > > + if: > > + properties: > > + compatible: > > + contains: > > + const: linaro,scmi-optee > > + then: > > + required: > > + - linaro,optee-channel-id > > + > > examples: > > - | > > firmware { > > @@ -340,7 +361,30 @@ examples: > > reg = <0x11>; > > #power-domain-cells = <1>; > > }; > > + }; > > + }; > > + > > + - | > > + firmware { > > + scmi { > > + compatible = "linaro,scmi-optee"; > > + linaro,optee-channel = <0>; > > + > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + scmi_clk: protocol@14 { > > + reg = <0x14>; > > + #clock-cells = <1>; > > + }; > > + > > + scmi_dvfs: protocol@13 { > > + reg = <0x13>; > > > > + #clock-cells = <1>; > > + linaro,optee-channel = <1>; > > + shmem = <&cpu_scp_hpri0>; > > + }; > > }; > > }; > > > > -- > > 2.17.1 > > > >
Hello Rob, On Mon, 18 Oct 2021 at 19:32, Rob Herring <robh@kernel.org> wrote: > > On Mon, 18 Oct 2021 13:40:45 +0200, Etienne Carriere wrote: > > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > > based on an OP-TEE service invocation. The compatible mandates a > > channel ID defined with property "linaro,optee-channel-id". > > > > Cc: devicetree@vger.kernel.org > > Cc: Rob Herring <robh+dt@kernel.org> > > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> > > --- > > Changes since v2: > > - Define mandatory property linaro,optee-channel-id > > - Rebased on yaml description file > > > > Changes since v1: > > - Removed modification regarding mboxes property description. > > --- > > .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > > > 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: > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'description' is a required property > hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > 'type' is a required property > hint: A vendor boolean property can use "type: boolean" > Additional properties are not allowed ('maxItems' was unexpected) > hint: A vendor boolean property can use "type: boolean" > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > 'enum' is a required property > 'const' is a required property > hint: A vendor string property with exact values has an implicit type > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > '$ref' is a required property > 'allOf' is a required property > hint: A vendor property needs a $ref to types.yaml > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: ignoring, error in schema: patternProperties: ^protocol@[0-9a-f]+$: properties: linaro,optee-channel-id > warning: no schema found in file: ./Documentation/devicetree/bindings/firmware/arm,scmi.yaml > Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml:0:0: /example-1/firmware/scmi: failed to match any schema with compatible: ['arm,scmi'] > Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:175.39-178.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@14: Duplicate label 'scmi_clk' on /example-2/firmware/scmi/protocol@14 and /example-0/firmware/scmi/protocol@14 > Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:180.40-186.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@13: Duplicate label 'scmi_dvfs' on /example-2/firmware/scmi/protocol@13 and /example-0/firmware/scmi/protocol@13 > ERROR: Input tree has errors, aborting (use -f to force output) > make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml] Error 2 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1441: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/patch/1542547 > > 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. > Thanks for the feedback and guidelines. I've played a bit with dt checker and saw that description/type/etc.. are not needed when the property name does not include a coma ','. I think i'll use "optee-channel-id" instead of "linaro,optee-channel-id" as property name. With that name, 'make dt_binding_check' passes without complains on arm,scmi.yaml. I have no strong preference and here and can go either ways. I though the "linaro," was expected. Please tell me if there's any reason I need to preserve this "linaro," prefix on that property. Regards, Etienne
Hi again, On Wed, 20 Oct 2021 at 17:52, Etienne Carriere <etienne.carriere@linaro.org> wrote: > > Hello Rob, > > > On Mon, 18 Oct 2021 at 19:32, Rob Herring <robh@kernel.org> wrote: > > > > On Mon, 18 Oct 2021 13:40:45 +0200, Etienne Carriere wrote: > > > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > > > based on an OP-TEE service invocation. The compatible mandates a > > > channel ID defined with property "linaro,optee-channel-id". > > > > > > Cc: devicetree@vger.kernel.org > > > Cc: Rob Herring <robh+dt@kernel.org> > > > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> > > > --- > > > Changes since v2: > > > - Define mandatory property linaro,optee-channel-id > > > - Rebased on yaml description file > > > > > > Changes since v1: > > > - Removed modification regarding mboxes property description. > > > --- > > > .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ > > > 1 file changed, 44 insertions(+) > > > > > > > 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: > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'description' is a required property > > hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. > > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > > 'type' is a required property > > hint: A vendor boolean property can use "type: boolean" > > Additional properties are not allowed ('maxItems' was unexpected) > > hint: A vendor boolean property can use "type: boolean" > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > > 'enum' is a required property > > 'const' is a required property > > hint: A vendor string property with exact values has an implicit type > > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: patternProperties:^protocol@[0-9a-f]+$:properties:linaro,optee-channel-id: 'oneOf' conditional failed, one must be fixed: > > '$ref' is a required property > > 'allOf' is a required property > > hint: A vendor property needs a $ref to types.yaml > > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > > hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. > > from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/arm,scmi.yaml: ignoring, error in schema: patternProperties: ^protocol@[0-9a-f]+$: properties: linaro,optee-channel-id > > warning: no schema found in file: ./Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml:0:0: /example-1/firmware/scmi: failed to match any schema with compatible: ['arm,scmi'] > > Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:175.39-178.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@14: Duplicate label 'scmi_clk' on /example-2/firmware/scmi/protocol@14 and /example-0/firmware/scmi/protocol@14 > > Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:180.40-186.19: ERROR (duplicate_label): /example-2/firmware/scmi/protocol@13: Duplicate label 'scmi_dvfs' on /example-2/firmware/scmi/protocol@13 and /example-0/firmware/scmi/protocol@13 > > ERROR: Input tree has errors, aborting (use -f to force output) > > make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml] Error 2 > > make[1]: *** Waiting for unfinished jobs.... > > make: *** [Makefile:1441: dt_binding_check] Error 2 > > > > doc reference errors (make refcheckdocs): > > > > See https://patchwork.ozlabs.org/patch/1542547 > > > > 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. > > > > Thanks for the feedback and guidelines. I've played a bit with dt > checker and saw that description/type/etc.. are not needed when the > property name does not include a coma ','. > > I think i'll use "optee-channel-id" instead of > "linaro,optee-channel-id" as property name. > With that name, 'make dt_binding_check' passes without complains on > arm,scmi.yaml. > I have no strong preference and here and can go either ways. Discard my comment. I'll preserve the linaro, vendor prefix. This property is all but generic. I"ll add a clean description where needed and run dt_checker against. Sorry for the noise. Regards, Etienne > > I though the "linaro," was expected. > Please tell me if there's any reason I need to preserve this "linaro," > prefix on that property. > > Regards, > Etienne
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index 5c4c6782e052..12154ecc081b 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -38,6 +38,9 @@ properties: The virtio transport only supports a single device. items: - const: arm,scmi-virtio + - description: SCMI compliant firmware with OP-TEE transport + items: + - const: linaro,scmi-optee interrupts: description: @@ -83,6 +86,11 @@ properties: description: SMC id required when using smc or hvc transports + linaro,optee-channel-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Channel id required when using OP-TEE transports + protocol@11: type: object properties: @@ -195,6 +203,9 @@ patternProperties: minItems: 1 maxItems: 2 + linaro,optee-channel-id: + maxItems: 1 + required: - reg @@ -226,6 +237,16 @@ else: - arm,smc-id - shmem + else: + if: + properties: + compatible: + contains: + const: linaro,scmi-optee + then: + required: + - linaro,optee-channel-id + examples: - | firmware { @@ -340,7 +361,30 @@ examples: reg = <0x11>; #power-domain-cells = <1>; }; + }; + }; + + - | + firmware { + scmi { + compatible = "linaro,scmi-optee"; + linaro,optee-channel = <0>; + + #address-cells = <1>; + #size-cells = <0>; + + scmi_clk: protocol@14 { + reg = <0x14>; + #clock-cells = <1>; + }; + + scmi_dvfs: protocol@13 { + reg = <0x13>; + #clock-cells = <1>; + linaro,optee-channel = <1>; + shmem = <&cpu_scp_hpri0>; + }; }; };
Introduce compatible "linaro,scmi-optee" for SCMI transport channel based on an OP-TEE service invocation. The compatible mandates a channel ID defined with property "linaro,optee-channel-id". Cc: devicetree@vger.kernel.org Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> --- Changes since v2: - Define mandatory property linaro,optee-channel-id - Rebased on yaml description file Changes since v1: - Removed modification regarding mboxes property description. --- .../bindings/firmware/arm,scmi.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+)