diff mbox series

[v2] dt-bindings: clock: tegra: Fix USB controller nodes in examples

Message ID 20211003192529.29615-1-david@ixit.cz
State Changes Requested
Headers show
Series [v2] dt-bindings: clock: tegra: Fix USB controller nodes in examples | expand

Commit Message

David Heidelberg Oct. 3, 2021, 7:25 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

A subsequent patch will convert the USB controller device tree bindings
to json-schema, which will cause the DT validation to point out various
issues with the examples in the clock and reset controller bindings.

Fix these issues so that the subsequent patch will not cause validation
warnings.

v2:
 - add missing usb-ehci compatible (David)

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../bindings/clock/nvidia,tegra124-car.yaml           | 11 ++++++++---
 .../devicetree/bindings/clock/nvidia,tegra20-car.yaml |  5 +++++
 2 files changed, 13 insertions(+), 3 deletions(-)

Comments

Dmitry Osipenko Oct. 3, 2021, 9:38 p.m. UTC | #1
03.10.2021 22:25, David Heidelberg пишет:
> A subsequent patch will convert the USB controller device tree bindings
> to json-schema, which will cause the DT validation to point out various
> issues with the examples in the clock and reset controller bindings.
> 
> Fix these issues so that the subsequent patch will not cause validation
> warnings.
> 
> v2:
>  - add missing usb-ehci compatible (David)

The usb-ehci should be removed from Tegra device-trees, it's
incompatible with Tegra hardware.
Rob Herring (Arm) Oct. 4, 2021, 2:22 a.m. UTC | #2
On Sun, 03 Oct 2021 21:25:30 +0200, David Heidelberg wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> A subsequent patch will convert the USB controller device tree bindings
> to json-schema, which will cause the DT validation to point out various
> issues with the examples in the clock and reset controller bindings.
> 
> Fix these issues so that the subsequent patch will not cause validation
> warnings.
> 
> v2:
>  - add missing usb-ehci compatible (David)
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../bindings/clock/nvidia,tegra124-car.yaml           | 11 ++++++++---
>  .../devicetree/bindings/clock/nvidia,tegra20-car.yaml |  5 +++++
>  2 files changed, 13 insertions(+), 3 deletions(-)
> 

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/clock/nvidia,tegra124-car.example.dt.yaml: usb-controller@7d000000: compatible: 'oneOf' conditional failed, one must be fixed:
	['nvidia,tegra124-ehci', 'nvidia,tegra30-ehci', 'usb-ehci'] is too long
	Additional items are not allowed ('usb-ehci' was unexpected)
	Additional items are not allowed ('nvidia,tegra30-ehci', 'usb-ehci' were unexpected)
	'nvidia,tegra124-ehci' is not one of ['allwinner,sun4i-a10-ehci', 'allwinner,sun50i-a64-ehci', 'allwinner,sun50i-h6-ehci', 'allwinner,sun5i-a13-ehci', 'allwinner,sun6i-a31-ehci', 'allwinner,sun7i-a20-ehci', 'allwinner,sun8i-a23-ehci', 'allwinner,sun8i-a83t-ehci', 'allwinner,sun8i-h3-ehci', 'allwinner,sun8i-r40-ehci', 'allwinner,sun9i-a80-ehci', 'aspeed,ast2400-ehci', 'aspeed,ast2500-ehci', 'aspeed,ast2600-ehci', 'brcm,bcm3384-ehci', 'brcm,bcm63268-ehci', 'brcm,bcm6328-ehci', 'brcm,bcm6358-ehci', 'brcm,bcm6362-ehci', 'brcm,bcm6368-ehci', 'brcm,bcm7125-ehci', 'brcm,bcm7346-ehci', 'brcm,bcm7358-ehci', 'brcm,bcm7360-ehci', 'brcm,bcm7362-ehci', 'brcm,bcm7420-ehci', 'brcm,bcm7425-ehci', 'brcm,bcm7435-ehci', 'ibm,476gtr-ehci', 'nxp,lpc1850-ehci', 'qca,ar7100-ehci', 'snps,hsdk-v1.0-ehci', 'socionext,uniphier-ehci']
	'nvidia,tegra124-ehci' is not one of ['cavium,octeon-6335-ehci', 'ibm,usb-ehci-440epx', 'ibm,usb-ehci-460ex', 'nintendo,hollywood-usb-ehci', 'st,spear600-ehci']
	'nvidia,tegra124-ehci' is not one of ['generic-ehci', 'usb-ehci']
	'generic-ehci' was expected
	'usb-ehci' was expected
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/generic-ehci.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.example.dt.yaml: usb-controller@7d000000: 'nvidia,phy', 'phy_type', 'reset-names' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/generic-ehci.yaml
Documentation/devicetree/bindings/clock/nvidia,tegra124-car.example.dt.yaml:0:0: /example-0/usb-controller@7d000000: failed to match any schema with compatible: ['nvidia,tegra124-ehci', 'nvidia,tegra30-ehci', 'usb-ehci']
Documentation/devicetree/bindings/clock/nvidia,tegra124-car.example.dt.yaml:0:0: /example-0/usb-controller@7d000000: failed to match any schema with compatible: ['nvidia,tegra124-ehci', 'nvidia,tegra30-ehci', 'usb-ehci']

doc reference errors (make refcheckdocs):

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

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.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.yaml b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.yaml
index ec7ab1483652..b52f3ef059e2 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.yaml
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.yaml
@@ -99,6 +99,7 @@  additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/tegra124-car.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
     car: clock-controller@60006000 {
         compatible = "nvidia,tegra124-car";
@@ -107,9 +108,13 @@  examples:
         #reset-cells = <1>;
     };
 
-    usb-controller@c5004000 {
-        compatible = "nvidia,tegra20-ehci";
-        reg = <0xc5004000 0x4000>;
+    usb-controller@7d000000 {
+        compatible = "nvidia,tegra124-ehci", "nvidia,tegra30-ehci", "usb-ehci";
+        reg = <0x7d000000 0x4000>;
+        interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+        phy_type = "utmi";
         clocks = <&car TEGRA124_CLK_USB2>;
         resets = <&car TEGRA124_CLK_USB2>;
+        reset-names = "usb";
+        nvidia,phy = <&phy1>;
     };
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.yaml b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.yaml
index f832abb7f11a..6386126b45e8 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.yaml
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.yaml
@@ -83,6 +83,7 @@  additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/tegra20-car.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
     car: clock-controller@60006000 {
         compatible = "nvidia,tegra20-car";
@@ -101,6 +102,10 @@  examples:
     usb-controller@c5004000 {
         compatible = "nvidia,tegra20-ehci";
         reg = <0xc5004000 0x4000>;
+        interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+        phy_type = "utmi";
         clocks = <&car TEGRA20_CLK_USB2>;
         resets = <&car TEGRA20_CLK_USB2>;
+        reset-names = "usb";
+        nvidia,phy = <&phy1>;
     };