summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2019-03-14 14:49:36 -0600
committerDiana Z <dzigterman@chromium.org>2019-03-20 22:48:57 +0000
commit6e4fcc3c4f840df5ec295656737752d8c66253e6 (patch)
treed6a4ea892252bb7caffbb349c8a77db221f8dd40
parentf5e3d45ffc068ef5dcb2d5c265d292b60aab9514 (diff)
downloadchrome-ec-6e4fcc3c4f840df5ec295656737752d8c66253e6.tar.gz
Fleex: Remove support for board version 0
At this point, support can be removed for board version 0. This leaves the board code cleaner and provides a better starting point for any follower projects. BUG=b:128413812 BRANCH=octopus TEST=builds Change-Id: Ibdf9cdea5ef930ae3ff566679e5ecff9c9c78959 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1525065 Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--board/fleex/board.c30
-rw-r--r--board/fleex/gpio.inc6
2 files changed, 1 insertions, 35 deletions
diff --git a/board/fleex/board.c b/board/fleex/board.c
index 8026c1c007..d76c1e5dd6 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -250,36 +250,6 @@ void lid_angle_peripheral_enable(int enable)
}
#endif
-/*
- * Set gpio flags based on board ID, can be removed when proto is no longer
- * supported
- */
-static void update_gpios_from_board_id(void)
-{
- uint32_t board_id = 0;
-
- /* Errors will count as board_id 0 */
- cbi_get_board_version(&board_id);
-
- if (board_id == 0) {
- /*
- * USB2_OTG_ID is a 1.8V pin on the SoC side with an internal
- * pull-up. However, it is 3.3V on the EC side. So, configure
- * it as ODR so that the EC never drives it high.
- */
- gpio_set_flags(GPIO_USB_C0_PD_RST, GPIO_ODR_LOW);
- } else {
- int flags = GPIO_OUTPUT;
-
- if (!system_is_reboot_warm() && !system_jumped_to_this_image())
- flags |= GPIO_LOW;
-
- gpio_set_flags(GPIO_USB_C0_PD_RST, flags);
- }
-}
-
-DECLARE_HOOK(HOOK_INIT, update_gpios_from_board_id, HOOK_PRIO_INIT_I2C + 1);
-
void board_overcurrent_event(int port, int is_overcurrented)
{
/* Sanity check the port. */
diff --git a/board/fleex/gpio.inc b/board/fleex/gpio.inc
index 41488ad974..6993acd251 100644
--- a/board/fleex/gpio.inc
+++ b/board/fleex/gpio.inc
@@ -116,11 +116,7 @@ GPIO(EN_USB_A0_5V, PIN(6, 7), GPIO_OUT_LOW) /* Enable A0 5V Charging */
GPIO(EN_USB_A1_5V, PIN(9, 6), GPIO_OUT_LOW) /* Enable A1 5V Charging */
GPIO(USB_A0_CHARGE_EN_L, PIN(A, 2), GPIO_OUT_HIGH) /* Enable A0 1.5A Charging */
GPIO(USB_A1_CHARGE_EN_L, PIN(A, 0), GPIO_OUT_HIGH) /* Enable A1 1.5A Charging */
-/*
- * Proto USB2_OTG_ID pin
- * Configure as default since on proto boards this pin should not be driven high
- */
-GPIO(USB_C0_PD_RST, PIN(8, 3), GPIO_DEFAULT) /* C0 PD Reset */
+GPIO(USB_C0_PD_RST, PIN(8, 3), GPIO_OUT_LOW) /* C0 PD Reset */
GPIO(USB_C0_BC12_VBUS_ON, PIN(6, 3), GPIO_OUT_LOW) /* C0 BC1.2 Power */
GPIO(USB_C0_BC12_CHG_DET_L, PIN(9, 5), GPIO_INPUT) /* C0 BC1.2 Detect */
GPIO(USB_C0_HPD_1V8_ODL, PIN(C, 5), GPIO_INPUT | /* C0 DP Hotplug Detect */