Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68578 )
(
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: soc/mediatek/mt8186: Add PMIF_SPMI_IOCFG_DEFAULT_SETTING Kconfig option ......................................................................
soc/mediatek/mt8186: Add PMIF_SPMI_IOCFG_DEFAULT_SETTING Kconfig option
For MT8186, PMIF_SPMI mode is the hardware default setting, so we don't need to configure PMIF SPMI IO pins. Add a config to control that.
BUG=b:249436110 TEST=build pass. BRANCH=corsola
Signed-off-by: Bo-Chen Chen rex-bc.chen@mediatek.com Change-Id: I92b54e8379a5dec55ef95cbd72ce03abd3a4954b Reviewed-on: https://review.coreboot.org/c/coreboot/+/68578 Reviewed-by: Yu-Ping Wu yupingso@google.com Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/common/Kconfig M src/soc/mediatek/common/pmif_spmi.c M src/soc/mediatek/mt8186/Kconfig 3 files changed, 31 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 ce9f883..62934da 100644 --- a/src/soc/mediatek/common/Kconfig +++ b/src/soc/mediatek/common/Kconfig @@ -70,4 +70,11 @@ When this option is enabled, the PMIC interface only supports PWRAP and PMIF_SPMI.
+config PMIF_SPMI_IOCFG_DEFAULT_SETTING + bool + default n + help + For SoCs where IO pins default to PMIF_SPMI mode, enable this option + to skip software PMIF_SPMI IO pins configuration. + endif diff --git a/src/soc/mediatek/common/pmif_spmi.c b/src/soc/mediatek/common/pmif_spmi.c index 8ff7c1e..afeeddf 100644 --- a/src/soc/mediatek/common/pmif_spmi.c +++ b/src/soc/mediatek/common/pmif_spmi.c @@ -82,7 +82,8 @@ return -E_INVAL; }
- pmif_spmi_iocfg(); + if (!CONFIG(PMIF_SPMI_IOCFG_DEFAULT_SETTING)) + pmif_spmi_iocfg(); spmi_config_master();
for (i = 0; i < spmi_dev_cnt; i++) diff --git a/src/soc/mediatek/mt8186/Kconfig b/src/soc/mediatek/mt8186/Kconfig index bac220e..e6cdb00 100644 --- a/src/soc/mediatek/mt8186/Kconfig +++ b/src/soc/mediatek/mt8186/Kconfig @@ -13,6 +13,7 @@ select USE_CBMEM_DRAM_INFO select FLASH_DUAL_IO_READ select PWRAP_WITH_PMIF_SPMI + select PMIF_SPMI_IOCFG_DEFAULT_SETTING
if SOC_MEDIATEK_MT8186