Hi to All,

There you are the final patch I have used against kernel 4.5.2 to enable 
'host' only mode on USB OTG on A20-Olinuxino-Lime2-eMMC:
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot
/dts/sun7i-a20-olinuxino-lime2.dts
index d5c796c..d09cebe 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -215,20 +215,6 @@
         allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
     };
 
-    usb0_id_detect_pin: usb0_id_detect_pin@0 {
-        allwinner,pins = "PH4";
-        allwinner,function = "gpio_in";
-        allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-    };
-
-    usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
-        allwinner,pins = "PH5";
-        allwinner,function = "gpio_in";
-        allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-        allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-    };
-
     usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
         allwinner,pins = "PC17";
         allwinner,function = "gpio_out";
@@ -264,15 +250,11 @@
 };
 
 &usb_otg {
-    dr_mode = "otg";
+    dr_mode = "host";
     status = "okay";
 };
 
 &usbphy {
-    pinctrl-names = "default";
-    pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-    usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-    usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
     usb0_vbus-supply = <&reg_usb0_vbus>;
     usb1_vbus-supply = <&reg_usb1_vbus>;
     usb2_vbus-supply = <&reg_usb2_vbus>;

Corresponding boot messages:
[    3.917976] usb_phy_generic.0.auto supply vcc not found, using dummy 
regulator
[    3.918578] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    3.918598] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned 
bus number 5
[    3.918979] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[    3.918993] usb usb5: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[    3.919004] usb usb5: Product: MUSB HDRC host driver
[    3.919013] usb usb5: Manufacturer: Linux 4.5.2-sunxi musb-hcd
[    3.919022] usb usb5: SerialNumber: musb-hdrc.1.auto

And messages after connecting of USB Flash via USB OTG to Host cable:
[ 1356.542871] usb 5-1: new high-speed USB device number 2 using musb-hdrc
[ 1356.684880] usb 5-1: New USB device found, idVendor=090c, idProduct=1000
[ 1356.684917] usb 5-1: New USB device strings: Mfr=1, Product=2, 
SerialNumber=3
[ 1356.684935] usb 5-1: Product: Flash Voyager
[ 1356.684952] usb 5-1: Manufacturer: Corsair
[ 1356.684968] usb 5-1: SerialNumber: AA00000000001460
[ 1356.686555] usb-storage 5-1:1.0: USB Mass Storage device detected
[ 1356.689189] scsi host1: usb-storage 5-1:1.0
[ 1356.755118] usbcore: registered new interface driver uas

Any ideas how to enable full USB OTG functionality?

Best regards
Chris



-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to