diff mbox series

[1/6] arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor

Message ID 20240423113151.2145120-2-alexander.stein@ew.tq-group.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series [1/6] arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor | expand

Commit Message

Alexander Stein April 23, 2024, 11:31 a.m. UTC
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(+)

Comments

Shawn Guo June 3, 2024, 1:12 a.m. UTC | #1
On Tue, Apr 23, 2024 at 01:31:46PM +0200, Alexander Stein wrote:
> 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>

Applied all, thanks!
diff mbox series

Patch

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>;
+		};
 	};
 };