configs: j7200: correct mmc offset
PATCH 1/1 configs: j7200: correct mmc offset
This patch corrects the MMC raw mode sector offset as per documentation.
Section: eMMC layout
Without this correct offset eMMC boot with UDA partition will fail.
Way to test with eMMC UDA partition
=> mmc dev 0 0
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr} 0x0 0x800
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr} 0x800 0x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr} 0x1800 0x2000
=> mmc partconf 0 1 7 1
=> mmc bootbus 0 2 0 0
--- configs/j7200_evm_a72_defconfig | 2 +- configs/j7200_evm_r5_defconfig | 2 +- configs/j7200_hs_evm_a72_defconfig | 2 +- configs/j7200_hs_evm_r5_defconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
configs/j7200_evm_a72_defconfig +1 -1
@@ -46,7 +46,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
configs/j7200_evm_r5_defconfig +1 -1
@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=y
configs/j7200_hs_evm_a72_defconfig +1 -1
@@ -47,7 +47,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
configs/j7200_hs_evm_r5_defconfig +1 -1
@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=y
Signature · 1 line
2.34.1
Quoted 6 lines · Udit Kumar
This patch corrects the MMC raw mode sector offset as per documentation.
Section: eMMC layout
Please drop these TI specific documentation. Instead ADD documentation into u-boot source explaining these eMMC layout.
NOTE: emmc raw mode for boot partition is one way of using SPL. it is also very restrictive. u-boot and TIFS, OPTEE all packed into EMMC boot partition has limits to which it can scale.
On beagle family for example, we choose this is tooo constraining and chose to go down a different path where the uda partition in fs mode is used for u-boot, tfa, optee etc.. allowing more maintainable system instead of having to constantly refactoring the image offsets and sizes involved.
Quoted 2 lines
Without this correct offset eMMC boot with UDA partition will fail.
Where this fails is looking for the next segment of u-boot image in boot partition, not UDA.
Quoted 83 lines
Fixes f8c1e893c82 (configs: j7200_evm_a72: Add Initial suppot)Fixes 02dff65efe7 (configs: j7200_evm_r5: Add initial support)Fixes 360c7f46f39 (configs: Add configs for J7200 High Security EVM)Way to test with eMMC UDA partition
=> mmc dev 0 0
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr}0x00x800
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr}0x8000x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr}0x18000x2000
=> mmc partconf 0 1 7 1
=> mmc bootbus 0 2 0 0Cc Bhavya Kapoor <[email protected]>Cc Diwakar Dhyani <[email protected]>Cc KEERTHY <[email protected]>Signed-off-by Udit Kumar <[email protected]>--- configs/j7200_evm_a72_defconfig | 2 +- configs/j7200_evm_r5_defconfig | 2 +- configs/j7200_hs_evm_a72_defconfig | 2 +- configs/j7200_hs_evm_r5_defconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)configs/j7200_evm_a72_defconfig +1
-1@@ -46,7 +46,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"configs/j7200_evm_r5_defconfig +1
-1@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=yconfigs/j7200_hs_evm_a72_defconfig +1
-1@@ -47,7 +47,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"configs/j7200_hs_evm_r5_defconfig +1
-1@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=ySignature · 1 line
2.34.1
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 9 lines · Nishanth Menon
Quoted 6 lines · Udit Kumar
This patch corrects the MMC raw mode sector offset as per documentation.
Section: eMMC layout
Please drop these TI specific documentation. Instead ADD documentation into u-boot source explaining these eMMC layout.
Sure,
will arch/arm/mach-k3/j7200/ place will be good to hold such documentation ?
Quoted 5 lines
NOTE: emmc raw mode for boot partition is one way of using SPL. it is also very restrictive. u-boot and TIFS, OPTEE all packed into EMMC boot partition has limits to which it can scale.
Quoted 8 lines
On beagle family for example, we choose this is tooo constraining and chose to go down a different path where the uda partition in fs mode is used for u-boot, tfa, optee etc.. allowing more maintainable system instead of having to constantly refactoring the image offsets and sizes involved.
Quoted 1 line
Without this correct offset eMMC boot with UDA partition will fail.
Where this fails is looking for the next segment of u-boot image in boot partition, not UDA.
Since size of tiboot3 is more than 512 Kb,
If we write whole tiboot3, then it will over write next image offset at 0x400.
So boot will stuck for looking for tispl.bin
Restricting writing of tiboot3 to 0x400 blocks will leads to corrupt image of tiboot3, so nothing will start.
Quoted 82 lines
Quoted 82 lines
Fixes f8c1e893c82 (configs: j7200_evm_a72: Add Initial suppot)Fixes 02dff65efe7 (configs: j7200_evm_r5: Add initial support)Fixes 360c7f46f39 (configs: Add configs for J7200 High Security EVM)Way to test with eMMC UDA partition
=> mmc dev 0 0
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr}0x00x800
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr}0x8000x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr}0x18000x2000
=> mmc partconf 0 1 7 1
=> mmc bootbus 0 2 0 0Cc Bhavya Kapoor <[email protected]>Cc Diwakar Dhyani <[email protected]>Cc KEERTHY <[email protected]>Signed-off-by Udit Kumar <[email protected]>--- configs/j7200_evm_a72_defconfig | 2 +- configs/j7200_evm_r5_defconfig | 2 +- configs/j7200_hs_evm_a72_defconfig | 2 +- configs/j7200_hs_evm_r5_defconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)configs/j7200_evm_a72_defconfig +1
-1@@ -46,7 +46,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"configs/j7200_evm_r5_defconfig +1
-1@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=yconfigs/j7200_hs_evm_a72_defconfig +1
-1@@ -47,7 +47,7 @@ CONFIG_SPL_STACK_R=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SYS_SPL_MALLOC_SIZE=0x800000 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"configs/j7200_hs_evm_r5_defconfig +1
-1@@ -43,7 +43,7 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000 CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=ySignature · 1 line
2.34.1
Quoted 8 lines · Udit
Quoted 6 lines · Nishanth Menon
Quoted 5 lines · Udit Kumar
This patch corrects the MMC raw mode sector offset as per documentation.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Section: eMMC layout
Please drop these TI specific documentation. Instead ADD documentation into u-boot source explaining these eMMC layout.
Sure,
will
arch/arm/mach-k3/j7200/place will be good to hold such documentation ?
No, it should be under doc/board/ti/ in rST and follows doc/develop/docstyle.rst
Signature · 1 line
Tom