arm64: dts: ti: k3-am642-sk/evm: Describe OSPI flash partition info
authorVaishnav Achath <vaishnav.a@ti.com>
Sat, 13 May 2023 14:17:11 +0000 (19:47 +0530)
committerVignesh Raghavendra <vigneshr@ti.com>
Thu, 15 Jun 2023 05:35:46 +0000 (11:05 +0530)
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 SK and EVM 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 <vaishnav.a@ti.com>
Link: https://lore.kernel.org/r/20230513141712.27346-6-vaishnav.a@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-am642-evm.dts
arch/arm64/boot/dts/ti/k3-am642-sk.dts

index 7c90e284e2bff60aec72e84689971f7e2248333b..309500e4c23725e4761bb09a08d85d9e3c59f1fd 100644 (file)
                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>;
+                       };
+               };
        };
 };
 
index f9ed22c5a472098035570c7a8e7f54023c2b789a..9ea012b883e8aa334045c2886c13e647ab98d82a 100644 (file)
                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>;
+                       };
+               };
        };
 };