Skip to contentSkip to conversation

arm: mach-k3: J721e: Add xSPI boot mode

PATCH In review Reid Tonking 2 participants 2 messages Nov 20, 2023 – Nov 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-k3: J721e: Add xSPI boot mode

From: Vignesh Raghavendra <[email protected]>

J7200 ROM supports booting from xSPI compliant flash. Detect if ROM booted from xSPI bootmode and map that to BOOT_DEVICE_SPI

---
 arch/arm/mach-k3/include/mach/j721e_spl.h | 3 ++-
 arch/arm/mach-k3/j721e_init.c             | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-k3/include/mach/j721e_spl.h +2 -1
index ed3d7333bd..c51bc5ab8e 100644
@@ -24,8 +24,9 @@
 #define BOOT_DEVICE_UFS			0x13
 #define BOOT_DEVIE_GPMC			0x14
 #define BOOT_DEVICE_PCIE		0x15
-#define BOOT_DEVICE_MMC2_2		0x16
+#define BOOT_DEVICE_XSPI		0x16
 #define BOOT_DEVICE_RAM			0x17
+#define BOOT_DEVICE_MMC2_2		0xFF /* Invalid value */
 
 /* Backup boot modes with MCU Only = 0 */
 #define BACKUP_BOOT_DEVICE_RAM		0x0
arch/arm/mach-k3/j721e_init.c +2 -1
index 18814c39ec..7bd64107b2 100644
@@ -340,7 +340,8 @@ static u32 __get_primary_bootmedia(u32 main_devstat, u32 wkup_devstat)
 	bootmode |= (main_devstat & MAIN_DEVSTAT_BOOT_MODE_B_MASK) <<
 			BOOT_MODE_B_SHIFT;
 
-	if (bootmode == BOOT_DEVICE_OSPI || bootmode ==	BOOT_DEVICE_QSPI)
+	if (bootmode == BOOT_DEVICE_OSPI || bootmode ==	BOOT_DEVICE_QSPI ||
+	    bootmode == BOOT_DEVICE_XSPI)
 		bootmode = BOOT_DEVICE_SPI;
 
 	if (bootmode == BOOT_DEVICE_MMC2) {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Reid Tonking

From: Vignesh Raghavendra <[email protected]>

J7200 ROM supports booting from xSPI compliant flash. Detect if ROM booted from xSPI bootmode and map that to BOOT_DEVICE_SPI

1) Are'nt these shared with J721e? what is the impact there?
2) Did you mean Pratyush or Reid in Signed-off-by? since this falls in the chain of handoff?

Quoted 37 lines
---
 arch/arm/mach-k3/include/mach/j721e_spl.h | 3 ++-
 arch/arm/mach-k3/j721e_init.c             | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-k3/include/mach/j721e_spl.h +2 -1
index ed3d7333bd..c51bc5ab8e 100644
@@ -24,8 +24,9 @@
 #define BOOT_DEVICE_UFS			0x13
 #define BOOT_DEVIE_GPMC			0x14
 #define BOOT_DEVICE_PCIE		0x15
-#define BOOT_DEVICE_MMC2_2		0x16
+#define BOOT_DEVICE_XSPI		0x16
 #define BOOT_DEVICE_RAM			0x17
+#define BOOT_DEVICE_MMC2_2		0xFF /* Invalid value */
 
 /* Backup boot modes with MCU Only = 0 */
 #define BACKUP_BOOT_DEVICE_RAM		0x0
arch/arm/mach-k3/j721e_init.c +2 -1
index 18814c39ec..7bd64107b2 100644
@@ -340,7 +340,8 @@ static u32 __get_primary_bootmedia(u32 main_devstat, u32 wkup_devstat)
 	bootmode |= (main_devstat & MAIN_DEVSTAT_BOOT_MODE_B_MASK) <<
 			BOOT_MODE_B_SHIFT;
 
-	if (bootmode == BOOT_DEVICE_OSPI || bootmode ==	BOOT_DEVICE_QSPI)
+	if (bootmode == BOOT_DEVICE_OSPI || bootmode ==	BOOT_DEVICE_QSPI ||
+	    bootmode == BOOT_DEVICE_XSPI)
 		bootmode = BOOT_DEVICE_SPI;
 
 	if (bootmode == BOOT_DEVICE_MMC2) {
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D