soc/mediatek/mt8186: Add PWRAP_WITH_PMIF_SPMI Kconfig option

On MT8186, PMIC interface supports PWRAP and PMIF_SPMI while other
MediaTek SoCs support PMIF_SPMI and PMIF_SPI.

BUG=b:249436110
TEST=build pass.
BRANCH=corsola

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I20efa6d84975d781972af9143c0c7e3a272653e0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68577
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rex-BC Chen 2022-10-19 18:51:39 +08:00 committed by Felix Held
parent 6ad80f1b81
commit 6d449e005c
3 changed files with 9 additions and 1 deletions

View File

@ -63,4 +63,11 @@ config FLASH_DUAL_IO_READ
When this option is enabled, the flash controller provides the ability When this option is enabled, the flash controller provides the ability
to dual IO read mode. to dual IO read mode.
config PWRAP_WITH_PMIF_SPMI
bool
default n
help
When this option is enabled, the PMIC interface only supports PWRAP
and PMIF_SPMI.
endif endif

View File

@ -297,7 +297,7 @@ int mtk_pmif_init(void)
ret = pmif_clk_init(); ret = pmif_clk_init();
if (!ret) if (!ret)
ret = pmif_spmi_init(get_pmif_controller(PMIF_SPMI, SPMI_MASTER_0)); ret = pmif_spmi_init(get_pmif_controller(PMIF_SPMI, SPMI_MASTER_0));
if (!ret) if (!ret && !CONFIG(PWRAP_WITH_PMIF_SPMI))
ret = pmif_spi_init(get_pmif_controller(PMIF_SPI, 0)); ret = pmif_spi_init(get_pmif_controller(PMIF_SPI, 0));
return ret; return ret;

View File

@ -12,6 +12,7 @@ config SOC_MEDIATEK_MT8186
select MEDIATEK_BLOB_FAST_INIT select MEDIATEK_BLOB_FAST_INIT
select USE_CBMEM_DRAM_INFO select USE_CBMEM_DRAM_INFO
select FLASH_DUAL_IO_READ select FLASH_DUAL_IO_READ
select PWRAP_WITH_PMIF_SPMI
if SOC_MEDIATEK_MT8186 if SOC_MEDIATEK_MT8186