diff options
-rw-r--r-- | board/nami/gpio.inc | 4 | ||||
-rw-r--r-- | board/nami/usb_pd_policy.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/board/nami/gpio.inc b/board/nami/gpio.inc index a96ea1263c..a1555238c2 100644 --- a/board/nami/gpio.inc +++ b/board/nami/gpio.inc @@ -35,8 +35,6 @@ GPIO_INT(USB_C0_BC12_INT_L, PIN(D, 2), GPIO_INT_FALLING, usb0_evt) GPIO_INT(USB_C1_BC12_INT_L, PIN(D, 3), GPIO_INT_FALLING, usb1_evt) GPIO_INT(ACCELGYRO3_INT_L, PIN(3, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt) GPIO_INT(TABLET_MODE_L, PIN(7, 2), GPIO_INT_BOTH, tablet_mode_isr) -/* Used to wake up system from deep S3. */ -/* GPIO_INT(TP_INT_CONN, PIN(4, 2), GPIO_INT_BOTH, trackpad_connect) dnojiri: Revisit */ /* GPIO_INT(ALS_INT, PIN(3, 2),,) dnojiri: Revisit */ /* GPIO_INT(3AXIS_INT, PIN(9, 5),,) dnojiri: Revisit */ @@ -87,7 +85,7 @@ GPIO(USB_C1_PD_RST, PIN(0, 0), GPIO_OUT_LOW) /* C1 PD Reset */ GPIO(USB_C0_DP_HPD, PIN(9, 4), GPIO_INPUT) /* C0 DP Hotplug Detect */ GPIO(USB_C1_DP_HPD, PIN(A, 5), GPIO_INPUT) /* C1 DP Hotplug Detect */ GPIO(USB_PP3300_USB_PD, PIN(8, 4), GPIO_INPUT) /* Reserved. Currently, has no effect. */ -GPIO(USB2_OTG_ID, PIN(5, 7), GPIO_ODR_LOW) /* OTG ID */ +GPIO(USB2_ID, PIN(4, 2), GPIO_OUT_LOW) /* USB OTG ID */ /* Sensors */ diff --git a/board/nami/usb_pd_policy.c b/board/nami/usb_pd_policy.c index acf63f0e97..295f6f9c60 100644 --- a/board/nami/usb_pd_policy.c +++ b/board/nami/usb_pd_policy.c @@ -162,7 +162,12 @@ int pd_check_vconn_swap(int port) void pd_execute_data_swap(int port, int data_role) { - /* Do nothing */ + /* Only port 0 supports device mode. */ + if (port != 0) + return; + + gpio_set_level(GPIO_USB2_ID, + (data_role == PD_ROLE_UFP) ? 1 : 0); } void pd_check_pr_role(int port, int pr_role, int flags) |