linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Rob Herring <robh+dt@kernel.org>
Cc: Olof Johansson <olof@lixom.net>,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <maz@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Russell King <linux@armlinux.org.uk>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema
Date: Tue, 27 Aug 2019 15:23:58 +0200	[thread overview]
Message-ID: <136a57cf3d293e3233f31d5ee660a6418726333a.camel@v3.sk> (raw)
In-Reply-To: <CAL_JsqJ4_h+M=6L-nzK2N+A9TAy-N8SoiFv1SSTk_kCcKt0eXw@mail.gmail.com>

On Tue, 2019-08-27 at 06:59 -0500, Rob Herring wrote:
> On Thu, Aug 22, 2019 at 4:27 AM Lubomir Rintel <lkundrak@v3.sk> wrote:
> > Convert Marvell MMP SoC bindings to DT schema format using json-schema.
> > 
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > 
> > ---
> > Changes since v1:
> > - Added this patch
> > 
> >  .../devicetree/bindings/arm/mrvl/mrvl.txt     | 14 ---------
> >  .../devicetree/bindings/arm/mrvl/mrvl.yaml    | 31 +++++++++++++++++++
> >  2 files changed, 31 insertions(+), 14 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.txt
> >  create mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/mrvl/mrvl.txt b/Documentation/devicetree/bindings/arm/mrvl/mrvl.txt
> > deleted file mode 100644
> > index 951687528efb0..0000000000000
> > --- a/Documentation/devicetree/bindings/arm/mrvl/mrvl.txt
> > +++ /dev/null
> > @@ -1,14 +0,0 @@
> > -Marvell Platforms Device Tree Bindings
> > -----------------------------------------------------
> > -
> > -PXA168 Aspenite Board
> > -Required root node properties:
> > -       - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168";
> > -
> > -PXA910 DKB Board
> > -Required root node properties:
> > -       - compatible = "mrvl,pxa910-dkb";
> > -
> > -MMP2 Brownstone Board
> > -Required root node properties:
> > -       - compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";
> > diff --git a/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml b/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml
> > new file mode 100644
> > index 0000000000000..dc9de506ac6e3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml
> > @@ -0,0 +1,31 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/mrvl/mrvl.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Marvell Platforms Device Tree Bindings
> > +
> > +maintainers:
> > +  - Lubomir Rintel <lkundrak@v3.sk>
> > +
> > +properties:
> > +  $nodename:
> > +    const: '/'
> > +  compatible:
> > +    oneOf:
> > +      - description: PXA168 Aspenite Board
> > +        items:
> > +          - enum:
> > +              - mrvl,pxa168-aspenite
> > +          - const: mrvl,pxa168
> > +      - description: PXA910 DKB Board
> > +        items:
> > +          - enum:
> > +              - mrvl,pxa910-dkb
> 
> Doesn't match what's in dts file:
> 
> arch/arm/boot/dts/pxa910-dkb.dts:       compatible =
> "mrvl,pxa910-dkb", "mrvl,pxa910";

It corresponds to the .txt bindings specification this commit is
converting. I thought it wouldn't be a good idea to do any changes to
the contents at the time the conversion is done.

I also don't understand why does the dts file specify the board-
specific compatible string. Surely "mrvl,pxa910" alone would be
sufficient?

> > +      - description: MMP2 Brownstone Board
> 
> If this entry is only for this board...
> 
> > +        items:
> > +          - enum:
> > +              - mrvl,mmp2-brownstone
> 
> ...then this can be a 'const' instead. Same for the others.

Sure, but is it preferable? I've actually done a "git grep -A3 enum
Documentation/devicetree/bindings/" to see if the single-element is
typically used and it seems like it is. Perhaps it's a good idea to
indicate to a human reader that this is a list that's expected to
eventually be extended with new elements.

In any case, there are more boards with MMP2 currently supported,
notably the XO-1.75 laptop. I've actually sent out the dts file for
review some time ago. I haven't added a separate compatible string for
it because I thought it is not necessary (see above).

> > +          - const: mrvl,mmp2
> > +...
> > --
> > 2.21.0

Thank you
Lubo


  reply	other threads:[~2019-08-27 13:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  9:26 [PATCH v2 00/20] Initial support for Marvell MMP3 SoC Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 01/20] dt-bindings: arm: cpu: Add Marvell MMP3 SMP enable method Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema Lubomir Rintel
2019-08-27 11:59   ` Rob Herring
2019-08-27 13:23     ` Lubomir Rintel [this message]
2019-08-27 13:36       ` Rob Herring
2019-08-22  9:26 ` [PATCH v2 03/20] dt-bindings: arm: mrvl: Document MMP3 compatible string Lubomir Rintel
2019-08-27 12:00   ` Rob Herring
2019-08-22  9:26 ` [PATCH v2 04/20] dt-bindings: mrvl,intc: Add a MMP3 interrupt controller Lubomir Rintel
2019-08-27 22:23   ` Rob Herring
2019-08-22  9:26 ` [PATCH v2 05/20] dt-bindings: phy-mmp3-usb: Add bindings Lubomir Rintel
2019-08-27 22:24   ` Rob Herring
2019-08-22  9:26 ` [PATCH v2 06/20] irqchip/mmp: do not use of_address_to_resource() to get mux regs Lubomir Rintel
2019-09-06 11:08   ` [tip: irq/core] irqchip/mmp: Do " tip-bot2 for Lubomir Rintel
2020-03-09 16:25   ` [PATCH v2 06/20] irqchip/mmp: do " Rob Herring
2020-03-09 16:28     ` Rob Herring
2019-08-22  9:26 ` [PATCH v2 07/20] irqchip/mmp: add missing chained_irq_{enter,exit}() Lubomir Rintel
2019-09-06 11:08   ` [tip: irq/core] irqchip/mmp: Add " tip-bot2 for Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 08/20] irqchip/mmp: mask off interrupts from other cores Lubomir Rintel
2019-09-06 11:08   ` [tip: irq/core] irqchip/mmp: Mask " tip-bot2 for Andres Salomon
2019-08-22  9:26 ` [PATCH v2 09/20] irqchip/mmp: coexist with GIC root IRQ controller Lubomir Rintel
2019-09-06 11:08   ` [tip: irq/core] irqchip/mmp: Coexist " tip-bot2 for Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 10/20] ARM: l2c: add definition for FWA in PL310 aux register Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 11/20] ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 12/20] ARM: mmp: map the PGU as well Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 13/20] ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 14/20] ARM: mmp: define MMP_CHIPID by the means of CIU_REG() Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 15/20] ARM: mmp: add support for MMP3 SoC Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 16/20] ARM: mmp: add SMP support Lubomir Rintel
2019-08-22 16:36   ` Florian Fainelli
2019-08-23  7:13     ` Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 17/20] ARM: mmp: move cputype.h to include/linux/soc/ Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 18/20] ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 19/20] phy: phy-mmp3-usb: add a new driver Lubomir Rintel
2019-08-22  9:26 ` [PATCH v2 20/20] ARM: dts: mmp3: Add MMP3 SoC dts file Lubomir Rintel
2019-08-22 10:31 ` [PATCH v2 00/20] Initial support for Marvell MMP3 SoC Marc Zyngier
2019-08-22 16:23   ` Olof Johansson
2019-08-23  7:21   ` Lubomir Rintel
2019-08-23  9:42     ` Marc Zyngier
2019-08-26 11:59       ` Lubomir Rintel
2019-08-30 14:26         ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=136a57cf3d293e3233f31d5ee660a6418726333a.camel@v3.sk \
    --to=lkundrak@v3.sk \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).