summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8183
diff options
context:
space:
mode:
authorWeiyi Lu <weiyi.lu@mediatek.com>2021-02-09 15:59:02 +0800
committerHung-Te Lin <hungte@chromium.org>2021-05-05 07:37:21 +0000
commit7fd932744e68fed23944012ac3d9e7c193402f8b (patch)
tree14f87364d7127d49cc8e20da6678fc4dd8e604f0 /src/soc/mediatek/mt8183
parent46e1b84fad8d8a11c0d84c094f47ef3fa22f711d (diff)
downloadcoreboot-7fd932744e68fed23944012ac3d9e7c193402f8b.tar.gz
coreboot-7fd932744e68fed23944012ac3d9e7c193402f8b.tar.bz2
coreboot-7fd932744e68fed23944012ac3d9e7c193402f8b.zip
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 <weiyi.lu@mediatek.com> Change-Id: I8c3d19f1e9a4e516d674d68989ad509f37e5b593 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8183')
-rw-r--r--src/soc/mediatek/mt8183/include/soc/spm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/include/soc/spm.h b/src/soc/mediatek/mt8183/include/soc/spm.h
index 327355ae053f..d5663bef7a91 100644
--- a/src/soc/mediatek/mt8183/include/soc/spm.h
+++ b/src/soc/mediatek/mt8183/include/soc/spm.h
@@ -4,6 +4,7 @@
#define SOC_MEDIATEK_MT8183_SPM_H
#include <soc/addressmap.h>
+#include <soc/mtcmos.h>
#include <types.h>
/* SPM READ/WRITE CFG */
@@ -580,4 +581,22 @@ struct dyna_load_pcm {
int spm_init(void);
+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_MT8183_SPM_H */