openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 RESEND 1/2] dt-bindings: arm: Convert nuvoton, npcm750 binding to YAML
@ 2021-03-03 15:46 Jonathan Neuschäfer
  2021-03-03 15:46 ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Neuschäfer @ 2021-03-03 15:46 UTC (permalink / raw)
  To: openbmc, devicetree
  Cc: Rob Herring, Tomer Maimon, Avi Fishman, Patrick Venture,
	Jonathan Neuschäfer, Tali Perry, Rob Herring, linux-kernel,
	Benjamin Fair

The general trend is to have devicetree bindings in YAML format, to
allow automatic validation of bindings and devicetrees.

Convert the NPCM SoC family's binding to YAML before it accumulates more
entries.

The nuvoton,npcm750-evb compatible string is introduced to keep the
structure of the binding a little simpler.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---

If someone else wants to be listed as the maintainer, please let me
know.


v2:
- Fix indentation to satisfy yamllint
- Fix $schema line

v1:
- https://lore.kernel.org/lkml/20210108224008.705687-1-j.neuschaefer@gmx.net/
---
 .../devicetree/bindings/arm/npcm/npcm.txt     |  6 -----
 .../devicetree/bindings/arm/npcm/npcm.yaml    | 23 +++++++++++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/npcm/npcm.txt
 create mode 100644 Documentation/devicetree/bindings/arm/npcm/npcm.yaml

diff --git a/Documentation/devicetree/bindings/arm/npcm/npcm.txt b/Documentation/devicetree/bindings/arm/npcm/npcm.txt
deleted file mode 100644
index 2d87d9ecea85b..0000000000000
--- a/Documentation/devicetree/bindings/arm/npcm/npcm.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-NPCM Platforms Device Tree Bindings
------------------------------------
-NPCM750 SoC
-Required root node properties:
-	- compatible = "nuvoton,npcm750";
-
diff --git a/Documentation/devicetree/bindings/arm/npcm/npcm.yaml b/Documentation/devicetree/bindings/arm/npcm/npcm.yaml
new file mode 100644
index 0000000000000..894aefb70652a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/npcm/npcm.yaml
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/npcm/npcm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NPCM Platforms Device Tree Bindings
+
+maintainers:
+  - Jonathan Neuschäfer <j.neuschaefer@gmx.net>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: NPCM750 based boards
+        items:
+          - enum:
+              - nuvoton,npcm750-evb         # NPCM750 evaluation board
+          - const: nuvoton,npcm750
+
+additionalProperties: true
--
2.29.2


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

