diff options
author | Keith Short <keithshort@chromium.org> | 2020-04-06 16:19:04 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-08 01:34:58 +0000 |
commit | d8f977f6d02a1af6030e3d5d8856e3630328378d (patch) | |
tree | e001b05fdeca6ef8047022cdf6270ad1c712c0b1 /baseboard/volteer/baseboard.c | |
parent | c96784a79877fe332ddafffa51682fff105f56f9 (diff) | |
download | chrome-ec-d8f977f6d02a1af6030e3d5d8856e3630328378d.tar.gz |
volteer: Move GPIO runtime configuration from baseboard
Other boards in the Volteer board family will not use the same
definitions for the CBI board version field. Move this code from the
volteer baseboard to the volteer board files.
BUG=b:153367561
BRANCH=none
TEST=make buildall
TEST=verify GPIOs on Volteer boards with board version=0 and board
version=1
Change-Id: I4c3afe6929ffaa52ccc3ec0678f2b1abd5478c16
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2138146
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'baseboard/volteer/baseboard.c')
-rw-r--r-- | baseboard/volteer/baseboard.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index decd445d1e..144d26b57c 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -474,7 +474,7 @@ void ppc_interrupt(enum gpio_signal signal) /******************************************************************************/ /* TCPC support routines */ -static enum gpio_signal ps8xxx_rst_odl = GPIO_USB_C1_RT_RST_ODL; +enum gpio_signal ps8xxx_rst_odl = GPIO_USB_C1_RT_RST_ODL; static void ps8815_reset(void) { @@ -669,26 +669,6 @@ static void config_db_usb3(void) usb_muxes[USBC_PORT_C1] = mux_config_p1_usb3; } -/* - * Reconfigure Volteer GPIOs based on the board ID - */ -static void config_volteer_gpios(void) -{ - /* Legacy support for the first board build */ - if (get_board_id() == 0) { - CPRINTS("Configuring GPIOs for board ID 0"); - - /* Reassign USB_C1_RT_RST_ODL */ - bb_controls[USBC_PORT_C1].retimer_rst_gpio = - GPIO_USB_C1_RT_RST_ODL_BOARDID_0; - ps8xxx_rst_odl = GPIO_USB_C1_RT_RST_ODL_BOARDID_0; - - /* Reassign EC_VOLUP_BTN_ODL */ - button_reassign_gpio(BUTTON_VOLUME_UP, - GPIO_EC_VOLUP_BTN_ODL_BOARDID_0); - } -} - static uint8_t board_id; uint8_t get_board_id(void) @@ -696,6 +676,10 @@ uint8_t get_board_id(void) return board_id; } +__overridable void config_volteer_gpios(void) +{ +} + /* * Read CBI from i2c eeprom and initialize variables for board variants * |