diff options
Diffstat (limited to 'board/kohaku/board.c')
-rw-r--r-- | board/kohaku/board.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/board/kohaku/board.c b/board/kohaku/board.c index db5d3d3399..d14a327655 100644 --- a/board/kohaku/board.c +++ b/board/kohaku/board.c @@ -14,6 +14,8 @@ #include "driver/accelgyro_bmi160.h" #include "driver/als_opt3001.h" #include "driver/ppc/sn5s330.h" +#include "driver/tcpm/ps8xxx.h" +#include "driver/tcpm/tcpci.h" #include "ec_commands.h" #include "extpower.h" #include "fan.h" @@ -115,6 +117,34 @@ const struct pwm_t pwm_channels[] = { BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); /******************************************************************************/ +/* USB-C TPCP Configuration */ +const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = { + [USB_PD_PORT_TCPC_0] = { + .i2c_host_port = I2C_PORT_TCPC0, + .i2c_slave_addr = PS8751_I2C_ADDR1, + .drv = &ps8xxx_tcpm_drv, + .flags = 0, + }, + [USB_PD_PORT_TCPC_1] = { + .i2c_host_port = I2C_PORT_TCPC1, + .i2c_slave_addr = PS8751_I2C_ADDR1, + .drv = &ps8xxx_tcpm_drv, + .flags = 0, + }, +}; + +struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { + [USB_PD_PORT_TCPC_0] = { + .driver = &tcpci_tcpm_usb_mux_driver, + .hpd_update = &ps8xxx_tcpc_update_hpd_status, + }, + [USB_PD_PORT_TCPC_1] = { + .driver = &tcpci_tcpm_usb_mux_driver, + .hpd_update = &ps8xxx_tcpc_update_hpd_status, + } +}; + +/******************************************************************************/ /* Sensors */ /* Base Sensor mutex */ static struct mutex g_base_mutex; |