[PATCH 0/6] AM64: Add support for higher speed modes and boot mode in eMMC

The following series of patches add support for, - HS200/HS400 speed modes - eMMC boot mode - gpt and FDT library overlay
This series of patches, - dependent on https://patchwork.ozlabs.org/project/uboot/list/?series=237442
- applies on top of, https://patchwork.ozlabs.org/project/uboot/list/?series=246976
Aswath Govindraju (4): arch: arm: mach-k3: am642_init: Correct the function name spl_boot_mode() to spl_mmc_boot_mode() arch: dts: am642-sk-u-boot: Disable main_sdhci0 DT node and define alias index 1 for main_sdhci1 node configs: am64x_evm: Move CONFIG_SYS_MMC_ENV_DEV and CONFIG_SYS_MMC_ENV_PART to defconfig files and enable configs to save env in eMMC and FAT write. configs: am64x_evm_*_defconfig: Enable config to support gpt and FDT library overlay
Kishon Vijay Abraham I (2): configs: am64x_evm_a53_defconfig: Enable configs to support HS200/HS400 configs: am64x_evm_a53_defconfig/am64x_evm_r5_defconfig: Enable configs to support eMMC boot
arch/arm/dts/k3-am642-sk-u-boot.dtsi | 5 +++++ arch/arm/mach-k3/am642_init.c | 2 +- configs/am64x_evm_a53_defconfig | 18 +++++++++++++++--- configs/am64x_evm_r5_defconfig | 7 +++++++ include/configs/am64x_evm.h | 6 ------ 5 files changed, 28 insertions(+), 10 deletions(-)

Function spl_boot_mode() is called in common/spl/spl_mmc.c, to find the boot mode for a given boot device. This function was renamed to spl_mmc_boot_mode() by commit e97590654aea4c964f49bd915543a417d0c76996.
Therefore, rename spl_boot_mode to spl_mmc_boot_mode.
Fixes: 57dba04afbb7 ("arm: mach-k3: am642: Add support for boot device detection") Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- arch/arm/mach-k3/am642_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 579dbacb7e48..8d8b07076a98 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -198,7 +198,7 @@ void board_init_f(ulong dummy) #endif }
-u32 spl_boot_mode(const u32 boot_device) +u32 spl_mmc_boot_mode(const u32 boot_device) { switch (boot_device) { case BOOT_DEVICE_MMC1:

A Wilink wireless device is connected to MMCSD0 subsystem and is not supported in U-Boot. Therefore, disable main_sdhci0 device tree node in U-Boot.
If main_sdhci0 device tree node is disabled then the the index of main_sdhci1 node becomes 0 which leads to break in boot flow. Therefore, add an alias to fix the index to 1.
Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- arch/arm/dts/k3-am642-sk-u-boot.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi index 35b49df85106..efbcfb36e92a 100644 --- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi @@ -8,6 +8,10 @@ stdout-path = "serial2:115200n8"; tick-timer = &timer1; }; + + aliases { + mmc1 = &sdhci1; + }; };
&cbass_main{ @@ -79,6 +83,7 @@ };
&sdhci0 { + status = "disabled"; u-boot,dm-spl; };

From: Kishon Vijay Abraham I kishon@ti.com
Enable configs to support HS200/HS400.
Signed-off-by: Kishon Vijay Abraham I kishon@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/am64x_evm_a53_defconfig | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index a3aab807c6e7..41eb43f191d6 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -73,6 +73,11 @@ CONFIG_DM_I2C=y CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y +CONFIG_DM_MMC=y +CONFIG_MMC_HS200_SUPPORT=y +CONFIG_SPL_MMC_HS200_SUPPORT=y +CONFIG_MMC_HS400_SUPPORT=y +CONFIG_SPL_MMC_HS400_SUPPORT=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y

