Re: [PATCH v2 1/3] dt-bindings: mtd: refactor NAND bindings and add nand-controller-legacy.yaml

From: Frank Li

Date: Mon Mar 16 2026 - 19:47:50 EST


On Fri, Mar 13, 2026 at 06:34:50PM -0500, Rob Herring wrote:
> > --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/nand-controller-legacy.yaml
> > @@ -1,7 +1,7 @@
> > # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > %YAML 1.2
> > ---
> > -$id: http://devicetree.org/schemas/mtd/nand-controller.yaml#
> > +$id: http://devicetree.org/schemas/mtd/nand-controller-legacy.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > title: NAND Controller Common Properties
> > @@ -10,21 +10,22 @@ maintainers:
> > - Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> > - Richard Weinberger <richard@xxxxxx>
> >
> > -description: |
> > +description: >
> > The NAND controller should be represented with its own DT node, and
> > all NAND chips attached to this controller should be defined as
> > children nodes of the NAND controller. This representation should be
> > enforced even for simple controllers supporting only one chip.
> >
> > + This is only for legacy nand controller, new controller should use
> > + nand-controller.yaml
> > +
> > properties:
> > - $nodename:
> > - pattern: "^nand-controller(@.*)?"
> >
> > "#address-cells":
> > const: 1
> >
> > "#size-cells":
> > - const: 0
> > + enum: [0, 1]
> >
> > ranges: true
> >
> > @@ -39,33 +40,26 @@ properties:
> > minItems: 1
> > maxItems: 8
> >
> > + partitions:
> > + type: object
> > +
> > + required:
> > + - compatible
> > +
> > patternProperties:
> > "^nand@[a-f0-9]$":
> > type: object
> > $ref: raw-nand-chip.yaml#
>
> Shouldn't this be removed? The main thing is legacy bindings don't have
> these nand nodes.

Support both to provide migration path. Need support both to make existing
boards migration to new layout.

The i.MX8's old boards use old layer out. but new boards, we expect use new
layout, but they use the same compatible string.


>
> >
> > -required:
> > - - "#address-cells"
> > - - "#size-cells"
> > + "^partition@[0-9a-f]+$":
> > + type: object
> > + $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
> > + deprecated: true
>
> Is there any .dts (in tree) with partition nodes not under 'partitions'
> node. Maybe this can be omitted.

arch/arm/boot/dts/nxp/imx/imx27-apf27.dts

Frank