Skip to contentSkip to conversation

arm64: dts: ti: Describe flash partitions for J7 platforms

PATCH Superseded Vaishnav Achath 2 participants 7 messages May 3, 2023 – May 4, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: ti: Describe flash partitions for J7 platforms

This series adds flash partition description through DT, currently the flash partitions for J7 platforms is described through the mtdparts commandline parameter passed from bootloader, this requires maintenance of the partition information in a mtdparts string which is error prone.

Once the flash partitions are described through DT, the support for mtdparts can be removed for these platforms from u-boot also.

Vaishnav Achath (4):
arm64: dts: ti: k3-j721e-som: Describe OSPI flash partition info
arm64: dts: ti: k3-j721e-som: Describe QSPI flash partition info
arm64: dts: ti: k3-j721e-sk: Describe OSPI flash partition info
arm64: dts: ti: k3-j7200-som: Describe OSPI and Hyperflash partition
info

 arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi   | 72 +++++++++++++++++++
 .../dts/ti/k3-j721e-common-proc-board.dts     | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi   | 46 ++++++++++++
 4 files changed, 210 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/4 arm64: dts: ti: k3-j721e-som: Describe OSPI flash partition info

Describe OSPI flash partition information through device tree, this helps to remove passing partition information through the mtdparts commandline parameter which requires maintaining the partition information in a string format. J721E SoM has a MT35 64 MiB OSPI flash with sector size of 128 KiB thus the size of the smallest partition is chosen as 128KiB, the partition names and offsets are chosen according to the corresponding name and offsets in bootloader.

---
 arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 46 +++++++++++++++++++++
 1 file changed, 46 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi +46 -0
index e289d5b44356..1472c11d6660 100644
@@ -182,6 +182,52 @@
 		cdns,tchsh-ns = <60>;
 		cdns,tslch-ns = <60>;
 		cdns,read-delay = <0>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "ospi.tiboot3";
+				reg = <0x0 0x80000>;
+			};
+
+			partition@80000 {
+				label = "ospi.tispl";
+				reg = <0x80000 0x200000>;
+			};
+
+			partition@280000 {
+				label = "ospi.u-boot";
+				reg = <0x280000 0x400000>;
+			};
+
+			partition@680000 {
+				label = "ospi.env";
+				reg = <0x680000 0x20000>;
+			};
+
+			partition@6a0000 {
+				label = "ospi.env.backup";
+				reg = <0x6a0000 0x20000>;
+			};
+
+			partition@6c0000 {
+				label = "ospi.sysfw";
+				reg = <0x6c0000 0x100000>;
+			};
+
+			partition@800000 {
+				label = "ospi.rootfs";
+				reg = <0x800000 0x37c0000>;
+			};
+
+			partition@3fe0000 {
+				label = "ospi.phypattern";
+				reg = <0x3fe0000 0x20000>;
+			};
+		};
 	};
 };
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/4 arm64: dts: ti: k3-j721e-som: Describe QSPI flash partition info

In reply to Vaishnav Achath

Describe OSPI flash partition information through device tree, this helps to remove passing partition information through the mtdparts commandline parameter which requires maintaining the partition information in a string format. J721E CPB has a MT25 64 MiB QSPI flash with sector size of 128 KiB thus the size of the smallest partition is chosen as 128 KiB, the partition names and offsets are chosen according to the corresponding name and offsets in bootloader.

---
 .../dts/ti/k3-j721e-common-proc-board.dts     | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +46 -0
index 7db0603125aa..d6873402ee76 100644
@@ -513,6 +513,52 @@
 		cdns,tchsh-ns = <60>;
 		cdns,tslch-ns = <60>;
 		cdns,read-delay = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "qspi.tiboot3";
+				reg = <0x0 0x80000>;
+			};
+
+			partition@80000 {
+				label = "qspi.tispl";
+				reg = <0x80000 0x200000>;
+			};
+
+			partition@280000 {
+				label = "qspi.u-boot";
+				reg = <0x280000 0x400000>;
+			};
+
+			partition@680000 {
+				label = "qspi.env";
+				reg = <0x680000 0x20000>;
+			};
+
+			partition@6a0000 {
+				label = "qspi.env.backup";
+				reg = <0x6a0000 0x20000>;
+			};
+
+			partition@6c0000 {
+				label = "qspi.sysfw";
+				reg = <0x6c0000 0x100000>;
+			};
+
+			partition@800000 {
+				label = "qspi.rootfs";
+				reg = <0x800000 0x37c0000>;
+			};
+
+			partition@3fe0000 {
+				label = "qspi.phypattern";
+				reg = <0x3fe0000 0x20000>;
+			};
+		};
 	};
 };
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/4 arm64: dts: ti: k3-j721e-sk: Describe OSPI flash partition info

In reply to Vaishnav Achath

Describe OSPI flash partition information through device tree, this helps to remove passing partition information through the mtdparts commandline parameter which requires maintaining the partition information in a string format. J721E SK has a S28 64 MiB OSPI flash with sector size of 256 KiB thus the size of the smallest partition is chosen as 256 KiB, the partition names and offsets are chosen according to the corresponding name and offsets in bootloader.

---
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 46 ++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-sk.dts +46 -0
index f650a7fd66b4..6d100a6aae05 100644
@@ -569,6 +569,52 @@
 		cdns,tchsh-ns = <60>;
 		cdns,tslch-ns = <60>;
 		cdns,read-delay = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "ospi.tiboot3";
