summaryrefslogtreecommitdiff
path: root/board/brask/usbc_config.c
diff options
context:
space:
mode:
authorZhuohao Lee <zhuohao@chromium.org>2021-08-24 17:24:25 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-25 06:11:06 +0000
commit418cc5cbb9bede43fbe8213a518b9faf3c2b9dc0 (patch)
tree785231d7f894504530fa09317608e72dab5d51cc /board/brask/usbc_config.c
parentdbcffbcfac595c694744bd888c4d5e5d9f269a68 (diff)
downloadchrome-ec-418cc5cbb9bede43fbe8213a518b9faf3c2b9dc0.tar.gz
brask: remove unnecessary configuration
This patch removes the configuration for the battery, charger, fan control, board id, keyboard, keyboard backlight, sensor, hibernate and led. In order to make the build pass, the CONFIG_ADC, CONFIG_POWER_BUTTON_IGNORE_LID and CONFIG_POWER_BUTTON_INIT_IDLE are added to the board.h/baseboard.h. In additional, the function board_set_active_charge_port() and board_set_charge_limit() are added to the board.c to avoid build error. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: I15c01820dbd2f58f5722c87de51ebf425ffca13a Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114497 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/brask/usbc_config.c')
-rw-r--r--board/brask/usbc_config.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/board/brask/usbc_config.c b/board/brask/usbc_config.c
index 40476c3f4f..a89e06e7b6 100644
--- a/board/brask/usbc_config.c
+++ b/board/brask/usbc_config.c
@@ -216,15 +216,9 @@ __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable)
enum ioex_signal rst_signal;
if (me->usb_port == USBC_PORT_C0) {
- if (get_board_id() == 1)
- rst_signal = IOEX_ID_1_USB_C0_RT_RST_ODL;
- else
- rst_signal = IOEX_USB_C0_RT_RST_ODL;
+ rst_signal = IOEX_USB_C0_RT_RST_ODL;
} else if (me->usb_port == USBC_PORT_C2) {
- if (get_board_id() == 1)
- rst_signal = IOEX_ID_1_USB_C2_RT_RST_ODL;
- else
- rst_signal = IOEX_USB_C2_RT_RST_ODL;
+ rst_signal = IOEX_USB_C2_RT_RST_ODL;
} else {
return EC_ERROR_INVAL;
}
@@ -247,20 +241,6 @@ __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable)
* which powers I2C controller within retimer
*/
msleep(1);
- if (get_board_id() == 1) {
- int val;
-
- /*
- * Check if we were able to deassert
- * reset. Board ID 1 uses a GPIO that is
- * uncontrollable when a debug accessory is
- * connected.
- */
- if (ioex_get_level(rst_signal, &val) != EC_SUCCESS)
- return EC_ERROR_UNKNOWN;
- if (val != 1)
- return EC_ERROR_NOT_POWERED;
- }
} else {
ioex_set_level(rst_signal, 0);
msleep(1);
@@ -286,10 +266,7 @@ void board_reset_pd_mcu(void)
{
enum gpio_signal tcpc_rst;
- if (get_board_id() == 1)
- tcpc_rst = GPIO_ID_1_USB_C0_C2_TCPC_RST_ODL;
- else
- tcpc_rst = GPIO_USB_C0_C2_TCPC_RST_ODL;
+ tcpc_rst = GPIO_USB_C0_C2_TCPC_RST_ODL;
/*
* TODO(b/179648104): figure out correct timing
@@ -335,13 +312,8 @@ static void board_tcpc_init(void)
* C0/C2 TCPC, so they must be set up after the TCPC has
* been taken out of reset.
*/
- if (get_board_id() == 1) {
- enable_ioex(IOEX_ID_1_C0_NCT38XX);
- enable_ioex(IOEX_ID_1_C2_NCT38XX);
- } else {
- enable_ioex(IOEX_C0_NCT38XX);
- enable_ioex(IOEX_C2_NCT38XX);
- }
+ enable_ioex(IOEX_C0_NCT38XX);
+ enable_ioex(IOEX_C2_NCT38XX);
}
/* Enable PPC interrupts. */