Message ID | 20240425213701.655540-7-eajames@linux.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | ARM: dts: aspeed: Add IBM P11 BMC Boards | expand |
On Thu, 25 Apr 2024 16:36:53 -0500, Eddie James wrote: > Since there are multiple FSI controllers documented, the common > properties should be documented separately and then referenced > from the specific controller documentation. > > Signed-off-by: Eddie James <eajames@linux.ibm.com> > --- > .../bindings/fsi/fsi-controller.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/fsi/fsi-controller.example.dtb: /example-0/fsi@3400: failed to match any schema with compatible: ['fsi-controller'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240425213701.655540-7-eajames@linux.ibm.com 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 25/04/2024 23:36, Eddie James wrote: > Since there are multiple FSI controllers documented, the common > properties should be documented separately and then referenced > from the specific controller documentation. > > Signed-off-by: Eddie James <eajames@linux.ibm.com> > --- > + > + no-scan-on-init: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + The FSI controller cannot scan the bus during initialization. > + > +patternProperties: > + "cfam@[0-9a-f],[0-9a-f]": > + type: object > + properties: > + chip-id: > + $ref: /schemas/types.yaml#/definitions/uint32 Missing description > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + required: > + - reg > + > + additionalProperties: true> + > +additionalProperties: true > + > +examples: > + - | > + fsi@3400 { > + #address-cells = <2>; > + #size-cells = <0>; > + compatible = "fsi-controller"; No, there is no such compatible here. > + reg = <0x3400 0x400>; Neither reg. Also, keep order of properties matching DTS coding style. Best regards, Krzysztof
On 4/26/24 01:23, Krzysztof Kozlowski wrote: > On 25/04/2024 23:36, Eddie James wrote: >> Since there are multiple FSI controllers documented, the common >> properties should be documented separately and then referenced >> from the specific controller documentation. >> >> Signed-off-by: Eddie James <eajames@linux.ibm.com> >> --- > >> + >> + no-scan-on-init: >> + $ref: /schemas/types.yaml#/definitions/flag >> + description: >> + The FSI controller cannot scan the bus during initialization. >> + >> +patternProperties: >> + "cfam@[0-9a-f],[0-9a-f]": >> + type: object >> + properties: >> + chip-id: >> + $ref: /schemas/types.yaml#/definitions/uint32 > Missing description Ack'd, and comments below > >> + >> + reg: >> + maxItems: 1 >> + >> + "#address-cells": >> + const: 1 >> + >> + "#size-cells": >> + const: 1 >> + >> + required: >> + - reg >> + >> + additionalProperties: true> + >> +additionalProperties: true >> + >> +examples: >> + - | >> + fsi@3400 { >> + #address-cells = <2>; >> + #size-cells = <0>; >> + compatible = "fsi-controller"; > No, there is no such compatible here. > >> + reg = <0x3400 0x400>; > Neither reg. > > Also, keep order of properties matching DTS coding style. > > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/fsi/fsi-controller.yaml b/Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file mode 100644 index 000000000000..9e917295996d --- /dev/null +++ b/Documentation/devicetree/bindings/fsi/fsi-controller.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/fsi/fsi-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: FSI Controller Common Properties + +maintainers: + - Eddie James <eajames@linux.ibm.com> + +description: + FSI (FRU (Field Replaceable Unit) Service Interface) is a two wire bus. The + FSI bus is connected to a CFAM (Common FRU Access Macro) which contains + various engines such as I2C controllers, SPI controllers, etc. + +properties: + "#address-cells": + const: 2 + + "#size-cells": + const: 0 + + no-scan-on-init: + $ref: /schemas/types.yaml#/definitions/flag + description: + The FSI controller cannot scan the bus during initialization. + +patternProperties: + "cfam@[0-9a-f],[0-9a-f]": + type: object + properties: + chip-id: + $ref: /schemas/types.yaml#/definitions/uint32 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + required: + - reg + + additionalProperties: true + +additionalProperties: true + +examples: + - | + fsi@3400 { + #address-cells = <2>; + #size-cells = <0>; + compatible = "fsi-controller"; + reg = <0x3400 0x400>; + + cfam@0,0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0 0>; + }; + };
Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation. Signed-off-by: Eddie James <eajames@linux.ibm.com> --- .../bindings/fsi/fsi-controller.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml