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>
This commit is contained in:
Apurva Nandan 2023-05-26 14:42:29 +05:30 committed by Praneeth Bajjuri
parent e9cf6b5fe8
commit 8c7827f522
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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