linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Crystal Wood <oss@buserror.net>
Cc: j.ne@posteo.net, devicetree@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	imx@lists.linux.dev, "Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Naveen N Rao" <naveen@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	"Niklas Cassel" <cassel@kernel.org>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"Lee Jones" <lee@kernel.org>, "Vinod Koul" <vkoul@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"J. Neuschäfer" <j.neuschaefer@gmx.net>,
	"Wim Van Sebroeck" <wim@linux-watchdog.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Mark Brown" <broonie@kernel.org>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-watchdog@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org,
	"Li Yang" <leoyang.li@nxp.com>,
	"John Ogness" <john.ogness@linutronix.de>
Subject: Re: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Date: Mon, 10 Feb 2025 15:53:24 -0600	[thread overview]
Message-ID: <20250210215324.GA1040564-robh@kernel.org> (raw)
In-Reply-To: <Z6kQpuQf5m-bXTyt@buserror.net>

On Sun, Feb 09, 2025 at 02:31:34PM -0600, Crystal Wood wrote:
> On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
> > From: "J. Neuschäfer" <j.ne@posteo.net>
> > 
> > Convert the Freescale localbus controller bindings from text form to
> > YAML. The updated list of compatible strings reflects current usage
> > in arch/powerpc/boot/dts/, except that many existing device trees
> > erroneously specify "simple-bus" in addition to fsl,*elbc.
> > 
> > Changes compared to the txt version:
> >  - removed the board-control (fsl,mpc8272ads-bcsr) node because it only
> >    appears in this example and nowhere else
> >  - added a new example with NAND flash
> >  - updated list of compatible strings
> > 
> > Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> > ---
> > 
> > V2:
> > - fix order of properties in examples, according to dts coding style
> > - move to Documentation/devicetree/bindings/memory-controllers
> > - clarify the commit message a tiny bit
> > - remove unnecessary multiline markers (|)
> > - define address format in patternProperties
> > - trim subject line (remove "binding")
> > - remove use of "simple-bus", because it's technically incorrect
> 
> While I admit I haven't been following recent developments in this area,
> as someone who was involved when "simple-bus" was created (and was on the
> ePAPR committee that standardized it) I'm surprised to hear simple-bus
> being called "erroneous" or "technically incorrect" here.

Erroneous because the binding did not say "simple-bus" was used. Not 
uncommon with the old .txt bindings.

Generally, if a bus has control registers or resources like clocks, then 
we tend not to call them 'simple-bus'. And '"specific-bus", 
"simple-bus"' gives some problems around what driver if any do you 
bind to. 

If you have chip selects, then you have config registers for those. 
Not really "simple" if you ask me. That being said, you could keep 
'simple-bus' here. I would tend to err on making the schema match the 
actual .dts rather than updating the .dts files on older platforms like 
these.

> For non-NAND devices this bus generally meets the definition of "an
> internal I/O bus that cannot be probed for devices" where "devices on the
> bus can be accessed directly without additional configuration
> required".  NAND flash is an exception, but those devices have
> compatibles that are specific to the bus controller.

NAND bindings have evolved quite a bit if you haven't been paying 
attention.

