Enable OSPI on j721e
Subsystems (2)
v2 cover Enable OSPI on j721e
This series enables OSPI storage and boot.
Changes from v1:
- added patch to remove the OSPI phy pattern partition, as it wasn't used
v1: https://patchwork.ozlabs.org/project/uboot/list/?series=396241
Jonathan Humphreys (3):
configs: j721e: Enable OSPI memory
arm: mach-k3: j721e: Enable OSPI boot
arm: dts: k3-j721e-sk: Remove OSPI phypattern partition
arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 4 ---- arch/arm/mach-k3/include/mach/j721e_spl.h | 5 +++-- arch/arm/mach-k3/j721e_init.c | 3 ++- configs/j721e_evm_a72_defconfig | 7 +++++++ configs/j721e_evm_r5_defconfig | 6 ++++++ 5 files changed, 18 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/3 configs: j721e: Enable OSPI memory
Set config values to enable OSPI functionality.
--- configs/j721e_evm_a72_defconfig | 7 +++++++ configs/j721e_evm_r5_defconfig | 6 ++++++ 2 files changed, 13 insertions(+)
configs/j721e_evm_a72_defconfig +7 -0
@@ -10,6 +10,7 @@ CONFIG_SOC_K3_J721E=y CONFIG_TARGET_J721E_A72_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y
@@ -142,7 +143,13 @@ CONFIG_FLASH_CFI_MTD=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HX_T=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MT35XU=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_MULTIPLEXER=y
configs/j721e_evm_r5_defconfig +6 -0
@@ -10,6 +10,7 @@ CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_J721E_R5_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x41cf59f0 +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y
@@ -128,7 +129,12 @@ CONFIG_FLASH_CFI_MTD=y CONFIG_SYS_FLASH_CFI=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HX_T=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MT35XU=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
Signature · 1 line
2.34.1
Re: [PATCH v2 1/3] configs: j721e: Enable OSPI memory
Quoted 47 lines · Jonathan Humphreys
Set config values to enable OSPI functionality.
Signed-off-by Jonathan Humphreys <[email protected]>--- configs/j721e_evm_a72_defconfig | 7 +++++++ configs/j721e_evm_r5_defconfig | 6 ++++++ 2 files changed, 13 insertions(+)configs/j721e_evm_a72_defconfig +7
-0@@ -10,6 +10,7 @@ CONFIG_SOC_K3_J721E=y CONFIG_TARGET_J721E_A72_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y@@ -142,7 +143,13 @@ CONFIG_FLASH_CFI_MTD=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HX_T=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MT35XU=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_MULTIPLEXER=yconfigs/j721e_evm_r5_defconfig +1
-0@@ -10,6 +10,7 @@ CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_J721E_R5_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x41cf59f0 +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y
configs/j721e_evm_r5_defconfig CONFIG_FLASH_CFI_MTD=y · line 137
Quoted 9 lines
configs/j721e_evm_r5_defconfig +5
-0@@ -128,7 +129,12 @@ CONFIG_FLASH_CFI_MTD=y CONFIG_SYS_FLASH_CFI=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HX_T=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MT35XU=y
Quoted 3 lines
configs/j721e_evm_r5_defconfig +0
-0CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
PATCH v2 2/3 arm: mach-k3: j721e: Enable OSPI boot
In reply to Jonathan HumphreysAdd boot ROM XSPI bootmode, and set to BOOT_DEVICE_SPI if detected.
--- arch/arm/mach-k3/include/mach/j721e_spl.h | 5 +++-- arch/arm/mach-k3/j721e_init.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
arch/arm/mach-k3/include/mach/j721e_spl.h +3 -2
@@ -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_RAM 0x17 +#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
@@ -346,7 +346,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
Re: [PATCH v2 2/3] arm: mach-k3: j721e: Enable OSPI boot
Thanks For fixing this
Quoted 29 lines · Jonathan Humphreys
Add boot ROM XSPI bootmode, and set to
BOOT_DEVICE_SPIif detected.Signed-off-by Jonathan Humphreys <[email protected]>--- arch/arm/mach-k3/include/mach/j721e_spl.h | 5 +++-- arch/arm/mach-k3/j721e_init.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)arch/arm/mach-k3/include/mach/j721e_spl.h +3
-2@@ -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_RAM 0x17 +#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 0x0arch/arm/mach-k3/j721e_init.c +0
-0
arch/arm/mach-k3/j721e_init.c static u32 __get_primary_bootmedia(u32 main_devstat, u32 wkup_devstat) · line 351
Quoted 7 lines
arch/arm/mach-k3/j721e_init.c +2
-1@@ -346,7 +346,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 ;
Quoted 2 lines
arch/arm/mach-k3/j721e_init.c +0
-0if (bootmode ==BOOT_DEVICE_MMC2 ) {
PATCH v2 3/3 arm: dts: k3-j721e-sk: Remove OSPI phypattern partition
In reply to Jonathan HumphreysThe phy calibration pattern partition isn't needed as the Cadence driver isn't calibrating the phys.
--- arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -4
@@ -157,9 +157,5 @@ flash@0 { bootph-all; - - partition@3fc0000 { - bootph-all; - }; }; };
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] arm: dts: k3-j721e-sk: Remove OSPI phypattern partition
Thanks Jon
Quoted 2 lines · Jonathan Humphreys
The phy calibration pattern partition isn't needed as the Cadence driver isn't calibrating the phys.
Please do mention Fixes tag here
58d61fb5a77e ("arm: dts: k3-j721e-sk: Add initial A72 specific dts support")
Quoted 10 lines
Signed-off-by Jonathan Humphreys <[email protected]>--- arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-)arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-0
arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 160
Quoted 8 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-4@@ -157,9 +157,5 @@ flash@0 { bootph-all; - - partition@3fc0000 { - bootph-all; - }; };
This Patch LTGM,
+ Neha
For further cleanup, we should not have these ospi nodes in u-boot dts file.
should be in board dts (k3-j721e-sk.dts) with right bootph properties ,
and comes via kernel DT.
Quoted 1 line
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-0};
Re: [PATCH v2 3/3] arm: dts: k3-j721e-sk: Remove OSPI phypattern partition
Quoted 10 lines · Udit
Thanks Jon
Quoted 2 lines · Jonathan Humphreys
The phy calibration pattern partition isn't needed as the Cadence driver isn't calibrating the phys.
Please do mention Fixes tag here
58d61fb5a77e("arm: dts: k3-j721e-sk: Add initial A72 specific dts support")
Please note that patchwork will just pick up:
Signature · 1 line
Tom
Re: [PATCH v2 3/3] arm: dts: k3-j721e-sk: Remove OSPI phypattern partition
In reply to Kumar, UditQuoted 11 lines · Udit
Thanks Jon
Quoted 2 lines · Jonathan Humphreys
The phy calibration pattern partition isn't needed as the Cadence driver isn't calibrating the phys.
Please do mention Fixes tag here
58d61fb5a77e("arm: dts: k3-j721e-sk: Add initial A72 specific dts support")
I put the fixes tag on the cover letter. Is there a 'correct' way - to add to the cover letter or the individual patches?
In the case of this particular patch, I don't think the fixes tag is appropriate as this isn't changing any observable behavior, it is a clean up.
Jon
Quoted 35 lines
Quoted 11 lines
Signed-off-by Jonathan Humphreys <[email protected]>--- arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-)arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-0arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 160
Quoted 8 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-4@@ -157,9 +157,5 @@ flash@0 { bootph-all; - - partition@3fc0000 { - bootph-all; - }; };This Patch LTGM,
+ Neha
For further cleanup, we should not have these ospi nodes in u-boot dts file.
should be in board dts (
k3-j721e-sk.dts) with right bootph properties ,and comes via kernel DT.
Quoted 1 line
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0
-0};
Quoted 8 lines · Jonathan Humphreys
This series enables OSPI storage and boot.
Fixes 58d61fb5a77e ("arm: dts: k3-j721e-sk: Add initial A72 specific dts support")Changes from v1:
- added patch to remove the OSPI phy pattern partition, as it wasn't used[...]
Applied to u-boot/next, thanks!
Signature · 1 line
Tom