summaryrefslogtreecommitdiff
path: root/baseboard/honeybuns
diff options
context:
space:
mode:
Diffstat (limited to 'baseboard/honeybuns')
-rw-r--r--baseboard/honeybuns/baseboard.c16
-rw-r--r--baseboard/honeybuns/usb_pd_policy.c18
2 files changed, 19 insertions, 15 deletions
diff --git a/baseboard/honeybuns/baseboard.c b/baseboard/honeybuns/baseboard.c
index df56697fbf..e7df1b6ef4 100644
--- a/baseboard/honeybuns/baseboard.c
+++ b/baseboard/honeybuns/baseboard.c
@@ -89,8 +89,20 @@ __maybe_unused static void board_power_sequence(int enable)
/******************************************************************************/
/* I2C port map configuration */
const struct i2c_port_t i2c_ports[] = {
- {"i2c1", I2C_PORT_I2C1, 400, GPIO_EC_I2C1_SCL, GPIO_EC_I2C1_SDA},
- {"i2c3", I2C_PORT_I2C3, 400, GPIO_EC_I2C3_SCL, GPIO_EC_I2C3_SDA},
+ {
+ .name = "i2c1",
+ .port = I2C_PORT_I2C1,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C1_SCL,
+ .sda = GPIO_EC_I2C1_SDA
+ },
+ {
+ .name = "i2c3",
+ .port = I2C_PORT_I2C3,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C3_SCL,
+ .sda = GPIO_EC_I2C3_SDA
+ },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
diff --git a/baseboard/honeybuns/usb_pd_policy.c b/baseboard/honeybuns/usb_pd_policy.c
index ef2350a03d..faaef9083f 100644
--- a/baseboard/honeybuns/usb_pd_policy.c
+++ b/baseboard/honeybuns/usb_pd_policy.c
@@ -369,20 +369,16 @@ static void usb_tc_connect(void)
{
int port = TASK_ID_TO_PD_PORT(task_get_current());
+ /* Clear data role swap attempt counter at each usbc attach */
+ pd_dr_swap_attempt_count[port] = 0;
+
/*
* The EC needs to indicate to the USB hub when the host port is
* attached so that the USB-EP can be properly enumerated. GPIO_BPWR_DET
* is used for this purpose.
*/
- if (port == USB_PD_PORT_HOST) {
+ if (port == USB_PD_PORT_HOST)
gpio_set_level(GPIO_BPWR_DET, 1);
-#ifdef GPIO_UFP_PLUG_DET
- gpio_set_level(GPIO_UFP_PLUG_DET, 0);
-#endif
- }
-
- /* Clear data role swap attempt counter at each usbc attach */
- pd_dr_swap_attempt_count[port] = 0;
}
DECLARE_HOOK(HOOK_USB_PD_CONNECT, usb_tc_connect, HOOK_PRIO_DEFAULT);
@@ -391,12 +387,8 @@ static void usb_tc_disconnect(void)
int port = TASK_ID_TO_PD_PORT(task_get_current());
/* Only the host port disconnect is relevant */
- if (port == USB_PD_PORT_HOST) {
+ if (port == USB_PD_PORT_HOST)
gpio_set_level(GPIO_BPWR_DET, 0);
-#ifdef GPIO_UFP_PLUG_DET
- gpio_set_level(GPIO_UFP_PLUG_DET, 1);
-#endif
- }
}
DECLARE_HOOK(HOOK_USB_PD_DISCONNECT, usb_tc_disconnect, HOOK_PRIO_DEFAULT);