diff options
author | Diana Z <dzigterman@chromium.org> | 2018-08-16 12:07:54 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-17 20:39:08 -0700 |
commit | 78edde263c28c58f679008964c1b6dde0cbaca42 (patch) | |
tree | 249d9e76e54655d95795302cc8e8a8fdf831931a | |
parent | b64a23b55d321b3af683119a532b5204908c58b3 (diff) | |
download | chrome-ec-78edde263c28c58f679008964c1b6dde0cbaca42.tar.gz |
bobba: update EC GPIOs for Bobba EVT
- added volume button inputs to bobba's GPIO interrupts
- removed USB_OTG pin from the baseboard code since it is unused
- changed USB_OTG to USB_C0_PD_RST
- added CAM_SOC_EC_SYNC as input for now
Since most of the bobba protos use yorp firmware, it seems unlikely we
will need to support the proto boards with this change.
BRANCH=None
BUG=b:112354316
TEST=builds
Change-Id: I5a05a55ae731a6cdf293e93535c9256e5eb67520
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1178480
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | baseboard/octopus/usb_pd_policy.c | 4 | ||||
-rw-r--r-- | board/bobba/board.c | 1 | ||||
-rw-r--r-- | board/bobba/board.h | 4 | ||||
-rw-r--r-- | board/bobba/gpio.inc | 19 |
4 files changed, 14 insertions, 14 deletions
diff --git a/baseboard/octopus/usb_pd_policy.c b/baseboard/octopus/usb_pd_policy.c index 0078a027cd..4c30f5967b 100644 --- a/baseboard/octopus/usb_pd_policy.c +++ b/baseboard/octopus/usb_pd_policy.c @@ -105,9 +105,7 @@ int pd_check_vconn_swap(int port) void pd_execute_data_swap(int port, int data_role) { - /* On Octopus, only the first port can act as OTG */ - if (port == 0) - gpio_set_level(GPIO_USB2_OTG_ID, (data_role == PD_ROLE_UFP)); + /* Do nothing - functionality moved to the AP for octopus */ } int pd_is_valid_input_voltage(int mv) diff --git a/board/bobba/board.c b/board/bobba/board.c index 5754848cc8..7525cfefb8 100644 --- a/board/bobba/board.c +++ b/board/bobba/board.c @@ -8,6 +8,7 @@ #include "adc.h" #include "adc_chip.h" #include "battery.h" +#include "button.h" #include "charge_manager.h" #include "charge_state.h" #include "common.h" diff --git a/board/bobba/board.h b/board/bobba/board.h index 40cc2e48ee..fdc401b7ff 100644 --- a/board/bobba/board.h +++ b/board/bobba/board.h @@ -29,6 +29,10 @@ /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) +#define CONFIG_VOLUME_BUTTONS +#define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL +#define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL + #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_UPDATE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL diff --git a/board/bobba/gpio.inc b/board/bobba/gpio.inc index 0a7229036c..551b231648 100644 --- a/board/bobba/gpio.inc +++ b/board/bobba/gpio.inc @@ -32,8 +32,10 @@ GPIO_INT(RSMRST_L_PGOOD, PIN(E, 2), GPIO_INT_BOTH, power_signal_interrupt) /* PM GPIO_INT(ALL_SYS_PGOOD, PIN(F, 4), GPIO_INT_BOTH, power_signal_interrupt) /* PMIC_EC_PWROK_OD */ /* Other interrupts */ -GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) /* EC_WP_ODL */ -GPIO_INT(TABLET_MODE_L, PIN(8, 6), GPIO_INT_BOTH, tablet_mode_isr) +GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) /* EC_WP_ODL */ +GPIO_INT(TABLET_MODE_L, PIN(8, 6), GPIO_INT_BOTH, tablet_mode_isr) +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(7, 5), GPIO_INT_BOTH, button_interrupt) +GPIO_INT(EC_VOLDN_BTN_ODL, PIN(4, 0), GPIO_INT_BOTH, button_interrupt) GPIO_INT(BASE_SIXAXIS_INT_L, PIN(5, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, lsm6dsm_interrupt) GPIO(LID_ACCEL_INT_L, PIN(5, 0), GPIO_INPUT | GPIO_SEL_1P8V) @@ -48,10 +50,8 @@ GPIO(PCH_SLP_S0_L, PIN(A, 4), GPIO_INPUT) /* SLP_S0_L */ * only for debugging purposes. */ GPIO(PLT_RST_L, PIN(C, 7), GPIO_INPUT) /* Platform Reset from SoC */ -/* Must be GPIO_DEFAULT since pin is changed based on board version */ GPIO(SYS_RESET_L, PIN(3, 4), GPIO_ODR_HIGH) /* SYS_RST_ODL */ -/* Must be GPIO_DEFAULT since pin is changed based on board version */ GPIO(ENTERING_RW, PIN(E, 1), GPIO_OUT_LOW) /* EC_ENTERING_RW */ GPIO(PCH_WAKE_L, PIN(7, 4), GPIO_ODR_HIGH) /* EC_PCH_WAKE_ODL */ GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* EC_PCH_PWR_BTN_ODL */ @@ -99,6 +99,8 @@ 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 */ +/* TODO(b/112756630): octopus: add reset logic for C0 TCPC */ +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 */ @@ -108,12 +110,6 @@ GPIO(USB_C1_BC12_VBUS_ON, PIN(B, 1), GPIO_OUT_LOW) /* C1 BC1.2 Power */ GPIO(USB_C1_BC12_CHG_DET_L, PIN(E, 4), GPIO_INPUT) /* C1 BC1.2 Detect */ GPIO(USB_C1_HPD_1V8_ODL, PIN(C, 6), GPIO_INPUT | /* C1 DP Hotplug Detect */ GPIO_SEL_1P8V) -/* - * USB2_OTG_ID is 1.8V pin on the SoC side with an internal pull-up. However, it - * 3.3V on the EC side. So, configure it as ODR so that the EC never drives it - * high. - */ -GPIO(USB2_OTG_ID, PIN(8, 3), GPIO_ODR_LOW) /* OTG ID */ /* LED */ GPIO(BAT_LED_ORANGE_L, PIN(C, 3), GPIO_OUT_HIGH) /* LED_1_L */ @@ -124,7 +120,8 @@ GPIO(LED_3_L, PIN(D, 7), GPIO_OUT_HIGH) GPIO(KB_BL_PWR_EN, PIN(6, 2), GPIO_OUT_LOW) /* Camera */ -GPIO(WFCAM_VSYNC, PIN(0, 3), GPIO_INPUT) /* TP only */ +GPIO(WFCAM_VSYNC, PIN(0, 3), GPIO_INPUT) /* TP only */ +GPIO(CAM_SOC_EC_SYNC, PIN(9, 4), GPIO_INPUT) /* Keyboard pins */ ALTERNATE(PIN_MASK(3, 0x03), 0, MODULE_KEYBOARD_SCAN, GPIO_INPUT) /* KSI_00-01 */ |