Message ID | 20221207055405.30940-1-hayashi.kunihiko@socionext.com |
---|---|
Headers | show |
Series | dt-bindings: soc: Introduce UniPhier miscellaneous register blocks and fix examples | expand |
On Wed, 07 Dec 2022 14:54:04 +0900, Kunihiko Hayashi wrote: > Add DT binding schema for components belonging to the platform-specific > DWC3 USB glue layer implemented in UniPhier SoCs. > > This USB glue layer works as a sideband logic for the host controller, > including core reset, vbus control, PHYs, and some signals to the > controller. > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > .../socionext,uniphier-dwc3-glue.yaml | 106 ++++++++++++++++++ > 1 file changed, 106 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.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/phy/socionext,uniphier-usb3hs-phy.example.dtb: usb-glue@65b00000: 'reg' is a required property From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/socionext,uniphier-usb3hs-phy.example.dtb: usb-glue@65b00000: 'hs-phy@200' does not match any of the regexes: '^phy@[0-9a-f]+$', '^regulator@[0-9a-f]+$', '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+' From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/socionext,uniphier-usb3ss-phy.example.dtb: usb-glue@65b00000: 'reg' is a required property From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/socionext,uniphier-usb3ss-phy.example.dtb: usb-glue@65b00000: 'ss-phy@300' does not match any of the regexes: '^phy@[0-9a-f]+$', '^regulator@[0-9a-f]+$', '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+' From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221207055405.30940-16-hayashi.kunihiko@socionext.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 Wed, 07 Dec 2022 14:54:00 +0900, Kunihiko Hayashi wrote: > Add devicetree binding schema for the peripheral block implemented on > Socionext Uniphier SoCs. > > Peripheral block implemented on Socionext UniPhier SoCs is an integrated > component of the peripherals including UART, I2C/FI2C, and SCSSI. > > Peripheral block has some function logics to control the component. > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > .../socionext,uniphier-perictrl.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-perictrl.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/project/devicetree-bindings/patch/20221207055405.30940-12-hayashi.kunihiko@socionext.com perictrl@59820000: 'clock', 'reset' do not match any of the regexes: '^clock-controller(@[0-9a-f]+)?$', '^reset-controller(@[0-9a-f]+)?$', 'pinctrl-[0-9]+' arch/arm64/boot/dts/socionext/uniphier-ld11-global.dtb arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dtb arch/arm64/boot/dts/socionext/uniphier-ld20-akebi96.dtb arch/arm64/boot/dts/socionext/uniphier-ld20-global.dtb arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dtb arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dtb arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dtb arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dtb arch/arm/boot/dts/uniphier-ld4-ref.dtb arch/arm/boot/dts/uniphier-ld6b-ref.dtb arch/arm/boot/dts/uniphier-pro4-ace.dtb arch/arm/boot/dts/uniphier-pro4-ref.dtb arch/arm/boot/dts/uniphier-pro4-sanji.dtb arch/arm/boot/dts/uniphier-pxs2-gentil.dtb arch/arm/boot/dts/uniphier-pxs2-vodka.dtb arch/arm/boot/dts/uniphier-sld8-ref.dtb
On 07/12/2022 06:53, Kunihiko Hayashi wrote: > Prior to adding dt-bindings for SoC-dependent controllers, rename the > clock nodes their parent nodes to the generic names in the example. > > And also fix the missing compatible string. > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > .../clock/socionext,uniphier-clock.yaml | 21 +++++++++++-------- > 1 file changed, 12 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml > index 9a0cc7341630..672450a1ecda 100644 > --- a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml > +++ b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml > @@ -61,11 +61,12 @@ required: > > examples: > - | > - sysctrl@61840000 { > - compatible = "socionext,uniphier-sysctrl", "simple-mfd", "syscon"; > + syscon@61840000 { > + compatible = "socionext,uniphier-ld11-sysctrl", > + "simple-mfd", "syscon"; > reg = <0x61840000 0x4000>; > > - clock { > + clock-controller { > compatible = "socionext,uniphier-ld11-clock"; > #clock-cells = <1>; > }; > @@ -74,11 +75,12 @@ examples: > }; > > - | > - mioctrl@59810000 { > - compatible = "socionext,uniphier-mioctrl", "simple-mfd", "syscon"; > + syscon@59810000 { > + compatible = "socionext,uniphier-ld11-mioctrl", > + "simple-mfd", "syscon"; > reg = <0x59810000 0x800>; > > - clock { > + clock-controller { > compatible = "socionext,uniphier-ld11-mio-clock"; > #clock-cells = <1>; > }; > @@ -87,11 +89,12 @@ examples: > }; > > - | > - perictrl@59820000 { > - compatible = "socionext,uniphier-perictrl", "simple-mfd", "syscon"; > + syscon@59820000 { > + compatible = "socionext,uniphier-ld11-perictrl", > + "simple-mfd", "syscon"; > reg = <0x59820000 0x200>; > > - clock { These are all three same examples (no differences except compatibles), so you can as well keep only one. You can also skip parent node, otherwise you might keep getting warnings for this schema. The parent is not that relevant here and its bindings (e.g. socionext,uniphier-sysctrl.yaml) should include complete example - parent with all the children. Best regards, Krzysztof
On 07/12/2022 06:53, Kunihiko Hayashi wrote: > Rename the parent node to the generic node name "syscon". > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > .../devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml > index 14a8c0215cc6..186fc550af4c 100644 > --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml > @@ -69,7 +69,7 @@ examples: > - | > // The UniPhier pinctrl should be a subnode of a "syscon" compatible node. > > - soc-glue@5f800000 { > + syscon@5f800000 { > compatible = "socionext,uniphier-pro4-soc-glue", "simple-mfd", "syscon"; > reg = <0x5f800000 0x2000>; > Not visible in the diff but this is a poor example. It has only compatible! Drop the parent node instead and extend the pinctrl node to show complete picture of pinctrl. Best regards, Krzysztof
On 07/12/2022 06:54, Kunihiko Hayashi wrote: > Add DT binding schema for components belonging to the platform-specific > DWC3 USB glue layer implemented in UniPhier SoCs. > > This USB glue layer works as a sideband logic for the host controller, > including core reset, vbus control, PHYs, and some signals to the > controller. > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > .../socionext,uniphier-dwc3-glue.yaml | 106 ++++++++++++++++++ > 1 file changed, 106 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml > > diff --git a/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml > new file mode 100644 > index 000000000000..1b5585a5a3a2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml > @@ -0,0 +1,106 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/socionext/socionext,uniphier-dwc3-glue.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Socionext UniPhier SoC DWC3 USB3.0 glue layer > + > +maintainers: > + - Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > + > +description: |+ > + DWC3 USB3.0 glue layer implemented on Socionext UniPhier SoCs is > + a sideband logic handling signals to DWC3 host controller inside > + USB3.0 component. > + > +properties: > + compatible: > + items: > + - enum: > + - socionext,uniphier-pro4-dwc3-glue > + - socionext,uniphier-pro5-dwc3-glue > + - socionext,uniphier-pxs2-dwc3-glue > + - socionext,uniphier-ld20-dwc3-glue > + - socionext,uniphier-pxs3-dwc3-glue > + - socionext,uniphier-nx1-dwc3-glue > + - const: simple-mfd > + > + reg: > + maxItems: 1 > + > + '#address-cells': Use consistent quotes - either ' or " > + const: 1 > + > + '#size-cells': > + const: 1 > + > + ranges: true > + > +patternProperties: > + "^reset-controller@[0-9a-f]+$": > + $ref: /schemas/reset/socionext,uniphier-glue-reset.yaml# > + > + "^regulator@[0-9a-f]+$": > + $ref: /schemas/regulator/socionext,uniphier-regulator.yaml# > + > + "^phy@[0-9a-f]+$": > + oneOf: > + - $ref: /schemas/phy/socionext,uniphier-usb3hs-phy.yaml# > + - $ref: /schemas/phy/socionext,uniphier-usb3ss-phy.yaml# > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + You need to fix Documentation/devicetree/bindings/phy/socionext,uniphier-usb3hs-phy.yaml example. I propose to drop usb-glue@65b00000 from that file. It's not relevant to that example. Best regards, Krzysztof
On 2022/12/08 17:06, Krzysztof Kozlowski wrote: > On 07/12/2022 06:53, Kunihiko Hayashi wrote: >> Prior to adding dt-bindings for SoC-dependent controllers, rename the >> clock nodes their parent nodes to the generic names in the example. >> >> And also fix the missing compatible string. >> >> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> >> --- >> .../clock/socionext,uniphier-clock.yaml | 21 +++++++++++-------- >> 1 file changed, 12 insertions(+), 9 deletions(-) >> >> diff --git >> a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml >> b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml >> index 9a0cc7341630..672450a1ecda 100644 >> --- >> a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml >> +++ >> b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml >> @@ -61,11 +61,12 @@ required: >> >> examples: >> - | >> - sysctrl@61840000 { >> - compatible = "socionext,uniphier-sysctrl", "simple-mfd", >> "syscon"; >> + syscon@61840000 { >> + compatible = "socionext,uniphier-ld11-sysctrl", >> + "simple-mfd", "syscon"; >> reg = <0x61840000 0x4000>; >> >> - clock { >> + clock-controller { >> compatible = "socionext,uniphier-ld11-clock"; >> #clock-cells = <1>; >> }; >> @@ -74,11 +75,12 @@ examples: >> }; >> >> - | >> - mioctrl@59810000 { >> - compatible = "socionext,uniphier-mioctrl", "simple-mfd", >> "syscon"; >> + syscon@59810000 { >> + compatible = "socionext,uniphier-ld11-mioctrl", >> + "simple-mfd", "syscon"; >> reg = <0x59810000 0x800>; >> >> - clock { >> + clock-controller { >> compatible = "socionext,uniphier-ld11-mio-clock"; >> #clock-cells = <1>; >> }; >> @@ -87,11 +89,12 @@ examples: >> }; >> >> - | >> - perictrl@59820000 { >> - compatible = "socionext,uniphier-perictrl", "simple-mfd", >> "syscon"; >> + syscon@59820000 { >> + compatible = "socionext,uniphier-ld11-perictrl", >> + "simple-mfd", "syscon"; >> reg = <0x59820000 0x200>; >> >> - clock { > > These are all three same examples (no differences except compatibles), > so you can as well keep only one. You can also skip parent node, > otherwise you might keep getting warnings for this schema. The parent is > not that relevant here and its bindings (e.g. > socionext,uniphier-sysctrl.yaml) should include complete example - > parent with all the children. I understand. I'll keep one and drop the parent node from the example. Thank you, --- Best Regards Kunihiko Hayashi
On 2022/12/08 17:07, Krzysztof Kozlowski wrote: > On 07/12/2022 06:53, Kunihiko Hayashi wrote: >> Rename the parent node to the generic node name "syscon". >> >> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> >> --- >> .../devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git >> a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> index 14a8c0215cc6..186fc550af4c 100644 >> --- >> a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> +++ >> b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml >> @@ -69,7 +69,7 @@ examples: >> - | >> // The UniPhier pinctrl should be a subnode of a "syscon" compatible >> node. >> >> - soc-glue@5f800000 { >> + syscon@5f800000 { >> compatible = "socionext,uniphier-pro4-soc-glue", "simple-mfd", >> "syscon"; >> reg = <0x5f800000 0x2000>; >> > > Not visible in the diff but this is a poor example. It has only > compatible! Drop the parent node instead and extend the pinctrl node to > show complete picture of pinctrl. I should add some child nodes of groups and pin attributes as an example from the devicetree. Thank you, --- Best Regards Kunihiko Hayashi
On 2022/12/08 17:23, Krzysztof Kozlowski wrote: > On 07/12/2022 06:54, Kunihiko Hayashi wrote: >> Add DT binding schema for components belonging to the platform-specific >> DWC3 USB glue layer implemented in UniPhier SoCs. >> >> This USB glue layer works as a sideband logic for the host controller, >> including core reset, vbus control, PHYs, and some signals to the >> controller. >> >> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> >> --- >> .../socionext,uniphier-dwc3-glue.yaml | 106 ++++++++++++++++++ >> 1 file changed, 106 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml >> >> diff --git >> a/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml >> b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml >> new file mode 100644 >> index 000000000000..1b5585a5a3a2 >> --- /dev/null >> +++ >> b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-dwc3-glue.yaml >> @@ -0,0 +1,106 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: >> http://devicetree.org/schemas/soc/socionext/socionext,uniphier-dwc3-glue.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Socionext UniPhier SoC DWC3 USB3.0 glue layer >> + >> +maintainers: >> + - Kunihiko Hayashi <hayashi.kunihiko@socionext.com> >> + >> +description: |+ >> + DWC3 USB3.0 glue layer implemented on Socionext UniPhier SoCs is >> + a sideband logic handling signals to DWC3 host controller inside >> + USB3.0 component. >> + >> +properties: >> + compatible: >> + items: >> + - enum: >> + - socionext,uniphier-pro4-dwc3-glue >> + - socionext,uniphier-pro5-dwc3-glue >> + - socionext,uniphier-pxs2-dwc3-glue >> + - socionext,uniphier-ld20-dwc3-glue >> + - socionext,uniphier-pxs3-dwc3-glue >> + - socionext,uniphier-nx1-dwc3-glue >> + - const: simple-mfd >> + >> + reg: >> + maxItems: 1 >> + >> + '#address-cells': > > Use consistent quotes - either ' or " I'll change it. >> + const: 1 >> + >> + '#size-cells': >> + const: 1 >> + >> + ranges: true >> + >> +patternProperties: >> + "^reset-controller@[0-9a-f]+$": >> + $ref: /schemas/reset/socionext,uniphier-glue-reset.yaml# >> + >> + "^regulator@[0-9a-f]+$": >> + $ref: /schemas/regulator/socionext,uniphier-regulator.yaml# >> + >> + "^phy@[0-9a-f]+$": >> + oneOf: >> + - $ref: /schemas/phy/socionext,uniphier-usb3hs-phy.yaml# >> + - $ref: /schemas/phy/socionext,uniphier-usb3ss-phy.yaml# >> + >> +required: >> + - compatible >> + - reg >> + >> +additionalProperties: false >> + > > You need to fix > Documentation/devicetree/bindings/phy/socionext,uniphier-usb3hs-phy.yaml > example. I propose to drop usb-glue@65b00000 from that file. It's not > relevant to that example. I already fixed usb3-phy example in PATCH 6/16, however, it's better to drop the parent node from the example not to avoid the effect of the changes. Thank you, --- Best Regards Kunihiko Hayashi