From 07767ada20750b2b99c9d279581e8574e6f9c48a Mon Sep 17 00:00:00 2001 From: Wai-Hong Tam Date: Fri, 25 Jun 2021 21:17:14 -0700 Subject: qcom: Move enabling/disabling 3.3V rail to the board level In the next generation, the 3.3V rail is not controlled by EC anymore. Move the control logic to the board level. The 3.3V rail should be enabled before the power on sequence, so use the hook chipset pre-init hook. Disable it on the chipset shutdown complete hook. For Trogdor, do it on the baseboard level. For Herobrine, do it on the board level, Herobrine-NPCX7, only. Herobrine-NPCX9 and other future boards don't need it. BRANCH=None BUG=b:187980397, b:192253134 TEST=Tested the Lazor EC-OS and Zephyr images and booted to AP. TEST=Tested the Herobrine-NPCX7 EC-OS and Zephyr images and booted to AP. Change-Id: I7e025123f8997629b9b0db46e30ea9c716bdbf99 Signed-off-by: Wai-Hong Tam Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2993213 Reviewed-by: Keith Short --- power/qcom.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'power') diff --git a/power/qcom.c b/power/qcom.c index a57f13483e..8fd96cbb54 100644 --- a/power/qcom.c +++ b/power/qcom.c @@ -616,8 +616,7 @@ static void power_off(void) set_system_power(0); } - /* Turn off the 3.3V and 5V rails. */ - gpio_set_level(GPIO_EN_PP3300_A, 0); + /* Turn off the 5V rail. */ #ifdef CONFIG_POWER_PP5000_CONTROL power_5v_enable(task_get_current(), 0); #else /* !defined(CONFIG_POWER_PP5000_CONTROL) */ @@ -659,8 +658,7 @@ static int power_on(void) { int ret; - /* Enable the 3.3V and 5V rail. */ - gpio_set_level(GPIO_EN_PP3300_A, 1); + /* Enable the 5V rail. */ #ifdef CONFIG_POWER_PP5000_CONTROL power_5v_enable(task_get_current(), 1); #else /* !defined(CONFIG_POWER_PP5000_CONTROL) */ -- cgit v1.2.1