From 2e7ebc84a64bd9ded1cccb3ebe7bf2c90641a82a Mon Sep 17 00:00:00 2001 From: "amber.chen" Date: Tue, 27 Dec 2022 13:04:37 +0800 Subject: baseboard: enable powered of PP1 and PP2 for port 1 Due to in Treeya360 project add "#undef CONFIG_HIBERNATE_PSL" this configuration, so PPC1 remains powered during hibernate. PPC1 therefore now needs to be configured the same way as PPC0, to mimic the previous dead-battery behavior and allow wake on AC plug. BRANCH=none BUG=b:259211176 TEST=make buildall -j48 Change-Id: Ie353a3f3ca118dd94a2131d8ea62ddf5ee12c470 Signed-off-by: amber.chen Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4119878 Code-Coverage: Zoss Reviewed-by: Edward Hill Reviewed-by: Zhuohao Lee (cherry picked from commit 950c21ed4d0181029653bfebabcbfc990c1757d3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4140778 Reviewed-by: YH Lin Commit-Queue: YH Lin --- baseboard/grunt/baseboard.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c index 2807464230..6c3d0955d6 100644 --- a/baseboard/grunt/baseboard.c +++ b/baseboard/grunt/baseboard.c @@ -821,6 +821,15 @@ void board_hibernate(void) */ ppc_vbus_source_enable(0, 0); ppc_vbus_sink_enable(0, 1); + /* + * PPC1 therefore now needs to be configured the same way as PPC0, + * to mimic the previous dead-battery behavior and allow wake on AC + * plug. + */ + if (!IS_ENABLED(CONFIG_HIBERNATE_PSL)) { + ppc_vbus_source_enable(1, 0); + ppc_vbus_sink_enable(1, 1); + } /* * If CCD not active, set port 0 SBU_EN=0 to avoid power leakage during -- cgit v1.2.1