Message ID | 20230120141002.2442-3-ysionneau@kalray.eu (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Upstream kvx Linux port | expand |
On Fri, 20 Jan 2023 15:09:33 +0100, Yann Sionneau wrote: > From: Jules Maselbas <jmaselbas@kalray.eu> > > Add documentation for `kalray,kv3-1-core-intc` binding. > > Co-developed-by: Jules Maselbas <jmaselbas@kalray.eu> > Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> > Signed-off-by: Yann Sionneau <ysionneau@kalray.eu> > --- > > Notes: > V1 -> V2: new patch > > .../kalray,kv3-1-core-intc.yaml | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.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: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties:reg:maxItems: 0 is less than the minimum of 1 from schema $id: http://devicetree.org/meta-schemas/keywords.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: $id: 'http://devicetree.org/schemas/interrupt-controller/kalray,kv3-1-core-intc#' does not match 'http://devicetree.org/schemas/.*\\.yaml#' from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: 'maintainers' is a required property hint: Metaschema for devicetree binding documentation from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: 'oneOf' conditional failed, one must be fixed: 'unevaluatedProperties' is a required property 'additionalProperties' is a required property hint: Either unevaluatedProperties or additionalProperties must be present from schema $id: http://devicetree.org/meta-schemas/core.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties:reg: 'anyOf' conditional failed, one must be fixed: 'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf'] 1 was expected hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values. 0 is less than the minimum of 2 hint: Arrays must be described with a combination of minItems/maxItems/items hint: cell array properties must define how many entries and what the entries are when there is more than one entry. from schema $id: http://devicetree.org/meta-schemas/core.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties: 'anyOf' conditional failed, one must be fixed: 'interrupt-controller' is a required property 'interrupt-map' is a required property from schema $id: http://devicetree.org/meta-schemas/interrupts.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties:kalray,intc-nr-irqs: 'oneOf' conditional failed, one must be fixed: 'type' is a required property hint: A vendor boolean property can use "type: boolean" /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties:kalray,intc-nr-irqs: '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/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: properties:kalray,intc-nr-irqs: '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# ./Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/interrupt-controller/kalray,kv3-1-core-intc.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230120141002.2442-3-ysionneau@kalray.eu The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. 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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 20/01/2023 15:09, Yann Sionneau wrote: > From: Jules Maselbas <jmaselbas@kalray.eu> Use subject prefixes matching the subsystem (which you can get for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching). > > Add documentation for `kalray,kv3-1-core-intc` binding. > > Co-developed-by: Jules Maselbas <jmaselbas@kalray.eu> > Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> > Signed-off-by: Yann Sionneau <ysionneau@kalray.eu> > --- > > Notes: > V1 -> V2: new patch > > .../kalray,kv3-1-core-intc.yaml | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > new file mode 100644 > index 000000000000..1e3d0593173a > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/interrupt-controller/kalray,kv3-1-core-intc# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Kalray kv3-1 Core Interrupt Controller > + > +description: | > + The Kalray Core Interrupt Controller is tightly integrated in each kv3 core > + present in the Coolidge SoC. > + > + It provides the following features: > + - 32 independent interrupt sources > + - 2-bit configurable priority level > + - 2-bit configurable ownership level > + > +allOf: > + - $ref: /schemas/interrupt-controller.yaml# > + > +properties: > + compatible: > + const: kalray,kv3-1-core-intc Blank line between each of these, > + "#interrupt-cells": > + const: 1 > + description: > + The IRQ number. > + reg: > + maxItems: 0 ??? No way... What's this? > + "kalray,intc-nr-irqs": Drop quotes. > + description: Number of irqs handled by the controller. Why this is variable per board? Why do you need it ? > + > +required: > + - compatible > + - "#interrupt-cells" > + - interrupt-controller missing additionalProperties: false This binding looks poor, like you started from something odd. Please don't. Take the newest reviewed binding or better example-schema and use it to build yours. This would solve several trivial mistakes and style issues. > + > +examples: > + - | > + intc: interrupt-controller { What's the IO address space? Best regards, Krzysztof
Hi Krzysztof, On Sun, Jan 22, 2023 at 12:44:46PM +0100, Krzysztof Kozlowski wrote: > On 20/01/2023 15:09, Yann Sionneau wrote: > > From: Jules Maselbas <jmaselbas@kalray.eu> > > Use subject prefixes matching the subsystem (which you can get for > example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > your patch is touching). This will be fixed, sorry for the inconvenience. > > > > > Add documentation for `kalray,kv3-1-core-intc` binding. > > > > Co-developed-by: Jules Maselbas <jmaselbas@kalray.eu> > > Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> > > Signed-off-by: Yann Sionneau <ysionneau@kalray.eu> > > --- > > > > Notes: > > V1 -> V2: new patch > > > > .../kalray,kv3-1-core-intc.yaml | 46 +++++++++++++++++++ > > 1 file changed, 46 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > > new file mode 100644 > > index 000000000000..1e3d0593173a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml > > @@ -0,0 +1,46 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/interrupt-controller/kalray,kv3-1-core-intc# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Kalray kv3-1 Core Interrupt Controller > > + > > +description: | > > + The Kalray Core Interrupt Controller is tightly integrated in each kv3 core > > + present in the Coolidge SoC. > > + > > + It provides the following features: > > + - 32 independent interrupt sources > > + - 2-bit configurable priority level > > + - 2-bit configurable ownership level > > + > > +allOf: > > + - $ref: /schemas/interrupt-controller.yaml# > > + > > +properties: > > + compatible: > > + const: kalray,kv3-1-core-intc > > Blank line between each of these, Ack > > + "#interrupt-cells": > > + const: 1 > > + description: > > + The IRQ number. > > + reg: > > + maxItems: 0 > > ??? No way... What's this? This (per CPU) interrupt controller is not memory mapped at all, it is controlled and configured through system registers. I do not have found existing .yaml bindings for such devices, only the file snps,archs-intc.txt has something similar. I do not know what is the best way to represent such devices in the device-tree. Any suggestions are welcome. > > > + "kalray,intc-nr-irqs": > > Drop quotes. > > > + description: Number of irqs handled by the controller. > > Why this is variable per board? Why do you need it ? This property is not even used in our device-tree, this will be removed from the documentation and from the driver as well. > > + > > +required: > > + - compatible > > + - "#interrupt-cells" > > + - interrupt-controller > > missing additionalProperties: false > > This binding looks poor, like you started from something odd. Please > don't. Take the newest reviewed binding or better example-schema and use > it to build yours. This would solve several trivial mistakes and style > issues. I am starting over from the example-schema. > > + > > +examples: > > + - | > > + intc: interrupt-controller { > > What's the IO address space? As said above, this is not a memory mapped device, but is accessed through system registers. Thanks, -- Jules
On 26/01/2023 17:10, Jules Maselbas wrote: >>> + reg: >>> + maxItems: 0 >> >> ??? No way... What's this? > This (per CPU) interrupt controller is not memory mapped at all, it is > controlled and configured through system registers. > > I do not have found existing .yaml bindings for such devices, only the > file snps,archs-intc.txt has something similar. > > I do not know what is the best way to represent such devices in the > device-tree. Any suggestions are welcome. You cannot have an array property with 0 items. How would it look like in DTS? There are many, many bindings which are expressing it. Just drop the reg. > >> >>> + "kalray,intc-nr-irqs": >> >> Drop quotes. >> >>> + description: Number of irqs handled by the controller. >> >> Why this is variable per board? Why do you need it ? > This property is not even used in our device-tree, this will be removed > from the documentation and from the driver as well. > >>> + >>> +required: >>> + - compatible >>> + - "#interrupt-cells" >>> + - interrupt-controller >> >> missing additionalProperties: false >> >> This binding looks poor, like you started from something odd. Please >> don't. Take the newest reviewed binding or better example-schema and use >> it to build yours. This would solve several trivial mistakes and style >> issues. > I am starting over from the example-schema. > >>> + >>> +examples: >>> + - | >>> + intc: interrupt-controller { >> >> What's the IO address space? > As said above, this is not a memory mapped device, but is accessed > through system registers. Sure, but then you cannot define a reg which was confusing... Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml new file mode 100644 index 000000000000..1e3d0593173a --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/kalray,kv3-1-core-intc.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/kalray,kv3-1-core-intc# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kalray kv3-1 Core Interrupt Controller + +description: | + The Kalray Core Interrupt Controller is tightly integrated in each kv3 core + present in the Coolidge SoC. + + It provides the following features: + - 32 independent interrupt sources + - 2-bit configurable priority level + - 2-bit configurable ownership level + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + const: kalray,kv3-1-core-intc + "#interrupt-cells": + const: 1 + description: + The IRQ number. + reg: + maxItems: 0 + "kalray,intc-nr-irqs": + description: Number of irqs handled by the controller. + +required: + - compatible + - "#interrupt-cells" + - interrupt-controller + +examples: + - | + intc: interrupt-controller { + compatible = "kalray,kv3-1-core-intc"; + #interrupt-cells = <1>; + interrupt-controller; + }; + +...