All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
	linux@ew.tq-group.com, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/6] arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor
Date: Tue, 23 Apr 2024 13:31:46 +0200	[thread overview]
Message-ID: <20240423113151.2145120-2-alexander.stein@ew.tq-group.com> (raw)
In-Reply-To: <20240423113151.2145120-1-alexander.stein@ew.tq-group.com>

The bootloader adds MTD partitions in this subnode if present, or in the
spi-nor node itself otherwise. Direct children cause warnings like:
425e0000.spi: ofpart partition /soc@0/bus@42000000/spi@425e0000/flash@0/
  partition@600000 (/soc@0/bus@42000000/spi@425e0000/flash@0) #size-cells
  is wrongly set to <0>, assuming <1> for parsing partitions.

This is due flexspi node having #size-cells = <0>. Setting #size-cells in
MTD nodes itself is deprecated by mtd.yaml.
Fix all this by adding an empty partitions node which the bootloader will
fill with configured MTD partitions.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
index 9d2328c185c90..edbd8cad35bca 100644
--- a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
@@ -75,6 +75,12 @@ flash0: flash@0 {
 		spi-max-frequency = <62000000>;
 		spi-tx-bus-width = <4>;
 		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
 	};
 };
 
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
	linux@ew.tq-group.com, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/6] arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor
Date: Tue, 23 Apr 2024 13:31:46 +0200	[thread overview]
Message-ID: <20240423113151.2145120-2-alexander.stein@ew.tq-group.com> (raw)
In-Reply-To: <20240423113151.2145120-1-alexander.stein@ew.tq-group.com>

The bootloader adds MTD partitions in this subnode if present, or in the
spi-nor node itself otherwise. Direct children cause warnings like:
425e0000.spi: ofpart partition /soc@0/bus@42000000/spi@425e0000/flash@0/
  partition@600000 (/soc@0/bus@42000000/spi@425e0000/flash@0) #size-cells
  is wrongly set to <0>, assuming <1> for parsing partitions.

This is due flexspi node having #size-cells = <0>. Setting #size-cells in
MTD nodes itself is deprecated by mtd.yaml.
Fix all this by adding an empty partitions node which the bootloader will
fill with configured MTD partitions.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
index 9d2328c185c90..edbd8cad35bca 100644
--- a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi
@@ -75,6 +75,12 @@ flash0: flash@0 {
 		spi-max-frequency = <62000000>;
 		spi-tx-bus-width = <4>;
 		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
 	};
 };
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

       reply	other threads:[~2024-04-23 11:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240423113151.2145120-1-alexander.stein@ew.tq-group.com>
2024-04-23 11:31 ` Alexander Stein [this message]
2024-04-23 11:31   ` [PATCH 1/6] arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor Alexander Stein
2024-06-03  1:12   ` Shawn Guo
2024-06-03  1:12     ` Shawn Guo
2024-04-23 11:31 ` [PATCH 2/6] arm64: dts: freescale: tqma8mqml: " Alexander Stein
2024-04-23 11:31   ` Alexander Stein
2024-04-23 11:31 ` [PATCH 3/6] arm64: dts: freescale: tqma8mqnl: " Alexander Stein
2024-04-23 11:31   ` Alexander Stein
2024-04-23 11:31 ` [PATCH 4/6] arm64: dts: freescale: tqma8mpql: " Alexander Stein
2024-04-23 11:31   ` Alexander Stein
2024-04-23 11:31 ` [PATCH 5/6] arm64: dts: freescale: tqma8mq: " Alexander Stein
2024-04-23 11:31   ` Alexander Stein
2024-04-23 11:31 ` [PATCH 6/6] arm64: dts: freescale: tqma8xx: " Alexander Stein
2024-04-23 11:31   ` Alexander Stein

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=20240423113151.2145120-2-alexander.stein@ew.tq-group.com \
    --to=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@ew.tq-group.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.