2023-05-13 14:40:35

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH v2 0/6] arm64: dts: ti: Describe flash partitions

This series adds flash partition description through DT, currently
the flash partitions for most TI ARM64 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.

V1->V2:
* Add partition information for all K3 platforms.
* Combine patches per platform.

Vaishnav Achath (6):
arm64: dts: ti: k3-j721e-som: Describe OSPI/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
arm64: dts: ti: k3-am654-baseboard: Describe OSPI flash partition info
arm64: dts: ti: k3-am642-sk/evm: Describe OSPI flash partition info
arm64: dts: ti: k3-am64-phycore-som: Describe OSPI flash partition
info

.../boot/dts/ti/k3-am64-phycore-som.dtsi | 41 +++++++++++
arch/arm64/boot/dts/ti/k3-am642-evm.dts | 41 +++++++++++
arch/arm64/boot/dts/ti/k3-am642-sk.dts | 41 +++++++++++
.../arm64/boot/dts/ti/k3-am654-base-board.dts | 46 ++++++++++++
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 ++++++++++++
8 files changed, 379 insertions(+)

--
2.17.1



2023-05-13 14:41:55

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH v2 6/6] arm64: dts: ti: k3-am64-phycore-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. AM64 Phycore 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 partition names and offsets are chosen according
to the corresponding name and offsets in bootloader

Signed-off-by: Vaishnav Achath <[email protected]>
---
.../boot/dts/ti/k3-am64-phycore-som.dtsi | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
index 8dfb6301b17d..0d3d785530cf 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
@@ -219,6 +219,47 @@
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 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>;
+ };
+ };
};
};

--
2.17.1


2023-05-13 14:43:01

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH v2 3/6] arm64: dts: ti: k3-j7200-som: Describe OSPI and Hyperflash partition info

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.

Signed-off-by: Vaishnav Achath <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 72 +++++++++++++++++++++
1 file changed, 72 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
index 269424154771..2a743b895074 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
@@ -149,6 +149,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>;
+ };
+ };
};
};

@@ -250,5 +281,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>;
+ };
+ };
};
};
--
2.17.1