From 1da045f6a557696160b3685464f2bfdd50f86277 Mon Sep 17 00:00:00 2001 From: Vince Liu Date: Mon, 15 Sep 2025 10:51:28 +0800 Subject: [PATCH] mb/google/skywalker: Add API support for regulator VCN18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Vince Liu Reviewed-on: https://review.coreboot.org/c/coreboot/+/89172 Reviewed-by: Paul Menzel Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- src/mainboard/google/skywalker/regulator.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mainboard/google/skywalker/regulator.c b/src/mainboard/google/skywalker/regulator.c index 46d0e2b8a2..63d17afac0 100644 --- a/src/mainboard/google/skywalker/regulator.c +++ b/src/mainboard/google/skywalker/regulator.c @@ -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;