diff options
author | James Lo <james.lo@mediatek.corp-partner.google.com> | 2021-08-04 14:17:16 +0800 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2021-08-09 01:53:00 +0000 |
commit | 55c98c368c1df269e0c4c62250848089df612032 (patch) | |
tree | afc962ed6ad7a9aa4d2536f7085646035d20df30 /src/soc/mediatek | |
parent | ca33b74acf17574011b42edab8dc7c441f9cddf2 (diff) |
soc/mediatek/common: add mt6359p vcore support
Add mt6359p vcore set/get support.
To adjust frequency of little core, we need to adjust voltage of vcore.
Signed-off-by: James Lo <james.lo@mediatek.corp-partner.google.com>
Change-Id: Ibf49390ba78870b834c6d0b64e3f0f30f3494f18
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r-- | src/soc/mediatek/common/include/soc/mt6359p.h | 3 | ||||
-rw-r--r-- | src/soc/mediatek/common/mt6359p.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/mediatek/common/include/soc/mt6359p.h b/src/soc/mediatek/common/include/soc/mt6359p.h index 996d2e86d9..5afac9f47a 100644 --- a/src/soc/mediatek/common/include/soc/mt6359p.h +++ b/src/soc/mediatek/common/include/soc/mt6359p.h @@ -18,6 +18,8 @@ enum { PMIC_OTP_CON12 = 0x03a2, PMIC_OTP_CON13 = 0x03a4, PMIC_PWRHOLD = 0x0a08, + PMIC_VCORE_DBG0 = 0x1526, + PMIC_VCORE_ELR0 = 0x152c, PMIC_VGPU11_DBG0 = 0x15a6, PMIC_VGPU11_ELR0 = 0x15b4, PMIC_VS2_VOTER = 0x18aa, @@ -50,6 +52,7 @@ enum { MT6359P_GPU11 = 0, MT6359P_SRAM_PROC1, MT6359P_SRAM_PROC2, + MT6359P_CORE, MT6359P_MAX, }; diff --git a/src/soc/mediatek/common/mt6359p.c b/src/soc/mediatek/common/mt6359p.c index 8ebcfc6458..5a87c0d8e1 100644 --- a/src/soc/mediatek/common/mt6359p.c +++ b/src/soc/mediatek/common/mt6359p.c @@ -177,6 +177,10 @@ void mt6359p_buck_set_voltage(u32 buck_id, u32 buck_uv) vol_offset = 500000; vol_reg = PMIC_VSRAM_PROC2_ELR; break; + case MT6359P_CORE: + vol_offset = 506250; + vol_reg = PMIC_VCORE_ELR0; + break; default: die("ERROR: Unknown buck_id %u", buck_id); return; @@ -209,6 +213,11 @@ u32 mt6359p_buck_get_voltage(u32 buck_id) vol_offset = 500000; vol_reg = PMIC_VSRAM_PROC2_VOSEL1; break; + case MT6359P_CORE: + vol_shift = 0; + vol_offset = 506250; + vol_reg = PMIC_VCORE_DBG0; + break; default: die("ERROR: Unknown buck_id %u", buck_id); return 0; |