]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/musb-new/sunxi.c
sunxi: musb: Add id pin support
[karo-tx-uboot.git] / drivers / usb / musb-new / sunxi.c
index ee018c7e6e76751248962430f54bf8bec59b8d80..cafb48039e3a6a5aa0f40996591f10dd4b2faa0c 100644 (file)
@@ -217,6 +217,11 @@ static int sunxi_musb_enable(struct musb *musb)
                        printf("A charger is plugged into the OTG: ");
                        return -ENODEV;
                }
+               ret = sunxi_usb_phy_id_detect(0);
+               if (ret == 1) {
+                       printf("No host cable detected: ");
+                       return -ENODEV;
+               }
                sunxi_usb_phy_power_on(0); /* port power on */
        }