diff options
author | Divya Sasidharan <divya.s.sasidharan@intel.com> | 2017-05-09 17:19:44 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-21 22:03:53 -0700 |
commit | 577a7418553ab2f6198c422f33fd64907506e11a (patch) | |
tree | c344bfa446394f00e4bfa28af3a7fe1ce46d8b39 /board/glkrvp/chg_usb_pd.c | |
parent | 59ce941927d5ccf332498e4326560e46095ca0e3 (diff) | |
download | chrome-ec-577a7418553ab2f6198c422f33fd64907506e11a.tar.gz |
glkrvp: Enable USB MUX PS8743 driver
Add Parade PS8743 USB Type-C Redriving Switch for USB Host /
DisplayPort.
BUG=b:64598680
BRANCH=glkrvp
TEST=On glkrvp,
Connect Apple dongle and verify mux setting with i2c read.
1. i2cxfer r 1 0x20 0 -> 0x50 (DP/USB enabled)
2. flip i2cxfer r 1 0x20 0 -> 0x54 (Flip bit enabled)
Connect pluggable and verify the same.
Similar testing was successful on second type-c port.
Change-Id: I96ec380024eb659e071b019dd58b3c640fa1cc03
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/616075
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/glkrvp/chg_usb_pd.c')
-rw-r--r-- | board/glkrvp/chg_usb_pd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/board/glkrvp/chg_usb_pd.c b/board/glkrvp/chg_usb_pd.c index fd972fd76b..097b7ee1be 100644 --- a/board/glkrvp/chg_usb_pd.c +++ b/board/glkrvp/chg_usb_pd.c @@ -10,6 +10,7 @@ #include "task.h" #include "tcpci.h" #include "system.h" +#include "usb_mux.h" #include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args) @@ -29,6 +30,22 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = { }; BUILD_ASSERT(ARRAY_SIZE(tcpc_config) == CONFIG_USB_PD_PORT_COUNT); +struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { + { + .port_addr = 0x20, + .driver = &ps874x_usb_mux_driver, + }, + { + .port_addr = 0x22, + .driver = &ps874x_usb_mux_driver, + }, +}; + +/* TODO: Implement this function and move to appropriate file */ +void usb_charger_set_switches(int port, enum usb_switch setting) +{ +} + static int board_charger_port_is_sourcing_vbus(int port) { int reg; |