From c7e17bce06f36f52652f9ce0865d7fff38446caa Mon Sep 17 00:00:00 2001 From: Chun-Jie Chen Date: Fri, 12 Nov 2021 09:42:12 +0800 Subject: soc/mediatek/mt8186: Add mtcmos init support Add mtcmos to support display and audio. TEST=build pass BUG=b:202871018 Signed-off-by: Chun-Jie Chen Change-Id: Ib9d41d47f235376f524c3ff78f1fcc069cbc60cd Reviewed-on: https://review.coreboot.org/c/coreboot/+/59343 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/mt8186/include/soc/spm.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/soc/mediatek/mt8186/include') diff --git a/src/soc/mediatek/mt8186/include/soc/spm.h b/src/soc/mediatek/mt8186/include/soc/spm.h index c60d62ba9b..18a97445fa 100644 --- a/src/soc/mediatek/mt8186/include/soc/spm.h +++ b/src/soc/mediatek/mt8186/include/soc/spm.h @@ -10,6 +10,7 @@ #include #include +#include #include #define SPM_INIT_DONE_US 20 @@ -140,7 +141,7 @@ DEFINE_BIT(SYS_TIMER_START_EN_LSB, 0) PCM_SW_INT0) struct mtk_spm_regs { - uint32_t poweron_config_en; + uint32_t poweron_config_set; uint32_t spm_power_on_val0; uint32_t spm_power_on_val1; uint32_t spm_clk_con; @@ -833,6 +834,8 @@ struct pwr_ctrl { /* Auto-gen End */ }; +check_member(mtk_spm_regs, poweron_config_set, 0x0); +check_member(mtk_spm_regs, dis_pwr_con, 0x354); check_member(mtk_spm_regs, ap_mdsrc_req, 0x430); check_member(mtk_spm_regs, ssusb_top_pwr_con, 0x9F0); check_member(mtk_spm_regs, ssusb_top_p1_pwr_con, 0x9F4); @@ -853,6 +856,19 @@ struct dyna_load_pcm { static struct mtk_spm_regs *const mtk_spm = (void *)SPM_BASE; +static const struct power_domain_data disp[] = { + { + .pwr_con = &mtk_spm->dis_pwr_con, + .pwr_sta_mask = 0x1 << 21, + .sram_pdn_mask = 0x1 << 8, + .sram_ack_mask = 0x1 << 12, + }, +}; + +/* without audio mtcmos control in MT8186 */ +static const struct power_domain_data audio[] = { +}; + int spm_init(void); #endif /* SOC_MEDIATEK_MT8186_SPM_H */ -- cgit v1.2.3