> The fact that the address encoding is non-linear is irrelevant; the
> addresses can still be translated using the standard "ranges" mechanism. 
> This seems to be a disconnect between the schema verification and the way
> the compatible has previously been defined and used.
> 
> And as a practical matter, unless I'm missing something (which I might be
> since I haven't been in devicetree-land for nearly a decade), Linux is
> relying on simple-bus to probe these devices.  There is a driver that
> binds to the bus itself but that is just for error interrupts and NAND.
> 
> You'd probably need something like commit 3e25f800afb82bd9e5f8 ("memory:
> fsl_ifc: populate child devices without relying on simple-bus") and the 
> subsequent fix in dd8adc713b1656 ("memory: fsl_ifc: populate child
> nodes of buses and mfd devices")...
> 
> I'm curious what the reasoning was for removing simple-bus from IFC.  It
> seems that the schema verification also played a role in that:
> https://www.spinics.net/lists/devicetree/msg220418.html

If a kernel change is needed to support changed .dts files, then we 
shouldn't be doing that here (being mature platforms). That would mean 
new DTB will not work with existing kernels.

> 
> ...but there's also the comment in 985ede63a045eabf3f9d ("dt-bindings:
> memory: fsl: convert ifc binding to yaml schema") that "this will help to
> enforce the correct probe order between parent device and child devices",
> but was that really not already guaranteed by the parent/child
> relationship (and again, it should only really matter for NAND except for
> the possibility of missing error reports during early boot)?
> 
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - fsl,mpc8313-elbc
> > +              - fsl,mpc8315-elbc
> > +              - fsl,mpc8377-elbc
> > +              - fsl,mpc8378-elbc
> > +              - fsl,mpc8379-elbc
> > +              - fsl,mpc8536-elbc
> > +              - fsl,mpc8569-elbc
> > +              - fsl,mpc8572-elbc
> > +              - fsl,p1020-elbc
> > +              - fsl,p1021-elbc
> > +              - fsl,p1023-elbc
> > +              - fsl,p2020-elbc
> > +              - fsl,p2041-elbc
> > +              - fsl,p3041-elbc
> > +              - fsl,p4080-elbc
> > +              - fsl,p5020-elbc
> > +              - fsl,p5040-elbc
> > +          - const: fsl,elbc
> 
> Is it really necessary to list every single chip?

Yes. If they exist, they have to be documented.

> 
> And then it would need to be updated when new ones came out?  I know this
> particular line of chips is not going to see any new members at this
> point, but as far as the general approach goes...
> 
> Does the schema validation complain if it sees an extra compatible it
> doesn't recognize?  If so that's obnoxious.

Yes.

More annoying is having to boot and debug typos:

compatible = "foo,bar", "simplebus";

Rob

  parent reply	other threads:[~2025-02-10 21:53 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 21:30 [PATCH v2 00/12] YAML conversion of several Freescale/PowerPC DT bindings J. Neuschäfer via B4 Relay
2025-02-07 21:30 ` [PATCH v2 01/12] dt-bindings: powerpc: Add Freescale/NXP MPC83xx SoCs J. Neuschäfer via B4 Relay
2025-02-07 21:30 ` [PATCH v2 02/12] dt-bindings: ata: Convert fsl,pq-sata to YAML J. Neuschäfer via B4 Relay
2025-02-07 23:17   ` Damien Le Moal
2025-02-07 21:30 ` [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 " J. Neuschäfer via B4 Relay
2025-02-10 19:30   ` [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 to YAMLy Frank Li
2025-02-12 19:33   ` [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 to YAML Rob Herring
2025-02-14  2:04     ` J. Neuschäfer
2025-02-07 21:30 ` [PATCH v2 04/12] dt-bindings: mfd: Convert fsl,mcu-mpc8349emitx " J. Neuschäfer via B4 Relay
2025-02-07 21:30 ` [PATCH v2 05/12] dt-bindings: dma: Convert fsl,elo*-dma " J. Neuschäfer via B4 Relay
2025-02-10 19:39   ` Frank Li
2025-02-14 12:35     ` J. Neuschäfer
2025-02-25 12:54       ` J. Neuschäfer
2025-02-12 19:38   ` Rob Herring
2025-02-07 21:30 ` [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie " J. Neuschäfer via B4 Relay
2025-02-07 23:44   ` Rob Herring (Arm)
2025-02-08  1:26   ` kernel test robot
2025-02-09  0:06   ` J. Neuschäfer
2025-02-10 21:25     ` Rob Herring
2025-02-07 21:30 ` [PATCH v2 07/12] dt-bindings: watchdog: Convert mpc8xxx-wdt " J. Neuschäfer via B4 Relay
2025-02-07 21:30 ` [PATCH v2 08/12] dt-bindings: spi: Convert Freescale SPI bindings " J. Neuschäfer via B4 Relay
2025-02-10 19:42   ` Frank Li
2025-02-12 19:43   ` Rob Herring
2025-02-07 21:30 ` [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc " J. Neuschäfer via B4 Relay
2025-02-07 23:44   ` Rob Herring (Arm)
2025-02-09 17:28     ` J. Neuschäfer
2025-02-09 17:30       ` Krzysztof Kozlowski
2025-02-09 17:45         ` J. Neuschäfer
2025-02-09 20:31   ` Crystal Wood
2025-02-09 20:49     ` Crystal Wood
2025-02-10 11:31     ` J. Neuschäfer
2025-02-10 21:53     ` Rob Herring [this message]
2025-02-16 15:59       ` J. Neuschäfer
2025-02-07 21:30 ` [PATCH v2 10/12] dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio J. Neuschäfer via B4 Relay
2025-02-10 19:45   ` Frank Li
2025-02-12 19:44   ` Rob Herring (Arm)
2025-02-07 21:30 ` [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nand J. Neuschäfer via B4 Relay
2025-02-07 23:45   ` Rob Herring (Arm)
2025-02-10 19:47   ` [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nandy Frank Li
2025-02-11  0:01   ` [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nand Rob Herring
2025-02-16 17:39     ` J. Neuschäfer
2025-02-07 21:30 ` [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern J. Neuschäfer via B4 Relay
2025-02-10  8:27   ` Miquel Raynal
2025-02-16 18:12     ` J. Neuschäfer
2025-02-17  9:31       ` Miquel Raynal
2025-02-17 10:21         ` J. Neuschäfer
2025-02-07 21:38 ` [PATCH v2 00/12] YAML conversion of several Freescale/PowerPC DT bindings Mark Brown
2025-02-08  2:20   ` J. Neuschäfer
2025-02-10 12:59     ` Mark Brown
2025-02-10 15:57       ` J. Neuschäfer
2025-02-10 16:19         ` Mark Brown

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=20250210215324.GA1040564-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=cassel@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=imx@lists.linux.dev \
    --cc=j.ne@posteo.net \
    --cc=j.neuschaefer@gmx.net \
    --cc=john.ogness@linutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kw@linux.com \
    --cc=lee@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lpieralisi@kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=oss@buserror.net \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    --cc=wim@linux-watchdog.org \
    /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).