2023-05-03 09:13:26

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 0/4] 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(+)

--
2.17.1


2023-05-03 09:13:41

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 4/4] 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 fa44ed4c17d5..198408fdb017 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
@@ -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>;
+ };
+ };
};
};
--
2.17.1

2023-05-03 09:13:42

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 3/4] arm64: dts: ti: k3-j721e-sk: 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 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.

Signed-off-by: Vaishnav Achath <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 46 ++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index f650a7fd66b4..6d100a6aae05 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -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>;
+ };
+ };
};
};

--
2.17.1

2023-05-03 09:13:42

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 2/4] arm64: dts: ti: k3-j721e-som: Describe QSPI 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 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.

Signed-off-by: Vaishnav Achath <[email protected]>
---
.../dts/ti/k3-j721e-common-proc-board.dts | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
index 7db0603125aa..d6873402ee76 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
@@ -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>;
+ };
+ };
};
};

--
2.17.1

2023-05-03 11:53:12

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 0/4] arm64: dts: ti: Describe flash partitions for J7 platforms

On 14:42-20230503, Vaishnav Achath wrote:
> 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(+)

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]/

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

2023-05-04 06:04:51

by Vaishnav Achath

[permalink] [raw]
Subject: Re: [PATCH 0/4] arm64: dts: ti: Describe flash partitions for J7 platforms

Hi Nishanth,

On 03/05/23 17:21, Nishanth Menon wrote:
> On 14:42-20230503, Vaishnav Achath wrote:
>> 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(+)
>
> 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

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