hsin-hsiung wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/51056 )
Change subject: WIP: soc/mediatek/mt8192: mt6315: update correct slave id ......................................................................
WIP: soc/mediatek/mt8192: mt6315: update correct slave id
1. update correct slave id for spmi write field cmd. 2. clear boot status of gpu buck. 2. update the correct sequence flow of the key protection.
BUG=b:179000151 BRANCH=none TEST=boot asurada correctly
Signed-off-by: Hsin-Hsiung Wang hsin-hsiung.wang@mediatek.com Change-Id: Ifd04da8ac55bcc9f9fdbc088d430522c2725ad47 --- M src/soc/mediatek/mt8192/mt6315.c 1 file changed, 29 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/51056/1
diff --git a/src/soc/mediatek/mt8192/mt6315.c b/src/soc/mediatek/mt8192/mt6315.c index 7653495..7a954d5 100644 --- a/src/soc/mediatek/mt8192/mt6315.c +++ b/src/soc/mediatek/mt8192/mt6315.c @@ -90,17 +90,19 @@ {0x16AC, 0xD7, 0xFF, 0}, {0x16AD, 0x81, 0xFF, 0}, {0x16AE, 0x13, 0x3F, 0}, + /* reset sequence off to zero */ + {0x139, 0, 0x1, 0}, /* enable magic key protection */ - {0x3A9, 0, 0xFF, 0}, - {0x3A8, 0, 0xFF, 0}, - {0x3A0, 0, 0xFF, 0}, - {0x39F, 0, 0xFF, 0}, - {0x993, 0, 0xFF, 0}, - {0x992, 0, 0xFF, 0}, - {0x1418, 0, 0xFF, 0}, - {0x1417, 0, 0xFF, 0}, - {0x3a2, 0, 0xFF, 0}, {0x3a1, 0, 0xFF, 0}, + {0x3a2, 0, 0xFF, 0}, + {0x1417, 0, 0xFF, 0}, + {0x1418, 0, 0xFF, 0}, + {0x992, 0, 0xFF, 0}, + {0x993, 0, 0xFF, 0}, + {0x39F, 0, 0xFF, 0}, + {0x3A0, 0, 0xFF, 0}, + {0x3A8, 0, 0xFF, 0}, + {0x3A9, 0, 0xFF, 0}, };
static const struct mt6315_setting init_setting_gpu[] = { @@ -115,6 +117,11 @@ {0x1417, 0x43, 0xFF, 0}, {0x3a2, 0x2A, 0xFF, 0}, {0x3a1, 0x7C, 0xFF, 0}, + /* clear boot status */ + {0x12A, 0x3, 0xFF, 0}, + {0xD, 1, 0x1, 0}, + {0xD, 0, 0x1, 0}, + {0x1416, 0xF, 0xF, 0}, /* init setting */ {0x13, 0x2, 0x2, 0}, {0x15, 0x1F, 0x1F, 0}, @@ -182,17 +189,19 @@ {0x16AE, 0x13, 0x3F, 0}, /* Don't remove this! it's MT6315 for GPU only to disable VBUCK3 */ {0x1440, 0x0, 0x4, 0}, + /* reset sequence off to zero */ + {0x139, 0, 0x1, 0}, /* enable magic key protection */ - {0x3A9, 0, 0xFF, 0}, - {0x3A8, 0, 0xFF, 0}, - {0x3A0, 0, 0xFF, 0}, - {0x39F, 0, 0xFF, 0}, - {0x993, 0, 0xFF, 0}, - {0x992, 0, 0xFF, 0}, - {0x1418, 0, 0xFF, 0}, - {0x1417, 0, 0xFF, 0}, - {0x3a2, 0, 0xFF, 0}, {0x3a1, 0, 0xFF, 0}, + {0x3a2, 0, 0xFF, 0}, + {0x1417, 0, 0xFF, 0}, + {0x1418, 0, 0xFF, 0}, + {0x992, 0, 0xFF, 0}, + {0x993, 0, 0xFF, 0}, + {0x39F, 0, 0xFF, 0}, + {0x3A0, 0, 0xFF, 0}, + {0x3A8, 0, 0xFF, 0}, + {0x3A9, 0, 0xFF, 0}, };
static void mt6315_read(u32 slvid, u32 reg, u32 *data) @@ -207,7 +216,7 @@
static void mt6315_write_field(u32 slvid, u32 reg, u32 val, u32 mask, u32 shift) { - pmif_arb->write_field(pmif_arb, 0, reg, val, mask, shift); + pmif_arb->write_field(pmif_arb, slvid, reg, val, mask, shift); }
static void mt6315_wdt_enable(u32 slvid) @@ -219,8 +228,8 @@ mt6315_write(slvid, 0x127, 0x8); udelay(50); mt6315_write(slvid, 0x128, 0x8); - mt6315_write(slvid, 0x3A9, 0); mt6315_write(slvid, 0x3A8, 0); + mt6315_write(slvid, 0x3A9, 0); }
static void mt6315_init_setting(void)