[U-Boot] [PATCH 4/8] usb: host: xhci-rockchip: add support for rk3328

Meng Dongyang daniel.meng at rock-chips.com
Wed May 17 10:21:48 UTC 2017


Add the compatible "rockchip,rk3328-xhci" in match table
for rk3328 to probe xhci controller. Turn off vbus when
usb stop.

Signed-off-by: Meng Dongyang <daniel.meng at rock-chips.com>
---
 drivers/usb/host/xhci-rockchip.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/xhci-rockchip.c b/drivers/usb/host/xhci-rockchip.c
index f559830..8db92cb 100644
--- a/drivers/usb/host/xhci-rockchip.c
+++ b/drivers/usb/host/xhci-rockchip.c
@@ -168,6 +168,7 @@ static int xhci_usb_probe(struct udevice *dev)
 
 static int xhci_usb_remove(struct udevice *dev)
 {
+	struct rockchip_xhci_platdata *plat = dev_get_platdata(dev);
 	struct rockchip_xhci *ctx = dev_get_priv(dev);
 	int ret;
 
@@ -178,11 +179,15 @@ static int xhci_usb_remove(struct udevice *dev)
 	if (ret)
 		return ret;
 
+	if (dm_gpio_is_valid(&plat->vbus_gpio))
+		dm_gpio_set_value(&plat->vbus_gpio, 0);
+
 	return 0;
 }
 
 static const struct udevice_id xhci_usb_ids[] = {
 	{ .compatible = "rockchip,rk3399-xhci" },
+	{ .compatible = "rockchip,rk3328-xhci" },
 	{ }
 };
 
@@ -202,6 +207,7 @@ U_BOOT_DRIVER(usb_xhci) = {
 
 static const struct udevice_id usb_phy_ids[] = {
 	{ .compatible = "rockchip,rk3399-usb3-phy" },
+	{ .compatible = "rockchip,rk3328-usb3-phy" },
 	{ }
 };
 
-- 
1.9.1




More information about the U-Boot mailing list