mb/google/skywalker: Add API support for regulator VCN18
Add the VNC18 regulator API for the MIPI panel usage. BUG=b:432353024 BRANCH=skywalker TEST=Use an oscilloscope to confirm that the regulator’s output voltage is 1.8V. Change-Id: Ib2065d8b4f92f4ad266976883cb2927107330a69 Signed-off-by: Niklaus Liu <niklaus.liu@mediatek.corp-partner.google.com> Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89172 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
parent
fe70426dd7
commit
1da045f6a5
1 changed files with 10 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ static int get_mt6359p_regulator_id(enum mtk_regulator regulator)
|
|||
return MT6359P_PA;
|
||||
case MTK_REGULATOR_VMC:
|
||||
return MT6359P_SIM1;
|
||||
case MTK_REGULATOR_VCN18:
|
||||
return MT6359P_VCN18;
|
||||
default:
|
||||
return MTK_REGULATOR_INVALID;
|
||||
}
|
||||
|
|
@ -45,6 +47,9 @@ void mainboard_set_regulator_voltage(enum mtk_regulator regulator, uint32_t volt
|
|||
case MT6359P_SIM1:
|
||||
mt6359p_set_vsim1_voltage(voltage_uv);
|
||||
break;
|
||||
case MT6359P_VCN18:
|
||||
mt6359p_set_vcn18_voltage(voltage_uv);
|
||||
break;
|
||||
default:
|
||||
printk(BIOS_ERR, "%s: Regulator ID %d: not supported\n", __func__, regulator);
|
||||
break;
|
||||
|
|
@ -70,6 +75,8 @@ uint32_t mainboard_get_regulator_voltage(enum mtk_regulator regulator)
|
|||
return mt6359p_buck_get_voltage(MT6359P_PA);
|
||||
case MT6359P_SIM1:
|
||||
return mt6359p_get_vsim1_voltage();
|
||||
case MT6359P_VCN18:
|
||||
return mt6359p_get_vcn18_voltage();
|
||||
default:
|
||||
printk(BIOS_ERR, "%s: Regulator ID %d: not supported\n", __func__, regulator);
|
||||
return 0;
|
||||
|
|
@ -93,6 +100,9 @@ int mainboard_enable_regulator(enum mtk_regulator regulator, bool enable)
|
|||
case MT6359P_SIM1:
|
||||
mt6359p_enable_vsim1(enable);
|
||||
break;
|
||||
case MT6359P_VCN18:
|
||||
mt6359p_enable_vcn18(enable);
|
||||
break;
|
||||
default:
|
||||
printk(BIOS_ERR, "%s: Regulator ID %d: not supported\n", __func__, regulator);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue