* [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo
@ 2023-12-18 13:06 Stefan Wahren
2023-12-18 13:06 ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description Stefan Wahren
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Stefan Wahren @ 2023-12-18 13:06 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Han Xu,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Fabio Estevam, Marek Vasut,
Sébastien Szymanski
Cc: Pengutronix Kernel Team, linux-imx, linux-mtd, devicetree,
linux-arm-kernel, Stefan Wahren
The initial description contained a typo.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
index 3c56efe48efd..327fa872c001 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: U-Boot bootloader partition
description: |
- U-Boot is a bootlodaer commonly used in embedded devices. It's almost always
+ U-Boot is a bootloader commonly used in embedded devices. It's almost always
located on some kind of flash device.
Device configuration is stored as a set of environment variables that are
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description
2023-12-18 13:06 [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Stefan Wahren
@ 2023-12-18 13:06 ` Stefan Wahren
2023-12-21 9:56 ` Sébastien Szymanski
2023-12-20 9:12 ` [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Miquel Raynal
2023-12-20 22:27 ` Rob Herring
2 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2023-12-18 13:06 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Han Xu,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Fabio Estevam, Marek Vasut,
Sébastien Szymanski
Cc: Pengutronix Kernel Team, linux-imx, linux-mtd, devicetree,
linux-arm-kernel, Stefan Wahren
The size-cells for GPMI are wrong in imx28.dtsi, which causes the
following warning:
nand-controller@8000c000: #size-cells:0:0: 0 was expected
The reason for this is the definition of the partitions directly
below the nand controller node. According to nand-controller.yaml
the NAND chip must be defined as a child of the controller. Even
the fixed partitions must be kept in a partitions container.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
Hi,
unfortunately i don't have access to MSR M28CU3 or an Armadeus Systems APF28
so it would be nice if someone can give a try.
arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts | 64 +++++++++++++---------
arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi | 2 -
arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts | 28 ++++++----
arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 2 +-
4 files changed, 56 insertions(+), 40 deletions(-)
diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
index 98672932e41b..10bfac31f672 100644
--- a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
+++ b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
@@ -27,39 +27,49 @@ &gpmi {
pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
status = "okay";
- partition@0 {
- label = "u-boot";
- reg = <0x0 0x300000>;
- };
+ nand@0 {
+ reg = <0>;
- partition@300000 {
- label = "env";
- reg = <0x300000 0x80000>;
- };
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
- partition@380000 {
- label = "env2";
- reg = <0x380000 0x80000>;
- };
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x300000>;
+ };
- partition@400000 {
- label = "dtb";
- reg = <0x400000 0x80000>;
- };
+ partition@300000 {
+ label = "env";
+ reg = <0x300000 0x80000>;
+ };
- partition@480000 {
- label = "splash";
- reg = <0x480000 0x80000>;
- };
+ partition@380000 {
+ label = "env2";
+ reg = <0x380000 0x80000>;
+ };
- partition@500000 {
- label = "kernel";
- reg = <0x500000 0x800000>;
- };
+ partition@400000 {
+ label = "dtb";
+ reg = <0x400000 0x80000>;
+ };
+
+ partition@480000 {
+ label = "splash";
+ reg = <0x480000 0x80000>;
+ };
+
+ partition@500000 {
+ label = "kernel";
+ reg = <0x500000 0x800000>;
+ };
- partition@d00000 {
- label = "rootfs";
- reg = <0xd00000 0xf300000>;
+ partition@d00000 {
+ label = "rootfs";
+ reg = <0xd00000 0xf300000>;
+ };
+ };
};
};
diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
index 66facef10ba9..54b0f715f091 100644
--- a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
+++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
@@ -24,8 +24,6 @@ reg_3p3v: regulator-0 {
};
&gpmi {
- #address-cells = <1>;
- #size-cells = <1>;
pinctrl-names = "default";
pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
status = "okay";
diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
index 34b4d3246db1..d069ac907490 100644
--- a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
+++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
@@ -93,21 +93,29 @@ &duart {
};
&gpmi {
- #address-cells = <1>;
- #size-cells = <1>;
pinctrl-names = "default";
pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
status = "okay";
- partition@0 {
- label = "gpmi-nfc-0-boot";
- reg = <0x00000000 0x01400000>;
- read-only;
- };
+ nand@0 {
+ reg = <0>;
- partition@1 {
- label = "gpmi-nfc-general-use";
- reg = <0x01400000 0x0ec00000>;
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "gpmi-nfc-0-boot";
+ reg = <0x00000000 0x01400000>;
+ read-only;
+ };
+
+ partition@1 {
+ label = "gpmi-nfc-general-use";
+ reg = <0x01400000 0x0ec00000>;
+ };
+ };
};
};
diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
index 4817fba2d938..9655403b7f90 100644
--- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
+++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
@@ -99,7 +99,7 @@ perfmon: perfmon@80006000 {
gpmi: nand-controller@8000c000 {
compatible = "fsl,imx28-gpmi-nand";
#address-cells = <1>;
- #size-cells = <1>;
+ #size-cells = <0>;
reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
reg-names = "gpmi-nand", "bch";
interrupts = <41>;
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo
2023-12-18 13:06 [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Stefan Wahren
2023-12-18 13:06 ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description Stefan Wahren
@ 2023-12-20 9:12 ` Miquel Raynal
2023-12-20 22:27 ` Rob Herring
2 siblings, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2023-12-20 9:12 UTC (permalink / raw)
To: Stefan Wahren, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Han Xu, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, Sascha Hauer, Fabio Estevam, Marek Vasut,
Sébastien Szymanski
Cc: Pengutronix Kernel Team, linux-imx, linux-mtd, devicetree,
linux-arm-kernel
On Mon, 2023-12-18 at 13:06:55 UTC, Stefan Wahren wrote:
> The initial description contained a typo.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo
2023-12-18 13:06 [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Stefan Wahren
2023-12-18 13:06 ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description Stefan Wahren
2023-12-20 9:12 ` [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Miquel Raynal
@ 2023-12-20 22:27 ` Rob Herring
2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2023-12-20 22:27 UTC (permalink / raw)
To: Stefan Wahren
Cc: Marek Vasut, devicetree, Conor Dooley, Pengutronix Kernel Team,
Richard Weinberger, Sascha Hauer, Shawn Guo, Rob Herring,
linux-mtd, linux-imx, Krzysztof Kozlowski, Miquel Raynal, Han Xu,
Fabio Estevam, linux-arm-kernel, Vignesh Raghavendra
On Mon, 18 Dec 2023 14:06:55 +0100, Stefan Wahren wrote:
> The initial description contained a typo.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> ---
> Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description
2023-12-18 13:06 ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description Stefan Wahren
@ 2023-12-21 9:56 ` Sébastien Szymanski
2023-12-21 10:16 ` Miquel Raynal
2023-12-21 14:40 ` Stefan Wahren
0 siblings, 2 replies; 7+ messages in thread
From: Sébastien Szymanski @ 2023-12-21 9:56 UTC (permalink / raw)
To: Stefan Wahren, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Han Xu, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, Sascha Hauer, Fabio Estevam, Marek Vasut
Cc: Pengutronix Kernel Team, linux-imx, linux-mtd, devicetree,
linux-arm-kernel
Hello Stefan,
On 12/18/23 14:06, Stefan Wahren wrote:
> The size-cells for GPMI are wrong in imx28.dtsi, which causes the
> following warning:
>
> nand-controller@8000c000: #size-cells:0:0: 0 was expected
>
> The reason for this is the definition of the partitions directly
> below the nand controller node. According to nand-controller.yaml
> the NAND chip must be defined as a child of the controller. Even
> the fixed partitions must be kept in a partitions container.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> ---
>
> Hi,
> unfortunately i don't have access to MSR M28CU3 or an Armadeus Systems APF28
> so it would be nice if someone can give a try.
I have tried this patch on an APF28. Unfortunately it doesn't work:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 6.7.0-rc6 (sszy@gentoo)
(arm-buildroot-linux-gnueabi-gcc.br_real (Buildroot
armadeus-7.0-387-g06d2e893315e-dirty) 12.3.0, GNU ld (GNU Binutils)
2.40) #1 Thu Dec 21 10:24:41 CET 2023
...
[ 4.224482] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[ 4.231238] nand: Micron MT29F2G08ABAEAWP
[ 4.235399] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[ 4.245851] Scanning device for bad blocks
[ 4.252904] Bad eraseblock 0 at 0x000000000000
[ 4.257842] Bad eraseblock 1 at 0x000000020000
[ 4.262972] Bad eraseblock 2 at 0x000000040000
[ 4.267886] Bad eraseblock 3 at 0x000000060000
[ 4.272994] Bad eraseblock 4 at 0x000000080000
[ 4.277900] Bad eraseblock 5 at 0x0000000a0000
[ 4.283007] Bad eraseblock 6 at 0x0000000c0000
[ 4.287916] Bad eraseblock 7 at 0x0000000e0000
[ 5.443712] gpmi-nand: ofpart partition
/apb@80000000/apbh@80000000/nand-controller@8000c000/nand@0
(/apb@80000000/apbh@80000000/nand-controller@8000c000) #size-cells is
wrongly set to <0>, assuming <1> for parsing partitions.
[ 5.464436] gpmi-nand: error parsing ofpart partition
/apb@80000000/apbh@80000000/nand-controller@8000c000/nand@0
(/apb@80000000/apbh@80000000/nand-controller@8000c000)
[ 5.523845] gpmi-nand 8000c000.nand-controller: driver registered.
Without this patch:
[ 5.443988] 7 fixed-partitions partitions found on MTD device gpmi-nand
[ 5.450992] Creating 7 MTD partitions on "gpmi-nand":
[ 5.456234] 0x000000000000-0x000000300000 : "u-boot"
[ 5.506409] 0x000000300000-0x000000380000 : "env"
[ 5.537298] 0x000000380000-0x000000400000 : "env2"
[ 5.568253] 0x000000400000-0x000000480000 : "dtb"
[ 5.598940] 0x000000480000-0x000000500000 : "splash"
[ 5.629766] 0x000000500000-0x000000d00000 : "kernel"
[ 5.661523] 0x000000d00000-0x000010000000 : "rootfs"
[ 5.710012] gpmi-nand 8000c000.nand-controller: driver registered.
Regards,
>
> arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts | 64 +++++++++++++---------
> arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi | 2 -
> arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts | 28 ++++++----
> arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 2 +-
> 4 files changed, 56 insertions(+), 40 deletions(-)
>
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
> index 98672932e41b..10bfac31f672 100644
> --- a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
> @@ -27,39 +27,49 @@ &gpmi {
> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> status = "okay";
>
> - partition@0 {
> - label = "u-boot";
> - reg = <0x0 0x300000>;
> - };
> + nand@0 {
> + reg = <0>;
>
> - partition@300000 {
> - label = "env";
> - reg = <0x300000 0x80000>;
> - };
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
>
> - partition@380000 {
> - label = "env2";
> - reg = <0x380000 0x80000>;
> - };
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0x300000>;
> + };
>
> - partition@400000 {
> - label = "dtb";
> - reg = <0x400000 0x80000>;
> - };
> + partition@300000 {
> + label = "env";
> + reg = <0x300000 0x80000>;
> + };
>
> - partition@480000 {
> - label = "splash";
> - reg = <0x480000 0x80000>;
> - };
> + partition@380000 {
> + label = "env2";
> + reg = <0x380000 0x80000>;
> + };
>
> - partition@500000 {
> - label = "kernel";
> - reg = <0x500000 0x800000>;
> - };
> + partition@400000 {
> + label = "dtb";
> + reg = <0x400000 0x80000>;
> + };
> +
> + partition@480000 {
> + label = "splash";
> + reg = <0x480000 0x80000>;
> + };
> +
> + partition@500000 {
> + label = "kernel";
> + reg = <0x500000 0x800000>;
> + };
>
> - partition@d00000 {
> - label = "rootfs";
> - reg = <0xd00000 0xf300000>;
> + partition@d00000 {
> + label = "rootfs";
> + reg = <0xd00000 0xf300000>;
> + };
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
> index 66facef10ba9..54b0f715f091 100644
> --- a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
> @@ -24,8 +24,6 @@ reg_3p3v: regulator-0 {
> };
>
> &gpmi {
> - #address-cells = <1>;
> - #size-cells = <1>;
> pinctrl-names = "default";
> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> status = "okay";
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
> index 34b4d3246db1..d069ac907490 100644
> --- a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
> @@ -93,21 +93,29 @@ &duart {
> };
>
> &gpmi {
> - #address-cells = <1>;
> - #size-cells = <1>;
> pinctrl-names = "default";
> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> status = "okay";
>
> - partition@0 {
> - label = "gpmi-nfc-0-boot";
> - reg = <0x00000000 0x01400000>;
> - read-only;
> - };
> + nand@0 {
> + reg = <0>;
>
> - partition@1 {
> - label = "gpmi-nfc-general-use";
> - reg = <0x01400000 0x0ec00000>;
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "gpmi-nfc-0-boot";
> + reg = <0x00000000 0x01400000>;
> + read-only;
> + };
> +
> + partition@1 {
> + label = "gpmi-nfc-general-use";
> + reg = <0x01400000 0x0ec00000>;
> + };
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> index 4817fba2d938..9655403b7f90 100644
> --- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> @@ -99,7 +99,7 @@ perfmon: perfmon@80006000 {
> gpmi: nand-controller@8000c000 {
> compatible = "fsl,imx28-gpmi-nand";
> #address-cells = <1>;
> - #size-cells = <1>;
> + #size-cells = <0>;
> reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
> reg-names = "gpmi-nand", "bch";
> interrupts = <41>;
> --
> 2.34.1
>
--
Sébastien Szymanski, Armadeus Systems
Software engineer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description
2023-12-21 9:56 ` Sébastien Szymanski
@ 2023-12-21 10:16 ` Miquel Raynal
2023-12-21 14:40 ` Stefan Wahren
1 sibling, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2023-12-21 10:16 UTC (permalink / raw)
To: Sébastien Szymanski
Cc: Stefan Wahren, Richard Weinberger, Vignesh Raghavendra, Han Xu,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Fabio Estevam, Marek Vasut, Pengutronix Kernel Team,
linux-imx, linux-mtd, devicetree, linux-arm-kernel
Hello,
sebastien.szymanski@armadeus.com wrote on Thu, 21 Dec 2023 10:56:09
+0100:
> Hello Stefan,
>
> On 12/18/23 14:06, Stefan Wahren wrote:
> > The size-cells for GPMI are wrong in imx28.dtsi, which causes the
> > following warning:
> >
> > nand-controller@8000c000: #size-cells:0:0: 0 was expected
> >
> > The reason for this is the definition of the partitions directly
> > below the nand controller node. According to nand-controller.yaml
> > the NAND chip must be defined as a child of the controller. Even
> > the fixed partitions must be kept in a partitions container.
Bindings evolve over time, we sometimes deprecate them when they are
problematic but:
- the old representations are still accepted (but marked legacy)
- if you want to support the new representation you probably need to
update the controller driver as well (to support both).
In this case I would expect a deprecation notice rather than a pure
error.
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description
2023-12-21 9:56 ` Sébastien Szymanski
2023-12-21 10:16 ` Miquel Raynal
@ 2023-12-21 14:40 ` Stefan Wahren
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Wahren @ 2023-12-21 14:40 UTC (permalink / raw)
To: Sébastien Szymanski, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Han Xu, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, Sascha Hauer, Fabio Estevam, Marek Vasut
Cc: Pengutronix Kernel Team, linux-imx, linux-mtd, devicetree,
linux-arm-kernel
Hi,
Am 21.12.23 um 10:56 schrieb Sébastien Szymanski:
> Hello Stefan,
>
> On 12/18/23 14:06, Stefan Wahren wrote:
>> The size-cells for GPMI are wrong in imx28.dtsi, which causes the
>> following warning:
>>
>> nand-controller@8000c000: #size-cells:0:0: 0 was expected
>>
>> The reason for this is the definition of the partitions directly
>> below the nand controller node. According to nand-controller.yaml
>> the NAND chip must be defined as a child of the controller. Even
>> the fixed partitions must be kept in a partitions container.
>>
>> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
>> ---
>>
>> Hi,
>> unfortunately i don't have access to MSR M28CU3 or an Armadeus
>> Systems APF28
>> so it would be nice if someone can give a try.
>
> I have tried this patch on an APF28. Unfortunately it doesn't work:
>
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 6.7.0-rc6 (sszy@gentoo)
> (arm-buildroot-linux-gnueabi-gcc.br_real (Buildroot
> armadeus-7.0-387-g06d2e893315e-dirty) 12.3.0, GNU ld (GNU Binutils)
> 2.40) #1 Thu Dec 21 10:24:41 CET 2023
>
> ...
>
> [ 4.224482] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
> [ 4.231238] nand: Micron MT29F2G08ABAEAWP
> [ 4.235399] nand: 256 MiB, SLC, erase size: 128 KiB, page size:
> 2048, OOB size: 64
> [ 4.245851] Scanning device for bad blocks
> [ 4.252904] Bad eraseblock 0 at 0x000000000000
> [ 4.257842] Bad eraseblock 1 at 0x000000020000
> [ 4.262972] Bad eraseblock 2 at 0x000000040000
> [ 4.267886] Bad eraseblock 3 at 0x000000060000
> [ 4.272994] Bad eraseblock 4 at 0x000000080000
> [ 4.277900] Bad eraseblock 5 at 0x0000000a0000
> [ 4.283007] Bad eraseblock 6 at 0x0000000c0000
> [ 4.287916] Bad eraseblock 7 at 0x0000000e0000
> [ 5.443712] gpmi-nand: ofpart partition
> /apb@80000000/apbh@80000000/nand-controller@8000c000/nand@0
> (/apb@80000000/apbh@80000000/nand-controller@8000c000) #size-cells is
> wrongly set to <0>, assuming <1> for parsing partitions.
i was too naive by assuming that dt-binding and driver are in sync. I
looked a little bit at the code and DT parsing is done outside of
gpmi-nand by parsers/ofpart_core. So at least the right part is
triggered. Unfortunately the parser seems to look at the wrong node.
Unfortunately i don't have a NAND setup to investigate further. Sorry, i
thought this was a low hanging fruit :-(
> [ 5.464436] gpmi-nand: error parsing ofpart partition
> /apb@80000000/apbh@80000000/nand-controller@8000c000/nand@0
> (/apb@80000000/apbh@80000000/nand-controller@8000c000)
> [ 5.523845] gpmi-nand 8000c000.nand-controller: driver registered.
>
> Without this patch:
>
> [ 5.443988] 7 fixed-partitions partitions found on MTD device
> gpmi-nand
> [ 5.450992] Creating 7 MTD partitions on "gpmi-nand":
> [ 5.456234] 0x000000000000-0x000000300000 : "u-boot"
> [ 5.506409] 0x000000300000-0x000000380000 : "env"
> [ 5.537298] 0x000000380000-0x000000400000 : "env2"
> [ 5.568253] 0x000000400000-0x000000480000 : "dtb"
> [ 5.598940] 0x000000480000-0x000000500000 : "splash"
> [ 5.629766] 0x000000500000-0x000000d00000 : "kernel"
> [ 5.661523] 0x000000d00000-0x000010000000 : "rootfs"
> [ 5.710012] gpmi-nand 8000c000.nand-controller: driver registered.
>
> Regards,
>
>>
>> arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts | 64 +++++++++++++---------
>> arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi | 2 -
>> arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts | 28 ++++++----
>> arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 2 +-
>> 4 files changed, 56 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
>> b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
>> index 98672932e41b..10bfac31f672 100644
>> --- a/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
>> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-apf28.dts
>> @@ -27,39 +27,49 @@ &gpmi {
>> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
>> status = "okay";
>>
>> - partition@0 {
>> - label = "u-boot";
>> - reg = <0x0 0x300000>;
>> - };
>> + nand@0 {
>> + reg = <0>;
>>
>> - partition@300000 {
>> - label = "env";
>> - reg = <0x300000 0x80000>;
>> - };
>> + partitions {
>> + compatible = "fixed-partitions";
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>>
>> - partition@380000 {
>> - label = "env2";
>> - reg = <0x380000 0x80000>;
>> - };
>> + partition@0 {
>> + label = "u-boot";
>> + reg = <0x0 0x300000>;
>> + };
>>
>> - partition@400000 {
>> - label = "dtb";
>> - reg = <0x400000 0x80000>;
>> - };
>> + partition@300000 {
>> + label = "env";
>> + reg = <0x300000 0x80000>;
>> + };
>>
>> - partition@480000 {
>> - label = "splash";
>> - reg = <0x480000 0x80000>;
>> - };
>> + partition@380000 {
>> + label = "env2";
>> + reg = <0x380000 0x80000>;
>> + };
>>
>> - partition@500000 {
>> - label = "kernel";
>> - reg = <0x500000 0x800000>;
>> - };
>> + partition@400000 {
>> + label = "dtb";
>> + reg = <0x400000 0x80000>;
>> + };
>> +
>> + partition@480000 {
>> + label = "splash";
>> + reg = <0x480000 0x80000>;
>> + };
>> +
>> + partition@500000 {
>> + label = "kernel";
>> + reg = <0x500000 0x800000>;
>> + };
>>
>> - partition@d00000 {
>> - label = "rootfs";
>> - reg = <0xd00000 0xf300000>;
>> + partition@d00000 {
>> + label = "rootfs";
>> + reg = <0xd00000 0xf300000>;
>> + };
>> + };
>> };
>> };
>>
>> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
>> b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
>> index 66facef10ba9..54b0f715f091 100644
>> --- a/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
>> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28.dtsi
>> @@ -24,8 +24,6 @@ reg_3p3v: regulator-0 {
>> };
>>
>> &gpmi {
>> - #address-cells = <1>;
>> - #size-cells = <1>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
>> status = "okay";
>> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
>> b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
>> index 34b4d3246db1..d069ac907490 100644
>> --- a/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
>> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-m28cu3.dts
>> @@ -93,21 +93,29 @@ &duart {
>> };
>>
>> &gpmi {
>> - #address-cells = <1>;
>> - #size-cells = <1>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
>> status = "okay";
>>
>> - partition@0 {
>> - label = "gpmi-nfc-0-boot";
>> - reg = <0x00000000 0x01400000>;
>> - read-only;
>> - };
>> + nand@0 {
>> + reg = <0>;
>>
>> - partition@1 {
>> - label = "gpmi-nfc-general-use";
>> - reg = <0x01400000 0x0ec00000>;
>> + partitions {
>> + compatible = "fixed-partitions";
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> +
>> + partition@0 {
>> + label = "gpmi-nfc-0-boot";
>> + reg = <0x00000000 0x01400000>;
>> + read-only;
>> + };
>> +
>> + partition@1 {
>> + label = "gpmi-nfc-general-use";
>> + reg = <0x01400000 0x0ec00000>;
>> + };
>> + };
>> };
>> };
>>
>> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
>> b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
>> index 4817fba2d938..9655403b7f90 100644
>> --- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
>> +++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
>> @@ -99,7 +99,7 @@ perfmon: perfmon@80006000 {
>> gpmi: nand-controller@8000c000 {
>> compatible = "fsl,imx28-gpmi-nand";
>> #address-cells = <1>;
>> - #size-cells = <1>;
>> + #size-cells = <0>;
>> reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
>> reg-names = "gpmi-nand", "bch";
>> interrupts = <41>;
>> --
>> 2.34.1
>>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-21 14:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18 13:06 [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Stefan Wahren
2023-12-18 13:06 ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description Stefan Wahren
2023-12-21 9:56 ` Sébastien Szymanski
2023-12-21 10:16 ` Miquel Raynal
2023-12-21 14:40 ` Stefan Wahren
2023-12-20 9:12 ` [PATCH 1/2] dt-bindings: mtd: partitions: u-boot: Fix typo Miquel Raynal
2023-12-20 22:27 ` Rob Herring
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).