diff options
-rw-r--r-- | board/drobit/board.c | 18 | ||||
-rw-r--r-- | board/drobit/board.h | 1 | ||||
-rw-r--r-- | board/drobit/gpio.inc | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/board/drobit/board.c b/board/drobit/board.c index f54d5b8308..a13ff9bea9 100644 --- a/board/drobit/board.c +++ b/board/drobit/board.c @@ -271,11 +271,13 @@ struct ppc_config_t ppc_chips[] = { [USBC_PORT_C0] = { .i2c_port = I2C_PORT_USB_C0, .i2c_addr_flags = SYV682X_ADDR0_FLAGS, + .frs_en = GPIO_USB_C0_FRS_EN, .drv = &syv682x_drv, }, [USBC_PORT_C1] = { .i2c_port = I2C_PORT_USB_C1, .i2c_addr_flags = SYV682X_ADDR0_FLAGS, + .frs_en = GPIO_USB_C1_FRS_EN, .drv = &syv682x_drv, }, }; @@ -297,6 +299,22 @@ void ppc_interrupt(enum gpio_signal signal) } } +/* Disable FRS on boards with the SYV682A. FRS only works on the SYV682B. */ +void setup_board_ppc(void) +{ + uint8_t board_id = get_board_id(); + + if (board_id < 2) { + ppc_chips[USBC_PORT_C0].frs_en = 0; + ppc_chips[USBC_PORT_C1].frs_en = 0; + } +} + +__override void board_cbi_init(void) +{ + setup_board_ppc(); +} + /******************************************************************************/ /* BC1.2 charger detect configuration */ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { diff --git a/board/drobit/board.h b/board/drobit/board.h index 2f3b023622..faf33faa5c 100644 --- a/board/drobit/board.h +++ b/board/drobit/board.h @@ -81,6 +81,7 @@ /* USBC PPC*/ #define CONFIG_USBC_PPC_SYV682X +#define CONFIG_USB_PD_FRS_PPC /* BC 1.2 */ diff --git a/board/drobit/gpio.inc b/board/drobit/gpio.inc index ce8d9fa613..bc7d625195 100644 --- a/board/drobit/gpio.inc +++ b/board/drobit/gpio.inc @@ -83,6 +83,8 @@ GPIO(USB_C0_RT_RST_ODL, PIN(D, 4), GPIO_ODR_LOW) GPIO(USB_C1_RT_RST_ODL, PIN(8, 3), GPIO_ODR_LOW) GPIO(USB_C0_OC_ODL, PIN(B, 1), GPIO_ODR_HIGH) GPIO(USB_C1_OC_ODL, PIN(5, 0), GPIO_ODR_HIGH) +GPIO(USB_C0_FRS_EN, PIN(6, 0), GPIO_OUT_LOW) +GPIO(USB_C1_FRS_EN, PIN(9, 4), GPIO_OUT_LOW) /* There is currently no need to service this interrupt. */ GPIO(USB_C0_RT_INT_ODL, PIN(F, 2), GPIO_INPUT) GPIO(USB_C1_RT_INT_ODL, PIN(F, 3), GPIO_INPUT) |