Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69088 )
Change subject: soc/mediatek/mt8188: Fix AP hang when enabling cpufreq-hw driver ......................................................................
soc/mediatek/mt8188: Fix AP hang when enabling cpufreq-hw driver
When enabling cpufreq-hw driver, it is required for MCUPM to access secure registers. Therefore, we enable side-band to allow MCUPM to access the secure registers.
BUG=b:236331463 TEST=It works well after boot to login shell.
Change-Id: I67b08c38a31a7eae1bc59543a5148a78b61456d6 Signed-off-by: Liju-Clr Chen liju-clr.chen@mediatek.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/69088 Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com Reviewed-by: Rex-BC Chen rex-bc.chen@mediatek.com --- M src/soc/mediatek/mt8188/devapc.c M src/soc/mediatek/mt8188/include/soc/devapc.h 2 files changed, 28 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, but someone else must approve Rex-BC Chen: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8188/devapc.c b/src/soc/mediatek/mt8188/devapc.c index 1fe3cf8..afb39d5 100644 --- a/src/soc/mediatek/mt8188/devapc.c +++ b/src/soc/mediatek/mt8188/devapc.c @@ -1550,7 +1550,10 @@
static void infra_init(uintptr_t base) { - /* Default APC setting */ + /* Side-band */ + SET32_BITFIELDS(getreg(base, MAS_SEC_0), MCUPM_SEC, SECURE_TRANS); + + /* TODO: Setup SCP, SSPM and MCUPM permissions in APC . */ set_infra_ao_apc(base); }
diff --git a/src/soc/mediatek/mt8188/include/soc/devapc.h b/src/soc/mediatek/mt8188/include/soc/devapc.h index e0b0f00..3cbce5c 100644 --- a/src/soc/mediatek/mt8188/include/soc/devapc.h +++ b/src/soc/mediatek/mt8188/include/soc/devapc.h @@ -17,6 +17,8 @@ AO_APC_CON = 0x00F00, };
+DEFINE_BIT(MCUPM_SEC, 1) + /****************************************************************************** * STRUCTURE DEFINITION ******************************************************************************/