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>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user