diff mbox series

[28/28] dt-bindings: usb: Convert ehci-mv to json-schema

Message ID 20200317093922.20785-29-lkundrak@v3.sk (mailing list archive)
State New, archived
Headers show
Series DT: Improve validation for Marvell SoCs | expand

Commit Message

Lubomir Rintel March 17, 2020, 9:39 a.m. UTC
A straightforward conversion of the ehci-mv binding to DT schema format
using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
 .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
 create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml

Comments

Rob Herring March 27, 2020, 7:55 p.m. UTC | #1
On Tue, Mar 17, 2020 at 10:39:22AM +0100, Lubomir Rintel wrote:
> A straightforward conversion of the ehci-mv binding to DT schema format
> using json-schema.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
>  .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
>  2 files changed, 60 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
>  create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt
> deleted file mode 100644
> index 335589895763e..0000000000000
> --- a/Documentation/devicetree/bindings/usb/ehci-mv.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -* Marvell PXA/MMP EHCI controller.
> -
> -Required properties:
> -
> -- compatible: must be "marvell,pxau2o-ehci"
> -- reg: physical base addresses of the controller and length of memory mapped region
> -- interrupts: one EHCI controller interrupt should be described here
> -- clocks: phandle list of usb clocks
> -- clock-names: should be "USBCLK"
> -- phys: phandle for the PHY device
> -- phy-names: should be "usb"
> -
> -Example:
> -
> -	ehci0: usb-ehci@d4208000 {
> -		compatible = "marvell,pxau2o-ehci";
> -		reg = <0xd4208000 0x200>;
> -		interrupts = <44>;
> -		clocks = <&soc_clocks MMP2_CLK_USB>;
> -		clock-names = "USBCLK";
> -		phys = <&usb_otg_phy>;
> -		phy-names = "usb";
> -	};
> diff --git a/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> new file mode 100644
> index 0000000000000..189025ef1e92e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)

Same license comment.

> +# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/marvell,pxau2o-ehci.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell PXA/MMP EHCI bindings
> +
> +maintainers:
> +  - Lubomir Rintel <lkundrak@v3.sk>
> +
> +allOf:
> +  - $ref: usb-hcd.yaml#
> +
> +properties:
> +  compatible:
> +    const: marvell,pxau2o-ehci
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: USBCLK
> +
> +  phys:
> +    maxItems: 1
> +
> +  phy-names:
> +    const: usb
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - phys
> +  - phy-names
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/marvell,mmp2.h>
> +    usb@d4208000 {
> +        compatible = "marvell,pxau2o-ehci";
> +        reg = <0xd4208000 0x200>;
> +        interrupts = <44>;
> +        clocks = <&soc_clocks MMP2_CLK_USB>;
> +        clock-names = "USBCLK";
> +        phys = <&usb_otg_phy>;
> +        phy-names = "usb";
> +    };
> +
> +...
> -- 
> 2.25.1
>
Lubomir Rintel May 17, 2020, 7:34 p.m. UTC | #2
On Fri, Mar 27, 2020 at 01:55:20PM -0600, Rob Herring wrote:
> On Tue, Mar 17, 2020 at 10:39:22AM +0100, Lubomir Rintel wrote:
> > A straightforward conversion of the ehci-mv binding to DT schema format
> > using json-schema.
> > 
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > ---
> >  .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
> >  .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
> >  2 files changed, 60 insertions(+), 23 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
> >  create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt
> > deleted file mode 100644
> > index 335589895763e..0000000000000
> > --- a/Documentation/devicetree/bindings/usb/ehci-mv.txt
> > +++ /dev/null
> > @@ -1,23 +0,0 @@
> > -* Marvell PXA/MMP EHCI controller.
> > -
> > -Required properties:
> > -
> > -- compatible: must be "marvell,pxau2o-ehci"
> > -- reg: physical base addresses of the controller and length of memory mapped region
> > -- interrupts: one EHCI controller interrupt should be described here
> > -- clocks: phandle list of usb clocks
> > -- clock-names: should be "USBCLK"
> > -- phys: phandle for the PHY device
> > -- phy-names: should be "usb"
> > -
> > -Example:
> > -
> > -	ehci0: usb-ehci@d4208000 {
> > -		compatible = "marvell,pxau2o-ehci";
> > -		reg = <0xd4208000 0x200>;
> > -		interrupts = <44>;
> > -		clocks = <&soc_clocks MMP2_CLK_USB>;
> > -		clock-names = "USBCLK";
> > -		phys = <&usb_otg_phy>;
> > -		phy-names = "usb";
> > -	};
> > diff --git a/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > new file mode 100644
> > index 0000000000000..189025ef1e92e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > @@ -0,0 +1,60 @@
> > +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
> 
> Same license comment.

I wrote that binding document and chose that license.

