diff options
Diffstat (limited to 'baseboard/hatch/baseboard.c')
-rw-r--r-- | baseboard/hatch/baseboard.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c index 326e1eb036..f1932989f2 100644 --- a/baseboard/hatch/baseboard.c +++ b/baseboard/hatch/baseboard.c @@ -10,6 +10,7 @@ #include "charge_state_v2.h" #include "chipset.h" #include "console.h" +#include "driver/bc12/pi3usb9201.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/ps8xxx.h" @@ -188,6 +189,18 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { } }; +const struct pi3usb2901_config_t pi3usb2901_bc12_chips[] = { + [USB_PD_PORT_TCPC_0] = { + .i2c_port = I2C_PORT_PPC0, + .i2c_addr = PI3USB9201_I2C_ADDR_3, + }, + + [USB_PD_PORT_TCPC_1] = { + .i2c_port = I2C_PORT_TCPC1, + .i2c_addr = PI3USB9201_I2C_ADDR_3, + }, +}; + /* GPIO to enable/disable the USB Type-A port. */ const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = { GPIO_EN_USB_A_5V, @@ -207,6 +220,10 @@ void baseboard_tcpc_init(void) /* Enable HDMI HPD interrupt. */ gpio_enable_interrupt(GPIO_HDMI_CONN_HPD); + + /* Enable BC 1.2 interrupts */ + gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_ODL); + gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_ODL); } DECLARE_HOOK(HOOK_INIT, baseboard_tcpc_init, HOOK_PRIO_INIT_I2C + 1); |