Created
September 13, 2015 13:42
-
-
Save ssvb/5fd69fec598ef8d526d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig | |
index ee219f8..f826a51 100644 | |
--- a/configs/A10-OLinuXino-Lime_defconfig | |
+++ b/configs/A10-OLinuXino-Lime_defconfig | |
@@ -13,3 +13,7 @@ CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)" | |
# CONFIG_CMD_FLASH is not set | |
# CONFIG_CMD_FPGA is not set | |
CONFIG_USB_EHCI_HCD=y | |
+CONFIG_USB0_VBUS_PIN="PB9" | |
+CONFIG_USB0_ID_DET="PH4" | |
+CONFIG_USB0_VBUS_DET="PH5" | |
+CONFIG_USB_MUSB_HOST=y | |
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c | |
index a146c08..fe9d0f2 100644 | |
--- a/drivers/usb/musb-new/sunxi.c | |
+++ b/drivers/usb/musb-new/sunxi.c | |
@@ -209,6 +209,8 @@ static int sunxi_musb_enable(struct musb *musb) | |
if (is_host_enabled(musb)) { | |
int id = sunxi_usb_phy_id_detect(0); | |
+ printf("id_det=%d\n", id); | |
+ printf("vbus_det=%d\n", sunxi_usb_phy_vbus_detect(0)); | |
if (id == 1 && sunxi_usb_phy_power_is_on(0)) | |
sunxi_usb_phy_power_off(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment