diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2022-10-19 18:51:39 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-21 14:52:42 +0000 |
commit | 6d449e005c5fc3f5bd54214de0a6d4a04989b042 (patch) | |
tree | dfb914a0cf631de16cc1158d4f3c97b17eca15dc /src/soc | |
parent | 6ad80f1b81d08e6c1400eaceb710887371254894 (diff) |
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>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/mediatek/common/Kconfig | 7 | ||||
-rw-r--r-- | src/soc/mediatek/common/pmif.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/Kconfig | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/Kconfig b/src/soc/mediatek/common/Kconfig index 119746b497..ce9f883356 100644 --- a/src/soc/mediatek/common/Kconfig +++ b/src/soc/mediatek/common/Kconfig @@ -63,4 +63,11 @@ config FLASH_DUAL_IO_READ 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 a7ab4e5fa5..a7076eead2 100644 --- a/src/soc/mediatek/common/pmif.c +++ b/src/soc/mediatek/common/pmif.c @@ -297,7 +297,7 @@ int mtk_pmif_init(void) 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 db5bed217f..bac220e89e 100644 --- a/src/soc/mediatek/mt8186/Kconfig +++ b/src/soc/mediatek/mt8186/Kconfig @@ -12,6 +12,7 @@ config SOC_MEDIATEK_MT8186 select MEDIATEK_BLOB_FAST_INIT select USE_CBMEM_DRAM_INFO select FLASH_DUAL_IO_READ + select PWRAP_WITH_PMIF_SPMI if SOC_MEDIATEK_MT8186 |