Kconfig symbols for SYS_MMC_ENV_DEV and SYS_MMC_ENV_PART have been added by commit 7d080773347c1f6e0e896d9284134a2a411155d6. Therefore, move the definitions of configs to corresponding board defconfig files and enable configs to save env in eMMC.
Also enable config for FAT write in U-Boot.
Fixes: 33b7258947f4 ("board: ti: am64x: Add board support for am64x evm") Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/am64x_evm_a53_defconfig | 10 +++++++--- configs/am64x_evm_r5_defconfig | 4 ++++ include/configs/am64x_evm.h | 6 ------ 3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 41eb43f191d6..34c527940cb6 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -8,6 +8,7 @@ CONFIG_SOC_K3_AM642=y CONFIG_K3_ATF_LOAD_ADDR=0x701a0000 CONFIG_TARGET_AM642_A53_EVM=y CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x680000 CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 CONFIG_SPL_DM_SPI=y CONFIG_SPL_TEXT_BASE=0x80080000 @@ -29,6 +30,8 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y @@ -53,10 +56,10 @@ CONFIG_OF_LIST="k3-am642-evm k3-am642-sk" CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_IS_NOWHERE=y -CONFIG_ENV_IS_IN_FAT=y -CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_SYS_MMC_ENV_DEV=0 +CONFIG_SYS_MMC_ENV_PART=1 CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y @@ -147,3 +150,4 @@ CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_MASS_STORAGE=y +CONFIG_FAT_WRITE=y diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig index 3e9b5650c60d..57e0399ea0fa 100644 --- a/configs/am64x_evm_r5_defconfig +++ b/configs/am64x_evm_r5_defconfig @@ -7,6 +7,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x80000 CONFIG_SOC_K3_AM642=y CONFIG_TARGET_AM642_R5_EVM=y CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x680000 CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y @@ -22,6 +23,9 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="k3-am642-r5-evm" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_SYS_MMC_ENV_DEV=0 +CONFIG_SYS_MMC_ENV_PART=1 CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000 # CONFIG_DISPLAY_CPUINFO is not set diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h index c2c2bf06777c..7c520f4395b5 100644 --- a/include/configs/am64x_evm.h +++ b/include/configs/am64x_evm.h @@ -115,10 +115,4 @@
#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
-/* MMC ENV related defines */ -#ifdef CONFIG_ENV_IS_IN_MMC -#define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_SYS_MMC_ENV_PART 1 -#endif - #endif /* __CONFIG_AM642_EVM_H */

From: Kishon Vijay Abraham I kishon@ti.com
Enable configs to support eMMC boot.
Signed-off-by: Kishon Vijay Abraham I kishon@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/am64x_evm_a53_defconfig | 1 + configs/am64x_evm_r5_defconfig | 2 ++ 2 files changed, 3 insertions(+)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 34c527940cb6..edce099f28b2 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -81,6 +81,7 @@ CONFIG_MMC_HS200_SUPPORT=y CONFIG_SPL_MMC_HS200_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y CONFIG_SPL_MMC_HS400_SUPPORT=y +CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig index 57e0399ea0fa..df70852669d4 100644 --- a/configs/am64x_evm_r5_defconfig +++ b/configs/am64x_evm_r5_defconfig @@ -37,6 +37,8 @@ CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_EARLY_BSS=y CONFIG_SPL_BOARD_INIT=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_DM_MAILBOX=y

Enable config to support gpt command on AM642 evm/sk and enable config for FDT library overlay support
Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/am64x_evm_a53_defconfig | 2 ++ configs/am64x_evm_r5_defconfig | 1 + 2 files changed, 3 insertions(+)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index edce099f28b2..b19b58f795b0 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -120,6 +120,7 @@ CONFIG_OMAP_TIMER=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_CMD_DFU=y CONFIG_CMD_DM=y +CONFIG_CMD_GPT=y CONFIG_CMD_USB=y CONFIG_DFU=y CONFIG_DFU_OVER_USB=y @@ -152,3 +153,4 @@ CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_MASS_STORAGE=y CONFIG_FAT_WRITE=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig index df70852669d4..1f04b3683f87 100644 --- a/configs/am64x_evm_r5_defconfig +++ b/configs/am64x_evm_r5_defconfig @@ -58,6 +58,7 @@ CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_CMD_ASKENV=y CONFIG_CMD_DFU=y +CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_USB=y

On Thu, 3 Jun 2021 14:34:22 +0530, Aswath Govindraju wrote:
The following series of patches add support for,
- HS200/HS400 speed modes
- eMMC boot mode
- gpt and FDT library overlay
This series of patches,
[...]
Applied to https://source.denx.de/u-boot/custodians/u-boot-ti.git for-rc, thanks! [1/6] arch: arm: mach-k3: am642_init: Correct the function name spl_boot_mode() to spl_mmc_boot_mode() https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/2140d6b0ff [2/6] arch: dts: am642-sk-u-boot: Disable main_sdhci0 DT node and define alias index 1 for main_sdhci1 node https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/0817dd5432 [3/6] configs: am64x_evm_a53_defconfig: Enable configs to support HS200/HS400 https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/a3d58069c4 [4/6] configs: am64x_evm: Move CONFIG_SYS_MMC_ENV_DEV and CONFIG_SYS_MMC_ENV_PART to defconfig files and enable configs to save env in eMMC and FAT write. https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/acbda111b2 [5/6] configs: am64x_evm_a53_defconfig/am64x_evm_r5_defconfig: Enable configs to support eMMC boot (no commit info) [6/6] configs: am64x_evm_*_defconfig: Enable config to support gpt and FDT library overlay https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/f572129b13
-- Thanks and Regards, Lokesh
participants (2)
-
Aswath Govindraju
-
Lokesh Vutla