diff options
author | Wai-Hong Tam <waihong@google.com> | 2021-06-28 11:32:21 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-14 18:12:40 +0000 |
commit | cd360540f24d2e5eb51f7fafe92ffa6fe71b3811 (patch) | |
tree | a399d269756303fc5be42f68a4cecc8718603068 /board/herobrine_npcx9/switchcap.c | |
parent | 07767ada20750b2b99c9d279581e8574e6f9c48a (diff) | |
download | chrome-ec-cd360540f24d2e5eb51f7fafe92ffa6fe71b3811.tar.gz |
herobrine_npcx9: Initial board commit for NPCX9 variant
This CL copies the herobrine_npcx7 board and changes the chip
config to npcx9m3f.
Remove the CONFIG_FLASH_SIZE_BYTES from the board level as it
is moved to the chip level.
BRANCH=None
BUG=b:192253134
TEST=Built the herobrine_npcx9 image successfully.
Change-Id: Ie970e1be9d863339869563031513af42c979aec5
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2993214
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/herobrine_npcx9/switchcap.c')
-rw-r--r-- | board/herobrine_npcx9/switchcap.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/board/herobrine_npcx9/switchcap.c b/board/herobrine_npcx9/switchcap.c new file mode 100644 index 0000000000..16b0db6ef6 --- /dev/null +++ b/board/herobrine_npcx9/switchcap.c @@ -0,0 +1,22 @@ +/* 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 "gpio.h" +#include "power/qcom.h" + +void board_set_switchcap_power(int enable) +{ + gpio_set_level(GPIO_SWITCHCAP_ON, enable); +} + +int board_is_switchcap_enabled(void) +{ + return gpio_get_level(GPIO_SWITCHCAP_ON); +} + +int board_is_switchcap_power_good(void) +{ + return gpio_get_level(GPIO_SWITCHCAP_PG); +} |