diff mbox series

[v2,RESEND,2/2] ARM: dts: Add board-specific compatible string to npcm750-evb devicetree

Message ID 20210303154622.3018839-2-j.neuschaefer@gmx.net
State New
Headers show
Series [v2,RESEND,1/2] dt-bindings: arm: Convert nuvoton, npcm750 binding to YAML | expand

Commit Message

J. Neuschäfer March 3, 2021, 3:46 p.m. UTC
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(-)

--
2.29.2

Comments

Tomer Maimon March 4, 2021, 3:21 p.m. UTC | #1
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
>
>
J. Neuschäfer March 4, 2021, 3:42 p.m. UTC | #2
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";
Tomer Maimon March 11, 2021, 2:11 p.m. UTC | #3
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
Paul Menzel March 11, 2021, 2:14 p.m. UTC | #4
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
J. Neuschäfer March 11, 2021, 3:15 p.m. UTC | #5
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
diff mbox series

Patch

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;