summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApurva Nandan <a-nandan@ti.com>2023-05-26 14:42:29 +0530
committerPraneeth Bajjuri <praneeth@ti.com>2023-05-30 06:35:36 -0500
commit8c7827f522b04a0089bc075f44112e3d8458e79a (patch)
tree73cca913854ab3957deba6a3e9ae67f66dd55dc7
parente9cf6b5fe81daf8f1cacc348788259a5582c4c09 (diff)
arm: mack-k3: am62x: Add SPI NAND as a boot device
AM62x-SK supports booting up from SPI NAND flash (W35N01JW). Add support to allow booting using MTD SPI NAND framework. Signed-off-by: Apurva Nandan <a-nandan@ti.com>
-rw-r--r--arch/arm/mach-k3/am625_init.c3
-rw-r--r--arch/arm/mach-k3/include/mach/am62_spl.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
index e90c18fdcc1..59617c0da43 100644
--- a/arch/arm/mach-k3/am625_init.c
+++ b/arch/arm/mach-k3/am625_init.c
@@ -297,6 +297,9 @@ static u32 __get_primary_bootmedia(u32 devstat)
case BOOT_DEVICE_EMMC:
return BOOT_DEVICE_MMC1;
+ case BOOT_DEVICE_SERIAL_NAND:
+ return BOOT_DEVICE_SPINAND;
+
case BOOT_DEVICE_MMC:
if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_PORT_MASK) >>
MAIN_DEVSTAT_PRIMARY_MMC_PORT_SHIFT)
diff --git a/arch/arm/mach-k3/include/mach/am62_spl.h b/arch/arm/mach-k3/include/mach/am62_spl.h
index 2c9139d2cc0..2ba4b2a9ce6 100644
--- a/arch/arm/mach-k3/include/mach/am62_spl.h
+++ b/arch/arm/mach-k3/include/mach/am62_spl.h
@@ -8,7 +8,7 @@
#define _ASM_ARCH_AM62_SPL_H_
/* Primary BootMode devices */
-#define BOOT_DEVICE_RAM 0x00
+#define BOOT_DEVICE_SERIAL_NAND 0x00
#define BOOT_DEVICE_OSPI 0x01
#define BOOT_DEVICE_QSPI 0x02
#define BOOT_DEVICE_SPI 0x03
@@ -29,8 +29,10 @@
/* U-Boot used aliases */
#define BOOT_DEVICE_ETHERNET 0x04
+#define BOOT_DEVICE_SPINAND 0x07
#define BOOT_DEVICE_MMC2 0x08
#define BOOT_DEVICE_MMC1 0x09
+#define BOOT_DEVICE_RAM 0x0F
/* Invalid */
#define BOOT_DEVICE_MMC2_2 0x1F