+				reg = <0x0 0x80000>;
+			};
+
+			partition@80000 {
+				label = "ospi.tispl";
+				reg = <0x80000 0x200000>;
+			};
+
+			partition@280000 {
+				label = "ospi.u-boot";
+				reg = <0x280000 0x400000>;
+			};
+
+			partition@680000 {
+				label = "ospi.env";
+				reg = <0x680000 0x40000>;
+			};
+
+			partition@6c0000 {
+				label = "ospi.sysfw";
+				reg = <0x6c0000 0x100000>;
+			};
+
+			partition@7c0000 {
+				label = "ospi.env.backup";
+				reg = <0x7c0000 0x40000>;
+			};
+
+			partition@800000 {
+				label = "ospi.rootfs";
+				reg = <0x800000 0x37c0000>;
+			};
+
+			partition@3fc0000 {
+				label = "ospi.phypattern";
+				reg = <0x3fc0000 0x40000>;
+			};
+		};
 	};
 };
 
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/4 arm64: dts: ti: k3-j7200-som: Describe OSPI and Hyperflash partition info

In reply to Vaishnav Achath

Describe OSPI and Hyperflash partition information through device tree, this helps to remove passing partition information through the mtdparts commandline parameter which requires maintaining the partition information in a string format. J7200 SoM has a S28 64 MiB OSPI flash with sector size of 256 KiB thus the size of the smallest partition is chosen as 256 KiB, the SoM also has a 64 MiB Hyperflash present on it, the partition names and offsets are chosen according to the corresponding name and offsets in bootloader.

---
 arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 72 +++++++++++++++++++++
 1 file changed, 72 insertions(+)
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi +72 -0
index fa44ed4c17d5..198408fdb017 100644
@@ -140,6 +140,37 @@
 	flash@0,0 {
 		compatible = "cypress,hyperflash", "cfi-flash";
 		reg = <0x00 0x00 0x4000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "hbmc.tiboot3";
+				reg = <0x0 0x100000>;
+			};
+
+			partition@100000 {
+				label = "hbmc.tispl";
+				reg = <0x100000 0x200000>;
+			};
+
+			partition@300000 {
+				label = "hbmc.u-boot";
+				reg = <0x300000 0x400000>;
+			};
+
+			partition@700000 {
+				label = "hbmc.env";
+				reg = <0x700000 0x40000>;
+			};
+
+			partition@800000 {
+				label = "hbmc.rootfs";
+				reg = <0x800000 0x3800000>;
+			};
+		};
 	};
 };
 
@@ -229,5 +260,46 @@
 		cdns,tchsh-ns = <60>;
 		cdns,tslch-ns = <60>;
 		cdns,read-delay = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "ospi.tiboot3";
+				reg = <0x0 0x100000>;
+			};
+
+			partition@100000 {
+				label = "ospi.tispl";
+				reg = <0x100000 0x200000>;
+			};
+
+			partition@300000 {
+				label = "ospi.u-boot";
+				reg = <0x300000 0x400000>;
+			};
+
+			partition@700000 {
+				label = "ospi.env";
+				reg = <0x700000 0x40000>;
+			};
+
+			partition@740000 {
+				label = "ospi.env.backup";
+				reg = <0x740000 0x40000>;
+			};
+
+			partition@800000 {
+				label = "ospi.rootfs";
+				reg = <0x800000 0x37c0000>;
+			};
+
+			partition@3fc0000 {
+				label = "ospi.phypattern";
+				reg = <0x3fc0000 0x40000>;
+			};
+		};
 	};
 };
Signature · 1 line
2.17.1
maintainer
#5 lore raw
In reply to Vaishnav Achath
Quoted 15 lines · Vaishnav Achath

This series adds flash partition description through DT, currently the flash partitions for J7 platforms is described through the mtdparts commandline parameter passed from bootloader, this requires maintenance of the partition information in a mtdparts string which is error prone.

Once the flash partitions are described through DT, the support for mtdparts can be removed for these platforms from u-boot also.

Vaishnav Achath (4):
arm64: dts: ti: k3-j721e-som: Describe OSPI flash partition info
arm64: dts: ti: k3-j721e-som: Describe QSPI flash partition info
arm64: dts: ti: k3-j721e-sk: Describe OSPI flash partition info
arm64: dts: ti: k3-j7200-som: Describe OSPI and Hyperflash partition
info

Quoted 5 lines
 arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi   | 72 +++++++++++++++++++
 .../dts/ti/k3-j721e-common-proc-board.dts     | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi   | 46 ++++++++++++
 4 files changed, 210 insertions(+)

Please address the feedback in [1] prior to adding the partitions? and could you ensure it is done for all the impacted k3 SoCs?

[1] https://lore.kernel.org/all/[email protected]/

Signature · 8 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

Hi Nishanth,

Quoted 16 lines · Nishanth Menon
Quoted 15 lines · Vaishnav Achath

This series adds flash partition description through DT, currently the flash partitions for J7 platforms is described through the mtdparts commandline parameter passed from bootloader, this requires maintenance of the partition information in a mtdparts string which is error prone.

Once the flash partitions are described through DT, the support for mtdparts can be removed for these platforms from u-boot also.

Vaishnav Achath (4):
arm64: dts: ti: k3-j721e-som: Describe OSPI flash partition info
arm64: dts: ti: k3-j721e-som: Describe QSPI flash partition info
arm64: dts: ti: k3-j721e-sk: Describe OSPI flash partition info
arm64: dts: ti: k3-j7200-som: Describe OSPI and Hyperflash partition
info

Quoted 9 lines
Quoted 5 lines
 arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi   | 72 +++++++++++++++++++
 .../dts/ti/k3-j721e-common-proc-board.dts     | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 46 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi   | 46 ++++++++++++
 4 files changed, 210 insertions(+)

Please address the feedback in [1] prior to adding the partitions? and could you ensure it is done for all the impacted k3 SoCs?

I will do both of these in corresponding next revisions.

Thanks and Regards,
Vaishnav

Quoted 3 lines

[1] https://lore.kernel.org/all/[email protected]/