[PATCH v7 3/4] dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme

Miquel Raynal miquel.raynal at bootlin.com
Thu Jun 1 00:40:09 PDT 2023


Hi Chris,

Chris.Packham at alliedtelesis.co.nz wrote on Wed, 31 May 2023 22:43:46
+0000:

> Hi Miquel,
> 
> On 31/05/23 11:54, Chris Packham wrote:
> > From: Vadym Kochan <vadym.kochan at plvision.eu>
> >
> > Switch the DT binding to a YAML schema to enable the DT validation.
> >
> > Dropped deprecated compatibles and properties described in txt file.
> >
> > Signed-off-by: Vadym Kochan <vadym.kochan at plvision.eu>
> > Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
> > ---  
> <snip>
> > diff --git a/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml
> > new file mode 100644
> > index 000000000000..7cd4a2e99343
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml
> > @@ -0,0 +1,221 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Marvell NAND Flash Controller (NFC)
> > +
> > +maintainers:
> > +  - Miquel Raynal <miquel.raynal at bootlin.com>
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - const: marvell,armada-8k-nand-controller
> > +          - const: marvell,armada370-nand-controller  
> 
> On this specific point. Was your intention to allow just the 
> "marvell,armada-8k-nand-controller" compatible?
> 
> I made it a list as the existing usage is `compatible = 
> "marvell,armada-8k-nand-controller", 
> "marvell,armada370-nand-controller";` but an earlier comment you made 
> suggested that your intention was to allow just the 8k compatible on 
> it's own.

To be honest I don't recall. Sometimes it's best to consider a version
of a controller to be a superset of another, in this case both
compatibles are welcome. I suggest you keep the description as it is.

> Looking at the driver it doesn't do any is_compatible() checks 
> so I don't think it cares (currently).
> 
> > +      - enum:
> > +          - marvell,armada370-nand-controller
> > +          - marvell,pxa3xx-nand-controller
> > +          - marvell,armada-8k-nand
> > +          - marvell,armada370-nand
> > +          - marvell,pxa3xx-nand
> >   


Thanks,
Miquèl



More information about the linux-arm-kernel mailing list