[PATCH 0/3] mtd: rawnand: mxc: set raw chip's to child nand@0

Frank Li via B4 Relay posted 3 patches 4 weeks ago
drivers/mtd/nand/raw/fsl_ifc_nand.c        | 10 +++++++++-
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 11 ++++++++++-
drivers/mtd/nand/raw/mxc_nand.c            | 10 +++++++++-
3 files changed, 28 insertions(+), 3 deletions(-)
[PATCH 0/3] mtd: rawnand: mxc: set raw chip's to child nand@0
Posted by Frank Li via B4 Relay 4 weeks ago
The nand-controller.yaml binding requires a child node (e.g. nand@0) under
the NAND controller. However, the driver currently assigns the controller's
of_node directly to the NAND chip.

Search for the first child node with the "nand" prefix and assign it to
chip->of_node. This filters out properties such as "partition" that may be
placed under the controller node in some older DTS files.

Fall back to using the controller's of_node if no suitable child node is
found to maintain backward compatibility.

This issue went unnoticed because the default behavior works for most NAND
chips.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Frank Li (3):
      mtd: rawnand: gpmi: set chip->of_node to nand@0 child node if present
      mtd: rawnand: mxc: set chip->of_node to nand@0 child node if present
      mtd: rawnand: ifc: set chip->of_node to nand@0 child node if present

 drivers/mtd/nand/raw/fsl_ifc_nand.c        | 10 +++++++++-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 11 ++++++++++-
 drivers/mtd/nand/raw/mxc_nand.c            | 10 +++++++++-
 3 files changed, 28 insertions(+), 3 deletions(-)
---
base-commit: fc7b1a72c6cd5cbbd989c6c32a6486e3e4e3594d
change-id: 20260304-gpmi_nand-f87065d828ef

Best regards,
--
Frank Li <Frank.Li@nxp.com>
Re: [PATCH 0/3] mtd: rawnand: mxc: set raw chip's to child nand@0
Posted by Miquel Raynal 3 weeks, 6 days ago
On Tue, 10 Mar 2026 15:07:36 -0400, Frank Li wrote:
> The nand-controller.yaml binding requires a child node (e.g. nand@0) under
> the NAND controller. However, the driver currently assigns the controller's
> of_node directly to the NAND chip.
> 
> Search for the first child node with the "nand" prefix and assign it to
> chip->of_node. This filters out properties such as "partition" that may be
> placed under the controller node in some older DTS files.
> 
> [...]

Applied to nand/next, thanks!

[1/3] mtd: rawnand: gpmi: set chip->of_node to nand@0 child node if present
      commit: 3a6e21ea57c8118d3095f073aeaf9362dc2c3865
[2/3] mtd: rawnand: mxc: set chip->of_node to nand@0 child node if present
      commit: f7bd1948a5461df9e1027d5bd9a511e754146689
[3/3] mtd: rawnand: ifc: set chip->of_node to nand@0 child node if present
      commit: ee78d466db8a001d137d6f9c97010b343aee456b

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl