Hi All, I had a similar problem running a mainline 4.11 kernel on an A33 tablet (marked "Q8-2.4G 20140918". It came from a company called Trimeo and is simply called 7". It contains an APX223 power controller, RTL8189ETV WiFi controller, 2x Nanya NT5CB128M15FP-DY DRAM chips (2x256MB), a Hynix H27UCG8T2BTR-BC NAND-flash chip and a Goodix GT818 touch controller. Display resolution is 1024x600). The self-compiled u-boot dtb would initialize the USB, but the kernel dtb would not work. The kernel messages were something along the lines of "[ 9.366994] sun4i-usb-phy 1c19400.phy: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_id_detect_pin@0, deferring probe". I found no way to activate the pinctrl devices, so I fixed this by decompiling the dts, removing all the USB id detect pin and vbus settings and recompiling the dts (diff at end of message). The device boots into LXDE now and I can use an USB keyboard and mouse. I still have no WiFi though...
Pastebin of unpatched dts file: https://pastebin.com/kL6WELuC A couple of questions: - Is there a proper way to make the pinctrls and OTG dual mode work on the device?! I suspect they are needed to activate WiFi too... - Is this a bug I should report for sunxi-next? - Is there a driver for the GT818 in the mainline kernel or a way to make that device work? - Is there a driver for the RTL8189ETV in the mainline kernel or a way to make that device work? DIFF of the two dts files: 204c204 < dr_mode = "otg"; --- > dr_mode = "host"; 217,219d216 < pinctrl-names = "default"; < pinctrl-0 = <0xe>; < usb0_id_det-gpio = <0x9 0x7 0x8 0x0>; 363,376d359 < usb1_vbus_pin@0 { < pins = "PH6"; < function = "gpio_out"; < linux,phandle = <0x38>; < phandle = <0x38>; < }; < < usb2_vbus_pin@0 { < pins = "PH3"; < function = "gpio_out"; < linux,phandle = <0x39>; < phandle = <0x39>; < }; < 392,398d374 < usb0_id_detect_pin@0 { < pins = "PH8"; < function = "gpio_in"; < bias-pull-up; < linux,phandle = <0xe>; < phandle = <0xe>; < }; Am Mittwoch, 4. Mai 2016 19:34:14 UTC+2 schrieb Christo Radev: > > 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 = <®_usb0_vbus>; > usb1_vbus-supply = <®_usb1_vbus>; > usb2_vbus-supply = <®_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<span style="color: #660;" class="style > -- 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.
