Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52728 )
Change subject: soc/mediatek/mt8192: devapc: Add ADSP domain setting ......................................................................
soc/mediatek/mt8192: devapc: Add ADSP domain setting
Configure ADSP domain from 0 to 4 and lock it to prevent changing it unexpectedly.
TEST=emerge-asurada coreboot BRANCH=asurada
Change-Id: Ib938ba05e8d0342572c57366c97ebb0185da8aba Signed-off-by: Tinghan Shen tinghan.shen@mediatek.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/52728 Reviewed-by: Yu-Ping Wu yupingso@google.com Reviewed-by: Patrick Georgi pgeorgi@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8192/devapc.c M src/soc/mediatek/mt8192/include/soc/devapc.h 2 files changed, 4 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8192/devapc.c b/src/soc/mediatek/mt8192/devapc.c index 327896b..e854727 100644 --- a/src/soc/mediatek/mt8192/devapc.c +++ b/src/soc/mediatek/mt8192/devapc.c @@ -71,9 +71,10 @@ static void scp_master_init(uintptr_t base) { write32(getreg(base, SCP_DOM), MAS_DOMAIN_3); + write32(getreg(base, ADSP_DOM), MAS_DOMAIN_4);
- /* Let SCP_DOM register be read-only for security */ - write32(getreg(base, ONETIME_LOCK), 0x1); + /* Let SCP_DOM and ADSP_DOM registers be read-only for security */ + write32(getreg(base, ONETIME_LOCK), 0x5); }
struct devapc_init { diff --git a/src/soc/mediatek/mt8192/include/soc/devapc.h b/src/soc/mediatek/mt8192/include/soc/devapc.h index fd332db..e79acfa 100644 --- a/src/soc/mediatek/mt8192/include/soc/devapc.h +++ b/src/soc/mediatek/mt8192/include/soc/devapc.h @@ -23,6 +23,7 @@
enum scp_offset { SCP_DOM = 0xA5080, + ADSP_DOM = 0xA5088, ONETIME_LOCK = 0xA5104, };