Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68577 )
Change subject: soc/mediatek/mt8186: Add PWRAP_WITH_PMIF_SPMI Kconfig option ......................................................................
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 --- M src/soc/mediatek/common/Kconfig M src/soc/mediatek/common/pmif.c M src/soc/mediatek/mt8186/Kconfig 3 files changed, 30 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/common/Kconfig b/src/soc/mediatek/common/Kconfig index 119746b..ce9f883 100644 --- a/src/soc/mediatek/common/Kconfig +++ b/src/soc/mediatek/common/Kconfig @@ -63,4 +63,11 @@ When this option is enabled, the flash controller provides the ability 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 diff --git a/src/soc/mediatek/common/pmif.c b/src/soc/mediatek/common/pmif.c index a7ab4e5..a7076ee 100644 --- a/src/soc/mediatek/common/pmif.c +++ b/src/soc/mediatek/common/pmif.c @@ -297,7 +297,7 @@ ret = pmif_clk_init(); if (!ret) 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));
return ret; diff --git a/src/soc/mediatek/mt8186/Kconfig b/src/soc/mediatek/mt8186/Kconfig index db5bed2..bac220e 100644 --- a/src/soc/mediatek/mt8186/Kconfig +++ b/src/soc/mediatek/mt8186/Kconfig @@ -12,6 +12,7 @@ select MEDIATEK_BLOB_FAST_INIT select USE_CBMEM_DRAM_INFO select FLASH_DUAL_IO_READ + select PWRAP_WITH_PMIF_SPMI
if SOC_MEDIATEK_MT8186