* [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree
  2021-03-03 15:46 [PATCH v2 RESEND 1/2] dt-bindings: arm: Convert nuvoton, npcm750 binding to YAML Jonathan Neuschäfer
@ 2021-03-03 15:46 ` Jonathan Neuschäfer
  2021-03-04 15:21   ` Tomer Maimon
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Neuschäfer @ 2021-03-03 15:46 UTC (permalink / raw)
  To: openbmc, devicetree
  Cc: Tomer Maimon, Avi Fishman, Patrick Venture,
	Jonathan Neuschäfer, Tali Perry, Rob Herring, linux-kernel,
	Benjamin Fair

According to the revised binding, the devicetree needs a board-specific
compatible string.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2:
- no changes
---
 arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
index 9f13d08f5804e..dea3dbc4a6a52 100644
--- a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
+++ b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
@@ -9,7 +9,7 @@

 / {
 	model = "Nuvoton npcm750 Development Board (Device Tree)";
-	compatible = "nuvoton,npcm750";
+	compatible = "nuvoton,npcm750-evb", "nuvoton,npcm750";

 	aliases {
 		ethernet2 = &gmac0;
--
2.29.2


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

* Re: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree
  2021-03-03 15:46 ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer
@ 2021-03-04 15:21   ` Tomer Maimon
  2021-03-04 15:42     ` Jonathan Neuschäfer
  0 siblings, 1 reply; 7+ messages in thread
From: Tomer Maimon @ 2021-03-04 15:21 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture,
	OpenBMC Maillist, Linux Kernel Mailing List, Tali Perry,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

Hi Jonathan,

Thanks a lot for sending the patch,

I think that when it related to the SoC EVB it can stay with the
genral compatible name nuvoton,npcm750

you can see it also in,
https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-ast2500-evb.dts#L8

Thanks again,

Tomer

On Wed, 3 Mar 2021 at 17:47, Jonathan Neuschäfer <j.neuschaefer@gmx.net>
wrote:

> According to the revised binding, the devicetree needs a board-specific
> compatible string.
>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
>
> v2:
> - no changes
> ---
>  arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
> b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
> index 9f13d08f5804e..dea3dbc4a6a52 100644
> --- a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
> +++ b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
> @@ -9,7 +9,7 @@
>
>  / {
>         model = "Nuvoton npcm750 Development Board (Device Tree)";
> -       compatible = "nuvoton,npcm750";
> +       compatible = "nuvoton,npcm750-evb", "nuvoton,npcm750";
>
>         aliases {
>                 ethernet2 = &gmac0;
> --
> 2.29.2
>
>

[-- Attachment #2: Type: text/html, Size: 1975 bytes --]

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

* Re: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree
  2021-03-04 15:21   ` Tomer Maimon
@ 2021-03-04 15:42     ` Jonathan Neuschäfer
  2021-03-11 14:11       ` Tomer Maimon
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Neuschäfer @ 2021-03-04 15:42 UTC (permalink / raw)
  To: Tomer Maimon
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture,
	OpenBMC Maillist, Jonathan Neuschäfer, Tali Perry,
	Rob Herring, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On Thu, Mar 04, 2021 at 05:21:36PM +0200, Tomer Maimon wrote:
> Hi Jonathan,
> 
> Thanks a lot for sending the patch,
> 
> I think that when it related to the SoC EVB it can stay with the
> genral compatible name nuvoton,npcm750
> 
> you can see it also in,
> https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-ast2500-evb.dts#L8

To make the single compatible string match the DT binding, I'll have to
write the binding a little differently. I wrote it like this:

  compatible:
    oneOf:
      - description: NPCM750 based boards
        items:
          - enum:
              - nuvoton,npcm750-evb         # NPCM750 evaluation board
          - const: nuvoton,npcm750


I guess I could do something like this:

  compatible:
    oneOf:
      - description: NPCM750 development board
        const: nuvoton,npcm750


And later add this part, when needed:

      - description: NPCM750 based boards
        items:
          - enum:
              - vendor,foo-bar-bmc
          - const: nuvoton,npcm750


What do you think?


Thanks,
Jonathan Neuschäfer


> On Wed, 3 Mar 2021 at 17:47, Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> wrote:
[...]
> >  / {
> >         model = "Nuvoton npcm750 Development Board (Device Tree)";
> > -       compatible = "nuvoton,npcm750";
> > +       compatible = "nuvoton,npcm750-evb", "nuvoton,npcm750";

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree
  2021-03-04 15:42     ` Jonathan Neuschäfer
@ 2021-03-11 14:11       ` Tomer Maimon
  2021-03-11 14:14         ` Email from the future (was: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree) Paul Menzel
  2021-03-11 15:15         ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer
  0 siblings, 2 replies; 7+ messages in thread
From: Tomer Maimon @ 2021-03-11 14:11 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture,
	OpenBMC Maillist, Linux Kernel Mailing List, Tali Perry,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

Hi Jonathan,

Thanks a lot for your effort!

On Thu, 4 Mar 2021 at 17:42, Jonathan Neuschäfer <j.neuschaefer@gmx.net>
wrote:

> On Thu, Mar 04, 2021 at 05:21:36PM +0200, Tomer Maimon wrote:
> > Hi Jonathan,
> >
> > Thanks a lot for sending the patch,
> >
> > I think that when it related to the SoC EVB it can stay with the
> > genral compatible name nuvoton,npcm750
> >
> > you can see it also in,
> >
> https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-ast2500-evb.dts#L8
>
> To make the single compatible string match the DT binding, I'll have to
> write the binding a little differently. I wrote it like this:
>
>   compatible:
>     oneOf:
>       - description: NPCM750 based boards
>         items:
>           - enum:
>               - nuvoton,npcm750-evb         # NPCM750 evaluation board
>           - const: nuvoton,npcm750
>
> I think it should be like the exemple above

>
> I guess I could do something like this:
>
>   compatible:
>     oneOf:
>       - description: NPCM750 development board
>         const: nuvoton,npcm750
>
>
> And later add this part, when needed:
>
>       - description: NPCM750 based boards
>         items:
>           - enum:
>               - vendor,foo-bar-bmc
>           - const: nuvoton,npcm750
>
>
> What do you think?
>
>
> Thanks,
> Jonathan Neuschäfer
>
>
> > On Wed, 3 Mar 2021 at 17:47, Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> > wrote:
> [...]
> > >  / {
> > >         model = "Nuvoton npcm750 Development Board (Device Tree)";
> > > -       compatible = "nuvoton,npcm750";
> > > +       compatible = "nuvoton,npcm750-evb", "nuvoton,npcm750";
>

Thanks,

Tomer

[-- Attachment #2: Type: text/html, Size: 2734 bytes --]

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

* Email from the future (was: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree)
  2021-03-11 14:11       ` Tomer Maimon
@ 2021-03-11 14:14         ` Paul Menzel
  2021-03-11 15:15         ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Menzel @ 2021-03-11 14:14 UTC (permalink / raw)
  To: Tomer Maimon, Jonathan Neuschäfer
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture,
	OpenBMC Maillist, Linux Kernel Mailing List, Tali Perry,
	Rob Herring

Dear Tomer,


Please note, your email date was around 11 minutes in the future.

As it looks like you are using Google Mail, I am quite surprised by this.


Kind regards,

Paul

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

* Re: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree
  2021-03-11 14:11       ` Tomer Maimon
  2021-03-11 14:14         ` Email from the future (was: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree) Paul Menzel
@ 2021-03-11 15:15         ` Jonathan Neuschäfer
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Neuschäfer @ 2021-03-11 15:15 UTC (permalink / raw)
  To: Tomer Maimon
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture,
	OpenBMC Maillist, Jonathan Neuschäfer, Tali Perry,
	Rob Herring, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]

Hi Tomer,

your in-line reply got lost in the "> " lines, but I found it anyway.

On Thu, Mar 11, 2021 at 04:11:59PM +0200, Tomer Maimon wrote:
> Hi Jonathan,
> 
> Thanks a lot for your effort!
> 
> On Thu, 4 Mar 2021 at 17:42, Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> wrote:
> 
> > On Thu, Mar 04, 2021 at 05:21:36PM +0200, Tomer Maimon wrote:
> > > Hi Jonathan,
> > >
> > > Thanks a lot for sending the patch,
> > >
> > > I think that when it related to the SoC EVB it can stay with the
> > > genral compatible name nuvoton,npcm750
> > >
> > > you can see it also in,
> > > https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-ast2500-evb.dts#L8
> >
> > To make the single compatible string match the DT binding, I'll have to
> > write the binding a little differently. I wrote it like this:
> >
> >   compatible:
> >     oneOf:
> >       - description: NPCM750 based boards
> >         items:
> >           - enum:
> >               - nuvoton,npcm750-evb         # NPCM750 evaluation board
> >           - const: nuvoton,npcm750
> >
>
> I think it should be like the exemple above

If I specify the devicetree binding like above (which I initially did),
it implies that the compatible line in nuvoton-npcm750-evb.dts should be

	compatible = "nuvoton,npcm750-evb", "nuvoton,npcm750";

not

	compatible = "nuvoton,npcm750";


This is why I suggested rewriting it like below:

> >   compatible:
> >     oneOf:
> >       - description: NPCM750 development board
> >         const: nuvoton,npcm750
> >
> >       - description: NPCM750 based boards
> >         items:
> >           - enum:
> >               - vendor,foo-bar-bmc
> >           - const: nuvoton,npcm750


I will send this new approach as a patch in a few days.


Thanks,
Jonathan Neuschäfer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-03-11 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 15:46 [PATCH v2 RESEND 1/2] dt-bindings: arm: Convert nuvoton, npcm750 binding to YAML Jonathan Neuschäfer
2021-03-03 15:46 ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer
2021-03-04 15:21   ` Tomer Maimon
2021-03-04 15:42     ` Jonathan Neuschäfer
2021-03-11 14:11       ` Tomer Maimon
2021-03-11 14:14         ` Email from the future (was: [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree) Paul Menzel
2021-03-11 15:15         ` [PATCH v2 RESEND 2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree Jonathan Neuschäfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).