Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema
@ 2019-09-06 11:14 Simon Horman
  2019-09-06 11:21 ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2019-09-06 11:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, Rob Herring, Mark Rutland, devicetree,
	linux-renesas-soc, linux-arm-kernel, Simon Horman

Convert Renesas Product Register bindings documentation to json-schema.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
Based on v5.3-rc1
Tested using:
  make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/renesas,prr.yaml
---
 .../devicetree/bindings/arm/renesas,prr.txt        | 20 ------------
 .../devicetree/bindings/arm/renesas,prr.yaml       | 36 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 20 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
 create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.yaml

diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.txt b/Documentation/devicetree/bindings/arm/renesas,prr.txt
deleted file mode 100644
index 08e482e953ca..000000000000
--- a/Documentation/devicetree/bindings/arm/renesas,prr.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Renesas Product Register
-
-Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
-allows to retrieve SoC product and revision information.  If present, a device
-node for this register should be added.
-
-Required properties:
-  - compatible: Must be one of:
-    "renesas,prr"
-    "renesas,bsid"
-  - reg: Base address and length of the register block.
-
-
-Examples
---------
-
-	prr: chipid@ff000044 {
-		compatible = "renesas,prr";
-		reg = <0 0xff000044 0 4>;
-	};
diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.yaml b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
new file mode 100644
index 000000000000..9df003041456
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/renesas,prr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas Product Register
+
+maintainers:
+  - Geert Uytterhoeven <geert+renesas@glider.be>
+  - Magnus Damm <magnus.damm@gmail.com>
+
+description: |
+  Most Renesas ARM SoCs have a Product Register or Boundary Scan ID
+  Register that allows to retrieve SoC product and revision information.
+  If present, a device node for this register should be added.
+
+properties:
+  compatible:
+    oneOf:
+        - const: "renesas,prr"
+        - const: "renesas,bsid"
+  reg:
+    items:
+      - description: Base address and length of the register block.
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    prr: chipid@ff000044 {
+        compatible = "renesas,prr";
+        reg = <0 0xff000044 0 4>;
+    };
-- 
2.11.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema
  2019-09-06 11:14 [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema Simon Horman
@ 2019-09-06 11:21 ` Rob Herring
  2019-09-06 11:48   ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2019-09-06 11:21 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Magnus Damm, Mark Rutland, devicetree,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Sep 6, 2019 at 12:14 PM Simon Horman <horms+renesas@verge.net.au> wrote:
>
> Convert Renesas Product Register bindings documentation to json-schema.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> Based on v5.3-rc1
> Tested using:
>   make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/renesas,prr.yaml
> ---
>  .../devicetree/bindings/arm/renesas,prr.txt        | 20 ------------
>  .../devicetree/bindings/arm/renesas,prr.yaml       | 36 ++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 20 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.txt b/Documentation/devicetree/bindings/arm/renesas,prr.txt
> deleted file mode 100644
> index 08e482e953ca..000000000000
> --- a/Documentation/devicetree/bindings/arm/renesas,prr.txt
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -Renesas Product Register
> -
> -Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
> -allows to retrieve SoC product and revision information.  If present, a device
> -node for this register should be added.
> -
> -Required properties:
> -  - compatible: Must be one of:
> -    "renesas,prr"
> -    "renesas,bsid"
> -  - reg: Base address and length of the register block.
> -
> -
> -Examples
> ---------
> -
> -       prr: chipid@ff000044 {
> -               compatible = "renesas,prr";
> -               reg = <0 0xff000044 0 4>;
> -       };
> diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.yaml b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> new file mode 100644
> index 000000000000..9df003041456
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> @@ -0,0 +1,36 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/renesas,prr.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas Product Register
> +
> +maintainers:
> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> +  - Magnus Damm <magnus.damm@gmail.com>
> +
> +description: |
> +  Most Renesas ARM SoCs have a Product Register or Boundary Scan ID
> +  Register that allows to retrieve SoC product and revision information.
> +  If present, a device node for this register should be added.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +        - const: "renesas,prr"
> +        - const: "renesas,bsid"

enum is better than oneOf+const and drop the quotes. oneOf/allOf/anyOf
result in terrible error messages.

> +  reg:
> +    items:
> +      - description: Base address and length of the register block.

That's what 'reg' *always* is... Just 'maxItems: 1' is sufficient when
there is only 1 entry.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    prr: chipid@ff000044 {
> +        compatible = "renesas,prr";
> +        reg = <0 0xff000044 0 4>;
> +    };
> --
> 2.11.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema
  2019-09-06 11:21 ` Rob Herring
@ 2019-09-06 11:48   ` Simon Horman
  2019-09-06 12:54     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2019-09-06 11:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: Geert Uytterhoeven, Magnus Damm, Mark Rutland, devicetree,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Sep 06, 2019 at 12:21:58PM +0100, Rob Herring wrote:
> On Fri, Sep 6, 2019 at 12:14 PM Simon Horman <horms+renesas@verge.net.au> wrote:
> >
> > Convert Renesas Product Register bindings documentation to json-schema.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> > Based on v5.3-rc1
> > Tested using:
> >   make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > ---
> >  .../devicetree/bindings/arm/renesas,prr.txt        | 20 ------------
> >  .../devicetree/bindings/arm/renesas,prr.yaml       | 36 ++++++++++++++++++++++
> >  2 files changed, 36 insertions(+), 20 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
> >  create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.txt b/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > deleted file mode 100644
> > index 08e482e953ca..000000000000
> > --- a/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > +++ /dev/null
> > @@ -1,20 +0,0 @@
> > -Renesas Product Register
> > -
> > -Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
> > -allows to retrieve SoC product and revision information.  If present, a device
> > -node for this register should be added.
> > -
> > -Required properties:
> > -  - compatible: Must be one of:
> > -    "renesas,prr"
> > -    "renesas,bsid"
> > -  - reg: Base address and length of the register block.
> > -
> > -
> > -Examples
> > ---------
> > -
> > -       prr: chipid@ff000044 {
> > -               compatible = "renesas,prr";
> > -               reg = <0 0xff000044 0 4>;
> > -       };
> > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.yaml b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > new file mode 100644
> > index 000000000000..9df003041456
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > @@ -0,0 +1,36 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/renesas,prr.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Renesas Product Register
> > +
> > +maintainers:
> > +  - Geert Uytterhoeven <geert+renesas@glider.be>
> > +  - Magnus Damm <magnus.damm@gmail.com>
> > +
> > +description: |
> > +  Most Renesas ARM SoCs have a Product Register or Boundary Scan ID
> > +  Register that allows to retrieve SoC product and revision information.
> > +  If present, a device node for this register should be added.
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +        - const: "renesas,prr"
> > +        - const: "renesas,bsid"
> 
> enum is better than oneOf+const and drop the quotes. oneOf/allOf/anyOf
> result in terrible error messages.

Thanks Rob,

Like this?

  compatible:
    enum:
      - renesas,prr
      - renesas,bsid

> > +  reg:
> > +    items:
> > +      - description: Base address and length of the register block.
> 
> That's what 'reg' *always* is... Just 'maxItems: 1' is sufficient when
> there is" only 1 entry.

And this?

  reg:
    maxItems: 1

> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +examples:
> > +  - |
> > +    prr: chipid@ff000044 {
> > +        compatible = "renesas,prr";
> > +        reg = <0 0xff000044 0 4>;
> > +    };
> > --
> > 2.11.0
> >
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema
  2019-09-06 11:48   ` Simon Horman
@ 2019-09-06 12:54     ` Rob Herring
  2019-09-08 12:06       ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2019-09-06 12:54 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Magnus Damm, Mark Rutland, devicetree,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Sep 6, 2019 at 12:49 PM Simon Horman <horms@verge.net.au> wrote:
>
> On Fri, Sep 06, 2019 at 12:21:58PM +0100, Rob Herring wrote:
> > On Fri, Sep 6, 2019 at 12:14 PM Simon Horman <horms+renesas@verge.net.au> wrote:
> > >
> > > Convert Renesas Product Register bindings documentation to json-schema.
> > >
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > ---
> > > Based on v5.3-rc1
> > > Tested using:
> > >   make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > ---
> > >  .../devicetree/bindings/arm/renesas,prr.txt        | 20 ------------
> > >  .../devicetree/bindings/arm/renesas,prr.yaml       | 36 ++++++++++++++++++++++
> > >  2 files changed, 36 insertions(+), 20 deletions(-)
> > >  delete mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
> > >  create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.txt b/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > > deleted file mode 100644
> > > index 08e482e953ca..000000000000
> > > --- a/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > > +++ /dev/null
> > > @@ -1,20 +0,0 @@
> > > -Renesas Product Register
> > > -
> > > -Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
> > > -allows to retrieve SoC product and revision information.  If present, a device
> > > -node for this register should be added.
> > > -
> > > -Required properties:
> > > -  - compatible: Must be one of:
> > > -    "renesas,prr"
> > > -    "renesas,bsid"
> > > -  - reg: Base address and length of the register block.
> > > -
> > > -
> > > -Examples
> > > ---------
> > > -
> > > -       prr: chipid@ff000044 {
> > > -               compatible = "renesas,prr";
> > > -               reg = <0 0xff000044 0 4>;
> > > -       };
> > > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.yaml b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > new file mode 100644
> > > index 000000000000..9df003041456
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > @@ -0,0 +1,36 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/arm/renesas,prr.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Renesas Product Register
> > > +
> > > +maintainers:
> > > +  - Geert Uytterhoeven <geert+renesas@glider.be>
> > > +  - Magnus Damm <magnus.damm@gmail.com>
> > > +
> > > +description: |
> > > +  Most Renesas ARM SoCs have a Product Register or Boundary Scan ID
> > > +  Register that allows to retrieve SoC product and revision information.
> > > +  If present, a device node for this register should be added.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    oneOf:
> > > +        - const: "renesas,prr"
> > > +        - const: "renesas,bsid"
> >
> > enum is better than oneOf+const and drop the quotes. oneOf/allOf/anyOf
> > result in terrible error messages.
>
> Thanks Rob,
>
> Like this?
>
>   compatible:
>     enum:
>       - renesas,prr
>       - renesas,bsid
>
> > > +  reg:
> > > +    items:
> > > +      - description: Base address and length of the register block.
> >
> > That's what 'reg' *always* is... Just 'maxItems: 1' is sufficient when
> > there is" only 1 entry.
>
> And this?
>
>   reg:
>     maxItems: 1

Yes, for both.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema
  2019-09-06 12:54     ` Rob Herring
@ 2019-09-08 12:06       ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2019-09-08 12:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Geert Uytterhoeven, Magnus Damm, Mark Rutland, devicetree,
	open list:MEDIA DRIVERS FOR RENESAS - FCP,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Sep 06, 2019 at 01:54:26PM +0100, Rob Herring wrote:
> On Fri, Sep 6, 2019 at 12:49 PM Simon Horman <horms@verge.net.au> wrote:
> >
> > On Fri, Sep 06, 2019 at 12:21:58PM +0100, Rob Herring wrote:
> > > On Fri, Sep 6, 2019 at 12:14 PM Simon Horman <horms+renesas@verge.net.au> wrote:
> > > >
> > > > Convert Renesas Product Register bindings documentation to json-schema.
> > > >
> > > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > > ---
> > > > Based on v5.3-rc1
> > > > Tested using:
> > > >   make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > > ---
> > > >  .../devicetree/bindings/arm/renesas,prr.txt        | 20 ------------
> > > >  .../devicetree/bindings/arm/renesas,prr.yaml       | 36 ++++++++++++++++++++++
> > > >  2 files changed, 36 insertions(+), 20 deletions(-)
> > > >  delete mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
> > > >  create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.txt b/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > > > deleted file mode 100644
> > > > index 08e482e953ca..000000000000
> > > > --- a/Documentation/devicetree/bindings/arm/renesas,prr.txt
> > > > +++ /dev/null
> > > > @@ -1,20 +0,0 @@
> > > > -Renesas Product Register
> > > > -
> > > > -Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
> > > > -allows to retrieve SoC product and revision information.  If present, a device
> > > > -node for this register should be added.
> > > > -
> > > > -Required properties:
> > > > -  - compatible: Must be one of:
> > > > -    "renesas,prr"
> > > > -    "renesas,bsid"
> > > > -  - reg: Base address and length of the register block.
> > > > -
> > > > -
> > > > -Examples
> > > > ---------
> > > > -
> > > > -       prr: chipid@ff000044 {
> > > > -               compatible = "renesas,prr";
> > > > -               reg = <0 0xff000044 0 4>;
> > > > -       };
> > > > diff --git a/Documentation/devicetree/bindings/arm/renesas,prr.yaml b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > > new file mode 100644
> > > > index 000000000000..9df003041456
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/arm/renesas,prr.yaml
> > > > @@ -0,0 +1,36 @@
> > > > +# SPDX-License-Identifier: GPL-2.0
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/arm/renesas,prr.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Renesas Product Register
> > > > +
> > > > +maintainers:
> > > > +  - Geert Uytterhoeven <geert+renesas@glider.be>
> > > > +  - Magnus Damm <magnus.damm@gmail.com>
> > > > +
> > > > +description: |
> > > > +  Most Renesas ARM SoCs have a Product Register or Boundary Scan ID
> > > > +  Register that allows to retrieve SoC product and revision information.
> > > > +  If present, a device node for this register should be added.
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    oneOf:
> > > > +        - const: "renesas,prr"
> > > > +        - const: "renesas,bsid"
> > >
> > > enum is better than oneOf+const and drop the quotes. oneOf/allOf/anyOf
> > > result in terrible error messages.
> >
> > Thanks Rob,
> >
> > Like this?
> >
> >   compatible:
> >     enum:
> >       - renesas,prr
> >       - renesas,bsid
> >
> > > > +  reg:
> > > > +    items:
> > > > +      - description: Base address and length of the register block.
> > >
> > > That's what 'reg' *always* is... Just 'maxItems: 1' is sufficient when
> > > there is" only 1 entry.
> >
> > And this?
> >
> >   reg:
> >     maxItems: 1
> 
> Yes, for both.

Thanks, I have posted v2 with the changes you suggested.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 11:14 [PATCH] dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema Simon Horman
2019-09-06 11:21 ` Rob Herring
2019-09-06 11:48   ` Simon Horman
2019-09-06 12:54     ` Rob Herring
2019-09-08 12:06       ` Simon Horman

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox