Fix OSPI bootmode for j7200-evm
cover Fix OSPI bootmode for j7200-evm
Support for OSPI probe and also read/write is broken and/or missing in current master branch.
- sf probe failure from u-boot prompt & OSPI boot failure [0]
This series adds necessary configs, as well as fixes some bugs in the existing u-boot devicetree, to add OSPI boot support for the j7200-evm device.
- sf probe and update in u-boot prompt & successful OSPI boot logs [1]
[0]: https://gist.github.com/aniket-l/f487472baa47e819defc82e5f57b7860
[1]: https://gist.github.com/aniket-l/e5353c4511009d2ebf5f1743ebaab61a
Aniket Limaye (4):
configs: j7200_evm_*_defconfig: Enable OSPI configs
arm: dts: k3-j7200: Fix support for OSPI flash
arm: dts: k3-j7200-r5-common: fix the mcu_timer0 clock frequency
arm: dts: k3-j7200-r5-common: Add missing overrides for ringacc and
udmap
.../dts/k3-j7200-common-proc-board-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 15 ++++++++++++++- configs/j7200_evm_a72_defconfig | 10 ++++++++-- configs/j7200_evm_r5_defconfig | 9 +++++++-- 4 files changed, 33 insertions(+), 5 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/4 configs: j7200_evm_*_defconfig: Enable OSPI configs
Add the necessary configs required for OSPI functionality. Also update the ospi flash partition offsets as per the devicetree.
--- configs/j7200_evm_a72_defconfig | 10 ++++++++-- configs/j7200_evm_r5_defconfig | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-)
configs/j7200_evm_a72_defconfig +8 -2
@@ -10,6 +10,8 @@ CONFIG_SOC_K3_J721E=y CONFIG_TARGET_J7200_A72_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_SF_DEFAULT_MODE=0 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y
@@ -61,7 +63,7 @@ CONFIG_SPL_RAM_DEVICE=y # CONFIG_SPL_SPI_FLASH_TINY is not set CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x300000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_SYS_MAXARGS=64 CONFIG_CMD_ASKENV=y
@@ -141,7 +143,11 @@ 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_STMICRO=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_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_MULTIPLEXER=y
configs/j7200_evm_r5_defconfig +7 -2
@@ -10,6 +10,8 @@ CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_J7200_R5_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x41cf5bfc +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_SF_DEFAULT_MODE=0 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y
@@ -60,7 +62,7 @@ CONFIG_SPL_REMOTEPROC=y # CONFIG_SPL_SPI_FLASH_TINY is not set CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_MAXARGS=64
@@ -117,7 +119,10 @@ 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_STMICRO=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_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
Signature · 1 line
2.34.1
Re: [PATCH 1/4] configs: j7200_evm_*_defconfig: Enable OSPI configs
Quoted 68 lines · Aniket Limaye
Add the necessary configs required for OSPI functionality. Also update the ospi flash partition offsets as per the devicetree.
Signed-off-by Aniket Limaye <[email protected]>--- configs/j7200_evm_a72_defconfig | 10 ++++++++-- configs/j7200_evm_r5_defconfig | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-)configs/j7200_evm_a72_defconfig +8
-2@@ -10,6 +10,8 @@ CONFIG_SOC_K3_J721E=y CONFIG_TARGET_J7200_A72_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_SF_DEFAULT_MODE=0 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y@@ -61,7 +63,7 @@ CONFIG_SPL_RAM_DEVICE=y # CONFIG_SPL_SPI_FLASH_TINY is not set CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x300000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_SYS_MAXARGS=64 CONFIG_CMD_ASKENV=y@@ -141,7 +143,11 @@ 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_STMICRO=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_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_MULTIPLEXER=yconfigs/j7200_evm_r5_defconfig +3
-1@@ -10,6 +10,8 @@ CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_J7200_R5_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x41cf5bfc +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_SF_DEFAULT_MODE=0 CONFIG_ENV_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y@@ -60,7 +62,7 @@ CONFIG_SPL_REMOTEPROC=y # CONFIG_SPL_SPI_FLASH_TINY is not set CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_MAXARGS=64@@ -117,7 +119,10 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
configs/j7200_evm_r5_defconfig CONFIG_SYS_FLASH_CFI=y · line 128
Quoted 10 lines
configs/j7200_evm_r5_defconfig +4
-1CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_SFDP_SUPPORT=y -CONFIG_SPI_FLASH_STMICRO=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_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
Re: [PATCH 1/4] configs: j7200_evm_*_defconfig: Enable OSPI configs
Quoted 11 lines · Udit
Quoted 9 lines · Aniket Limaye
Add the necessary configs required for OSPI functionality. Also update the ospi flash partition offsets as per the devicetree.
Signed-off-by Aniket Limaye <[email protected]>--- configs/j7200_evm_a72_defconfig | 10 ++++++++-- configs/j7200_evm_r5_defconfig | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-)
Could we not do fragments?
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 1/4] configs: j7200_evm_*_defconfig: Enable OSPI configs
In reply to Aniket LimayeQuoted 5 lines · Aniket Limaye
Add the necessary configs required for OSPI functionality. Also update the ospi flash partition offsets as per the devicetree.
Signed-off-by Aniket Limaye <[email protected]>Reviewed-by Udit Kumar <[email protected]>
For the series, applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH 2/4 arm: dts: k3-j7200: Fix support for OSPI flash
In reply to Aniket Limaye- Add the missing bootph-all property in the flash subnode for ospi
- Add the missing overrides for the ospi node in the r5 devicetree
--- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 5 +++++ 2 files changed, 9 insertions(+)
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +4 -0
@@ -195,6 +195,10 @@ &ospi0 { bootph-all; + + flash@0 { + bootph-all; + }; }; &serdes_ln_ctrl {
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
@@ -83,3 +83,8 @@ &wkup_vtm0 { bootph-pre-ram; }; + +&ospi0 { + reg = <0x0 0x47040000 0x0 0x100>, + <0x0 0x50000000 0x0 0x8000000>; +};
Signature · 1 line
2.34.1
Re: [PATCH 2/4] arm: dts: k3-j7200: Fix support for OSPI flash
Quoted 2 lines · Aniket Limaye
- Add the missing bootph-all property in the flash subnode for ospi
- Add the missing overrides for the ospi node in the r5 devicetree
Please see , if you can add more on this why we are adding this
also, if this patch fixes some previous commit
Quoted 12 lines
Signed-off-by Aniket Limaye <[email protected]>--- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 5 +++++ 2 files changed, 9 insertions(+)arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +0
-0
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi line 202
Quoted 8 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +4
-0@@ -195,6 +195,10 @@ &ospi0 { bootph-all; + + flash@0 { + bootph-all; + }; };
Ideally this should come from kernel DT sync or with OF_UPSTREAM, whatever is applicable
As you are fixing broken OSPI boot.
Tom can suggest, if he is ok to pull in this fix for 2024.04 or we need to wait to get this change into kernel first.
Quoted 7 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +0
-0&serdes_ln_ctrl {arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0
-0
arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 90
Quoted 8 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5
-0@@ -83,3 +83,8 @@ &wkup_vtm0 { bootph-pre-ram; }; + +&ospi0 { + reg = <0x0 0x47040000 0x0 0x100>, + <0x0 0x50000000 0x0 0x8000000>; +};
With change in commit message,
Re: [PATCH 2/4] arm: dts: k3-j7200: Fix support for OSPI flash
Quoted 16 lines · Udit
Quoted 2 lines · Aniket Limaye
- Add the missing bootph-all property in the flash subnode for ospi
- Add the missing overrides for the ospi node in the r5 devicetreePlease see , if you can add more on this why we are adding this
also, if this patch fixes some previous commit
Quoted 7 lines
Signed-off-by Aniket Limaye <[email protected]>--- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 5 +++++ 2 files changed, 9 insertions(+)
Quoted 7 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi line 196
Quoted 7 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +0
-0@@ -195,6 +195,10 @@ &ospi0 { bootph-all;
You should only use bootph-all property in leaf nodes - at least for
kernel world.
Quoted 10 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi line 202
Quoted 5 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +4
-0+ + flash@0 { + bootph-all; + }; };Ideally this should come from kernel DT sync or with
OF_UPSTREAM, whatever is applicable
Quoted 4 lines
As you are fixing broken OSPI boot.
Tom can suggest, if he is ok to pull in this fix for 2024.04 or we need to wait to get this change into kernel first.
Send this change for upstream kernel right away please.
Quoted 23 lines
Quoted 8 lines
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +0
-0&serdes_ln_ctrl {arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0
-0arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 90
Quoted 8 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5
-0@@ -83,3 +83,8 @@ &wkup_vtm0 { bootph-pre-ram; }; + +&ospi0 { + reg = <0x0 0x47040000 0x0 0x100>, + <0x0 0x50000000 0x0 0x8000000>; +};With change in commit message,
Reviewed-by Udit Kumar <[email protected]>
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
PATCH 3/4 arm: dts: k3-j7200-r5-common: fix the mcu_timer0 clock frequency
In reply to Aniket LimayeCorrecting the clock-frequency property of the mcu_timer0 node
--- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -1
@@ -52,7 +52,7 @@ }; &mcu_timer0 { - clock-frequency = <25000000>; + clock-frequency = <250000000>; bootph-pre-ram; };
Signature · 1 line
2.34.1
Re: [PATCH 3/4] arm: dts: k3-j7200-r5-common: fix the mcu_timer0 clock frequency
Quoted 13 lines · Aniket Limaye
Correcting the clock-frequency property of the
mcu_timer0nodeFixes df73e791ce09 ("arm: dts: j7200: dts sync with Linux 6.6-rc1")Signed-off-by Aniket Limaye <[email protected]>--- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0
-0
arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 56
Quoted 6 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1
-1@@ -52,7 +52,7 @@ }; &mcu_timer0 { - clock-frequency = <25000000>; + clock-frequency = <250000000>; bootph-pre-ram;
Quoted 2 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0
-0};
PATCH 4/4 arm: dts: k3-j7200-r5-common: Add missing overrides for ringacc and udmap
In reply to Aniket LimayeCorrects the ti,sci property to point to dm_tifs node for proper functioning of mcu_ringacc and mcu_udmap.
--- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +8 -0
@@ -88,3 +88,11 @@ reg = <0x0 0x47040000 0x0 0x100>, <0x0 0x50000000 0x0 0x8000000>; }; + +&mcu_ringacc { + ti,sci = <&dm_tifs>; +}; + +&mcu_udmap { + ti,sci = <&dm_tifs>; +};
Signature · 1 line
2.34.1
Quoted 1 line · Aniket Limaye
Support for OSPI probe and also read/write is broken and/or missing in current master branch.
Its broken :)
Quoted 10 lines
- sf probe failure from u-boot prompt & OSPI boot failure [0]
This series adds necessary configs, as well as fixes some bugs in the existing u-boot devicetree, to add OSPI boot support for the j7200-evm device.
- sf probe and update in u-boot prompt & successful OSPI boot logs [1][0]: https://gist.github.com/aniket-l/f487472baa47e819defc82e5f57b7860
[1]: https://gist.github.com/aniket-l/e5353c4511009d2ebf5f1743ebaab61a
Quoted 6 lines
Aniket Limaye (4):
configs: j7200_evm_*_defconfig: Enable OSPI configs
arm: dts: k3-j7200: Fix support for OSPI flash
arm: dts: k3-j7200-r5-common: fix themcu_timer0clock frequency
arm: dts: k3-j7200-r5-common: Add missing overrides for ringacc and
udmap
Please copy Nishanth in your posting
Quoted 6 lines
.../dts/k3-j7200-common-proc-board-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 15 ++++++++++++++- configs/j7200_evm_a72_defconfig | 10 ++++++++-- configs/j7200_evm_r5_defconfig | 9 +++++++-- 4 files changed, 33 insertions(+), 5 deletions(-)