> > +# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/usb/marvell,pxau2o-ehci.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Marvell PXA/MMP EHCI bindings
> > +
> > +maintainers:
> > +  - Lubomir Rintel <lkundrak@v3.sk>
> > +
> > +allOf:
> > +  - $ref: usb-hcd.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: marvell,pxau2o-ehci
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: USBCLK
> > +
> > +  phys:
> > +    maxItems: 1
> > +
> > +  phy-names:
> > +    const: usb
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - phys
> > +  - phy-names
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/marvell,mmp2.h>
> > +    usb@d4208000 {
> > +        compatible = "marvell,pxau2o-ehci";
> > +        reg = <0xd4208000 0x200>;
> > +        interrupts = <44>;
> > +        clocks = <&soc_clocks MMP2_CLK_USB>;
> > +        clock-names = "USBCLK";
> > +        phys = <&usb_otg_phy>;
> > +        phy-names = "usb";
> > +    };
> > +
> > +...
> > -- 
> > 2.25.1
> >
Rob Herring May 18, 2020, 3:20 p.m. UTC | #3
On Sun, May 17, 2020 at 1:34 PM Lubomir Rintel <lkundrak@v3.sk> wrote:
>
> On Fri, Mar 27, 2020 at 01:55:20PM -0600, Rob Herring wrote:
> > On Tue, Mar 17, 2020 at 10:39:22AM +0100, Lubomir Rintel wrote:
> > > A straightforward conversion of the ehci-mv binding to DT schema format
> > > using json-schema.
> > >
> > > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > > ---
> > >  .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
> > >  .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
> > >  2 files changed, 60 insertions(+), 23 deletions(-)
> > >  delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
> > >  create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt
> > > deleted file mode 100644
> > > index 335589895763e..0000000000000
> > > --- a/Documentation/devicetree/bindings/usb/ehci-mv.txt
> > > +++ /dev/null
> > > @@ -1,23 +0,0 @@
> > > -* Marvell PXA/MMP EHCI controller.
> > > -
> > > -Required properties:
> > > -
> > > -- compatible: must be "marvell,pxau2o-ehci"
> > > -- reg: physical base addresses of the controller and length of memory mapped region
> > > -- interrupts: one EHCI controller interrupt should be described here
> > > -- clocks: phandle list of usb clocks
> > > -- clock-names: should be "USBCLK"
> > > -- phys: phandle for the PHY device
> > > -- phy-names: should be "usb"
> > > -
> > > -Example:
> > > -
> > > -   ehci0: usb-ehci@d4208000 {
> > > -           compatible = "marvell,pxau2o-ehci";
> > > -           reg = <0xd4208000 0x200>;
> > > -           interrupts = <44>;
> > > -           clocks = <&soc_clocks MMP2_CLK_USB>;
> > > -           clock-names = "USBCLK";
> > > -           phys = <&usb_otg_phy>;
> > > -           phy-names = "usb";
> > > -   };
> > > diff --git a/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > > new file mode 100644
> > > index 0000000000000..189025ef1e92e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> > > @@ -0,0 +1,60 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
> >
> > Same license comment.
>
> I wrote that binding document and chose that license.

Okay, but please make it GPL-2.0-only instead of or-later. If everyone
was attentive to licensing picking their own variations would be fine,
but they aren't and just copy-n-paste. So there's 2 choices
GPL-2.0-only (for converted bindings) or (GPL-2.0-only OR
BSD-2-Clause) for new or re-licensed bindings.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt
deleted file mode 100644
index 335589895763e..0000000000000
--- a/Documentation/devicetree/bindings/usb/ehci-mv.txt
+++ /dev/null
@@ -1,23 +0,0 @@ 
-* Marvell PXA/MMP EHCI controller.
-
-Required properties:
-
-- compatible: must be "marvell,pxau2o-ehci"
-- reg: physical base addresses of the controller and length of memory mapped region
-- interrupts: one EHCI controller interrupt should be described here
-- clocks: phandle list of usb clocks
-- clock-names: should be "USBCLK"
-- phys: phandle for the PHY device
-- phy-names: should be "usb"
-
-Example:
-
-	ehci0: usb-ehci@d4208000 {
-		compatible = "marvell,pxau2o-ehci";
-		reg = <0xd4208000 0x200>;
-		interrupts = <44>;
-		clocks = <&soc_clocks MMP2_CLK_USB>;
-		clock-names = "USBCLK";
-		phys = <&usb_otg_phy>;
-		phy-names = "usb";
-	};
diff --git a/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
new file mode 100644
index 0000000000000..189025ef1e92e
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
@@ -0,0 +1,60 @@ 
+# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/marvell,pxau2o-ehci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell PXA/MMP EHCI bindings
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+allOf:
+  - $ref: usb-hcd.yaml#
+
+properties:
+  compatible:
+    const: marvell,pxau2o-ehci
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: USBCLK
+
+  phys:
+    maxItems: 1
+
+  phy-names:
+    const: usb
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - phys
+  - phy-names
+
+examples:
+  - |
+    #include <dt-bindings/clock/marvell,mmp2.h>
+    usb@d4208000 {
+        compatible = "marvell,pxau2o-ehci";
+        reg = <0xd4208000 0x200>;
+        interrupts = <44>;
+        clocks = <&soc_clocks MMP2_CLK_USB>;
+        clock-names = "USBCLK";
+        phys = <&usb_otg_phy>;
+        phy-names = "usb";
+    };
+
+...