summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8188
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8188')
-rw-r--r--src/soc/mediatek/mt8188/Makefile.inc1
-rw-r--r--src/soc/mediatek/mt8188/include/soc/spm.h29
-rw-r--r--src/soc/mediatek/mt8188/mtcmos.c11
3 files changed, 21 insertions, 20 deletions
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index ded5dfcab4..83914e8d50 100644
--- a/src/soc/mediatek/mt8188/Makefile.inc
+++ b/src/soc/mediatek/mt8188/Makefile.inc
@@ -42,6 +42,7 @@ ramstage-y += ../common/mcupm.c
ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
ramstage-y += ../common/mt6359p.c mt6359p.c
+ramstage-y += ../common/mtcmos.c mtcmos.c
ramstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c
ramstage-y += ../common/pmif_spi.c pmif_spi.c
ramstage-y += soc.c
diff --git a/src/soc/mediatek/mt8188/include/soc/spm.h b/src/soc/mediatek/mt8188/include/soc/spm.h
index 9c5a80755a..240805c69a 100644
--- a/src/soc/mediatek/mt8188/include/soc/spm.h
+++ b/src/soc/mediatek/mt8188/include/soc/spm.h
@@ -986,30 +986,12 @@ static struct mtk_spm_regs *const mtk_spm = (void *)SPM_BASE;
static const struct power_domain_data disp[] = {
{
- .pwr_con = &mtk_spm->vppsys0_pwr_con,
- .pwr_sta_mask = BIT(11),
- .sram_pdn_mask = BIT(8),
- .sram_ack_mask = BIT(12),
- },
- {
.pwr_con = &mtk_spm->vdosys0_pwr_con,
.pwr_sta_mask = BIT(13),
.sram_pdn_mask = BIT(8),
.sram_ack_mask = BIT(12),
},
{
- .pwr_con = &mtk_spm->vppsys1_pwr_con,
- .pwr_sta_mask = BIT(12),
- .sram_pdn_mask = BIT(8),
- .sram_ack_mask = BIT(12),
- },
- {
- .pwr_con = &mtk_spm->vdosys1_pwr_con,
- .pwr_sta_mask = BIT(14),
- .sram_pdn_mask = BIT(8),
- .sram_ack_mask = BIT(12),
- },
- {
.pwr_con = &mtk_spm->edp_tx_pwr_con,
.pwr_sta_mask = BIT(17),
.sram_pdn_mask = BIT(8),
@@ -1019,14 +1001,21 @@ static const struct power_domain_data disp[] = {
static const struct power_domain_data audio[] = {
{
- .pwr_con = &mtk_spm->adsp_pwr_con,
+ .pwr_con = &mtk_spm->adsp_ao_pwr_con,
+ .pwr_sta_mask = BIT(10),
+ .ext_buck_iso_bits = BIT(10),
+ .caps = SCPD_EXT_BUCK_ISO,
+ },
+ {
+ .pwr_con = &mtk_spm->adsp_infra_pwr_con,
.pwr_sta_mask = BIT(10),
.sram_pdn_mask = BIT(8),
.sram_ack_mask = BIT(12),
+ .caps = SCPD_SRAM_ISO,
},
{
.pwr_con = &mtk_spm->audio_pwr_con,
- .pwr_sta_mask = BIT(8),
+ .pwr_sta_mask = BIT(6),
.sram_pdn_mask = BIT(8),
.sram_ack_mask = BIT(12),
},
diff --git a/src/soc/mediatek/mt8188/mtcmos.c b/src/soc/mediatek/mt8188/mtcmos.c
new file mode 100644
index 0000000000..3143b019f1
--- /dev/null
+++ b/src/soc/mediatek/mt8188/mtcmos.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+
+#include <device/mmio.h>
+#include <soc/infracfg.h>
+#include <soc/mtcmos.h>
+#include <soc/spm.h>
+
+void mtcmos_set_scpd_ext_buck_iso(const struct power_domain_data *pd)
+{
+ clrbits32(&mtk_spm->ext_buck_iso, pd->ext_buck_iso_bits);
+}