diff options
Diffstat (limited to 'board/ryu/board.c')
-rw-r--r-- | board/ryu/board.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c index a5b5346e93..a9792ed8ed 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -320,16 +320,6 @@ static void board_init(void) /* Enable interrupts on VBUS transitions. */ gpio_enable_interrupt(GPIO_CHGR_ACOK); - - /* - * TODO(crosbug.com/p/38689) Workaround for PMIC issue on P5. - * remove when P5 are de-commissioned. - * We are re-using EXTINT1 for the new power sequencing workaround - * this is killing the base closing detection on P5 - * we won't charge it. - */ - if (board_get_version() == 5) - gpio_enable_interrupt(GPIO_HPD_IN); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); @@ -340,16 +330,6 @@ const struct power_signal_info power_signal_list[] = { }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); -/* - * TODO(crosbug.com/p/38689) Workaround for MAX77620 PMIC EN_PP3300 issue. - * remove when P5 are de-commissioned. - */ -void pp1800_on_off_evt(enum gpio_signal signal) -{ - int level = gpio_get_level(signal); - gpio_set_level(GPIO_EN_PP3300_RSVD, level); -} - /* ADC channels */ const struct adc_t adc_channels[] = { /* Vbus sensing. Converted to mV, /10 voltage divider. */ @@ -439,6 +419,21 @@ int board_get_usb_mux(int port, const char **dp_str, const char **usb_str) return has_dp || has_usb; } +void board_flip_usb_mux(int port) +{ + int has_usb, has_dp, polarity; + enum typec_mux mux; + + has_usb = gpio_get_level(GPIO_USBC_MUX_CONF2); + has_dp = gpio_get_level(GPIO_USBC_MUX_CONF1); + polarity = gpio_get_level(GPIO_USBC_MUX_CONF0); + mux = has_usb && has_dp ? TYPEC_MUX_DOCK : + (has_dp ? TYPEC_MUX_DP : + (has_usb ? TYPEC_MUX_USB : TYPEC_MUX_NONE)); + + board_set_usb_mux(port, mux, usb_switch_state, !polarity); +} + /** * Discharge battery when on AC power for factory test. */ @@ -511,6 +506,12 @@ void board_set_charge_limit(int charge_ma) CPRINTS("Failed to set input current limit for PD"); } +/* Send host event up to AP */ +void pd_send_host_event(int mask) +{ + /* TODO(crosbug.com/p/33194): implement host events */ +} + /** * Enable and disable SPI for case closed debugging. This forces the AP into * reset while SPI is enabled, thus preventing contention on the SPI interface. |