summaryrefslogtreecommitdiff
path: root/zephyr/projects/guybrush/power_signals.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /zephyr/projects/guybrush/power_signals.c
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14526.57.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'zephyr/projects/guybrush/power_signals.c')
-rw-r--r--zephyr/projects/guybrush/power_signals.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/zephyr/projects/guybrush/power_signals.c b/zephyr/projects/guybrush/power_signals.c
deleted file mode 100644
index 7d5781d0cb..0000000000
--- a/zephyr/projects/guybrush/power_signals.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "chipset.h"
-#include "config.h"
-#include "gpio.h"
-#include "power.h"
-#include "timer.h"
-
-/* Wake Sources */
-const enum gpio_signal hibernate_wake_pins[] = {
- GPIO_LID_OPEN,
- GPIO_AC_PRESENT,
- GPIO_POWER_BUTTON_L,
-};
-const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
-
-/* Power Signal Input List */
-const struct power_signal_info power_signal_list[] = {
- [X86_SLP_S0_N] = {
- .gpio = GPIO_PCH_SLP_S0_L,
- .flags = POWER_SIGNAL_ACTIVE_HIGH,
- .name = "SLP_S0_DEASSERTED",
- },
- [X86_SLP_S3_N] = {
- .gpio = GPIO_PCH_SLP_S3_L,
- .flags = POWER_SIGNAL_ACTIVE_HIGH,
- .name = "SLP_S3_DEASSERTED",
- },
- [X86_SLP_S5_N] = {
- .gpio = GPIO_PCH_SLP_S5_L,
- .flags = POWER_SIGNAL_ACTIVE_HIGH,
- .name = "SLP_S5_DEASSERTED",
- },
- [X86_S0_PGOOD] = {
- .gpio = GPIO_S0_PGOOD,
- .flags = POWER_SIGNAL_ACTIVE_HIGH,
- .name = "S0_PGOOD",
- },
- [X86_S5_PGOOD] = {
- .gpio = GPIO_S5_PGOOD,
- .flags = POWER_SIGNAL_ACTIVE_HIGH,
- .name = "S5_PGOOD",
- },
-};
-BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
-
-/**
- * b/175324615: On G3->S5, wait for RSMRST_L to be deasserted before asserting
- * PCH_PWRBTN_L.
- */
-void board_pwrbtn_to_pch(int level)
-{
- timestamp_t start;
- const uint32_t timeout_rsmrst_rise_us = 30 * MSEC;
-
- /* Add delay for G3 exit if asserting PWRBTN_L and RSMRST_L is low. */
- if (!level && !gpio_get_level(GPIO_PCH_RSMRST_L)) {
- start = get_time();
- do {
- usleep(200);
- if (gpio_get_level(GPIO_PCH_RSMRST_L))
- break;
- } while (time_since32(start) < timeout_rsmrst_rise_us);
-
- if (!gpio_get_level(GPIO_PCH_RSMRST_L))
- ccprints("Error pwrbtn: RSMRST_L still low");
-
- msleep(16);
- }
- gpio_set_level(GPIO_PCH_PWRBTN_L, level);
-}
-
-void baseboard_en_pwr_pcore_s0(enum gpio_signal signal)
-{
-
- /* EC must AND signals PG_LPDDR4X_S3_OD and PG_GROUPC_S0_OD */
- gpio_set_level(GPIO_EN_PWR_PCORE_S0_R,
- gpio_get_level(GPIO_PG_LPDDR4X_S3_OD) &&
- gpio_get_level(GPIO_PG_GROUPC_S0_OD));
-}
-
-void baseboard_en_pwr_s0(enum gpio_signal signal)
-{
-
- /* EC must AND signals SLP_S3_L and PG_PWR_S5 */
- gpio_set_level(GPIO_EN_PWR_S0_R,
- gpio_get_level(GPIO_PCH_SLP_S3_L) &&
- gpio_get_level(GPIO_S5_PGOOD));
-
- /* Now chain off to the normal power signal interrupt handler. */
- power_signal_interrupt(signal);
-}