[MTK] How to enable eMMC and UFS combo
文摘 MediaTek 2020-05-15 阅读:9556[DESCRIPTION]
Use the same SW to support eMMB and UFS.
[SOLUTION]
1. Preloader
- Preloader is special, because it have size limit and it have no MTK_UFS_SUPPORT option.
-- Use another compile option to decide if need eMMC and UFS Combo
platform/[PROJ]/src/core/inc/boot_device.h:
#define BOOTDEV_SDMMC_UFS_COMBO
-- if BOOTDEV_SDMMC_UFS_COMBO not define, only link the cust_bldr.mak setting
(CFG_BOOT_DEV :=BOOTDEV_SDMMC or CFG_BOOT_DEV :=BOOTDEV_UFS)
- eMMC option
MTK_EMMC_SUPPORT=yes
- Other eMMC option can turn on directly if need
MTK_EMMC_SUPPORT_OTP=yes
- Other UFS option can turn on directly if need
MTK_UFS_OTP_SUPPORT=yes
MTK_UFS_POWP_SUPPORT=yes
2. LK
- Turn on both MTK_UFS_SUPPORT and MTK_EMMC_SUPPORT in
LK project/[PROJ].mk
- After turn on, then LK is support both storage.
- Other eMMC option can turn on directly if need
MTK_EMMC_SUPPORT_OTP = yes
DEFINES += MTK_NEW_COMBO_EMMC_SUPPORT
- Other UFS option can turn on directly if need
MTK_UFS_OTP = yes
3. Kernel
- Turn on both CONFIG_MTK_UFS_SUPPORT and CONFIG_MTK_EMMC_SUPPORT in
Kernel [PROJ]_defconfig
- After turn on, then kernel is support both storage.
- eMMC option also need
CONFIG_MMC_MTK_PRO=y
- UFS option also need
CONFIG_SCSI_UFSHCD=y
CONFIG_SCSI_UFSHCD_PLATFORM=y
Remove # CONFIG_SCSI_LOWLEVEL is not set
- Other eMMC option can turn on directly if need
CONFIG_MTK_EMMC_CACHE=y
CONFIG_MTK_EMMC_SUPPORT_OTP=y
CONFIG_MTK_EMMC_CQ_SUPPORT=y
4. Android
- Turn on both MTK_UFS_SUPPORT and MTK_EMMC_SUPPORT in
Android [PROJ]/ProjectConfig.mk
- After turn on, then Android is support both storage.
- Other eMMC option can turn on directly if need
MTK_EMMC_SUPPORT_OTP = yes
MTK_NEW_COMBO_EMMC_SUPPORT = yes
- Other UFS option can turn on directly if need
MTK_UFS_OTP = yes