public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: "Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Han Xu" <han.xu@nxp.com>, "Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Marek Vasut" <marex@denx.de>,
	"Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
	linux-imx@nxp.com, linux-mtd@lists.infradead.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Stefan Wahren <wahrenst@gmx.net>
Subject: [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description
Date: Mon, 18 Dec 2023 14:06:56 +0100	[thread overview]
Message-ID: <20231218130656.9020-2-wahrenst@gmx.net> (raw)
In-Reply-To: <20231218130656.9020-1-wahrenst@gmx.net>

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


  reply	other threads:[~2023-12-18 13:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-12-21  9:56   ` [PATCH RFT 2/2] ARM: dts: mxs: imx28: Fix NAND hierarchy description 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

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=20231218130656.9020-2-wahrenst@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=han.xu@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastien.szymanski@armadeus.com \
    --cc=shawnguo@kernel.org \
    --cc=vigneshr@ti.com \
    /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