From 7fd932744e68fed23944012ac3d9e7c193402f8b Mon Sep 17 00:00:00 2001 From: Weiyi Lu Date: Tue, 9 Feb 2021 15:59:02 +0800 Subject: soc/mediatek: Move the power domain data under each SoC In follow-up patches, we need to set multiple power domains to power on the display and audio on MT8195. Move the power domain data under each SoC and make power_on() API to support multiple settings. Signed-off-by: Weiyi Lu Change-Id: I8c3d19f1e9a4e516d674d68989ad509f37e5b593 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52881 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/mt8173/include/soc/spm.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/soc/mediatek/mt8173/include') diff --git a/src/soc/mediatek/mt8173/include/soc/spm.h b/src/soc/mediatek/mt8173/include/soc/spm.h index efc04d1ddc..64b33c8c83 100644 --- a/src/soc/mediatek/mt8173/include/soc/spm.h +++ b/src/soc/mediatek/mt8173/include/soc/spm.h @@ -4,6 +4,7 @@ #define __SOC_MEDIATEK_MT8173_SPM_H__ #include +#include #include enum { @@ -152,4 +153,22 @@ check_member(mtk_spm_regs, sleep_ca15_wfi_en[3], 0xf1c); 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 = DISP_PWR_STA_MASK, + .sram_pdn_mask = DISP_SRAM_PDN_MASK, + .sram_ack_mask = DISP_SRAM_ACK_MASK, + }, +}; + +static const struct power_domain_data audio[] = { + { + .pwr_con = &mtk_spm->audio_pwr_con, + .pwr_sta_mask = AUDIO_PWR_STA_MASK, + .sram_pdn_mask = AUDIO_SRAM_PDN_MASK, + .sram_ack_mask = AUDIO_SRAM_ACK_MASK, + }, +}; + #endif /* __SOC_MEDIATEK_MT8173_SPM_H__ */ -- cgit v1.2.3