ATK Posted June 24, 2016 Posted June 24, 2016 I tried changing script.bin/fex > usbc0 (settings) with many combinations but was not able to get the USB port working as genreal USB host ... so what am i missing ? Target Board :- Banana Pi. Target Os :- 3.4.112 (Armbian_5.10_Bananapipro_Debian_jessie_3.4.112_desktop)
tkaiser Posted June 24, 2016 Posted June 24, 2016 Did you try to adjust these two usbc0 settings and have a look what happens after exchanging script.bin and a reboot? usb_port_type = 1 usb_host_init_state = 1 On a pcDuino3 Nano it will look like this afterwards: root@pcduino3nano:~# lsusb Bus 001 Device 002: ID 152d:3562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge (disk connected to OTG port and accessible in host mode)
ATK Posted June 24, 2016 Author Posted June 24, 2016 Hi Tk .. did the modifications as per your last post BUT nothing changes... i`hv connected a wireless dongle for Mouse/KB via OTG cable ... after doing above changes and reboot the dongle is`nt detected ... AFAIK as per the banana Pi H/W schematics ... the port is powered through a chip (SY6280AAC) whose enable signal is "USB0-DRV" which is mapped to SOC`s "PB9" pin ... and inside the fex file this is referred as "usb_drv_vbus_gpio = port:PB09<1><0><default><0>" which again translates to the the USB drive set to Default-LOW .... Though i even tried setting this to "High" in default mode in my previous attempts BUT there was`nt any change ... So i now wonder how to do this.... Edit :- Can you paste here the full listing of [usbc0] of your "pcDuino3 Nano" on which your USB-OTG is working OK in USB-Host mode ?
tkaiser Posted June 24, 2016 Posted June 24, 2016 Here's whole config regarding OTG: [usbc0] usb_used = 1 usb_port_type = 1 usb_detect_type = 0 usb_id_gpio = port:PH04<0><1><default><default> usb_det_vbus_gpio = "axp_ctrl" usb_drv_vbus_gpio = port:PB09<1><0><default><0> usb_host_init_state = 1 usb_restric_flag = 0 usb_restric_voltage = 3550000 usb_restric_capacity = 5 Did you check dmesg/lsusb? Just as a reference (since the disks were already lying around). Same Spinpoint tested with pcDuino3 Nano, kernel 3.4.112, performance cpufreq governor and 152d:3562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge USB-to-SATA bridge. Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 32k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 && iozone -e -I -a -s 2048M -r 16384k -i 0 -i 1 OTG: random random kB reclen write rewrite read reread read write 102400 4 9128 11047 8874 8908 436 1331 102400 16 15180 16945 12927 13330 1579 4381 102400 32 18050 19215 13649 13900 2793 6977 102400 512 21478 21609 15428 15684 12272 21777 102400 1024 21858 21934 15712 15512 12918 22097 102400 16384 23294 23752 15311 15992 15800 23462 2097152 16384 23544 23569 16022 16003 Host port (upper one on the pcDuino): random random kB reclen write rewrite read reread read write 102400 4 6143 8015 8131 8112 412 1316 102400 16 16641 16909 16610 16761 1565 4529 102400 32 23961 23763 21182 21905 2930 7293 102400 512 26871 29691 28191 29131 19169 29669 102400 1024 30048 30303 29989 28452 21975 29978 102400 16384 32779 32924 30521 30415 30141 32800 2097152 16384 33108 33101 30444 30503 (quite a difference -- for even better results on the host port using same disk/bridge with mainline kernel see here)
ATK Posted June 24, 2016 Author Posted June 24, 2016 Ah ... the major difference between your Fex > usbc0 and the fex accompanying the Armbian (3.4.112 (Armbian_5.10_Bananapipro_Debian_jessie_3.4.112_desktop)) is the line "usb_det_vbus_gpio = "axp_ctrl"" ...it seems that the fex you are using and also the standard fex @ http://linux-sunxi.org/Fex_Guide are having "axp_ctrl" set for " usb_det_vbus_gpio" ... which clearly indicates that here the vbus detection is governed/done by the on board PMU CHIP of banana pi .... BUT the bundled fex with "Armbian_5.10_Bananapipro_Debian_jessie_3.4.112_desktop" is not having this ... so now i will further investigate the issue by setting > usb_port_type = 1 usb_host_init_state = 1 usb_det_vbus_gpio = "axp_ctrl" BTW :- lsusb/dmesg has nothing to say on this .... nothing detected..no activity...
tkaiser Posted June 24, 2016 Posted June 24, 2016 Well, regarding fex file contents... this should be something the hardware vendor is adjusting responsibly to match his device's schematic. Reality differs. We have some fex files in our repo without any adjustments made and some required loads of work (since the hardware vendor did a really bad job trying to describe his hardware). Without double checking schematics you never know. And since you own a device made by @sinovoip you're already lost. They are known for not being able to describe their own hardware correctly (be it fex files or device tree with mainline or even schematics -- they simply don't care and do not even get the idea why that matters) I really liked Banana Pi in the beginning due to being the A20 device with the best GbE throughput. But in the meantime I had to realize that not a single piece of documentation the vendor provides can be trusted. It might be correct or it might be just one of the many copy&paste errors they're famous for. Might apply to BPi too -- won't touch this hardware anytime soon.
zador.blood.stained Posted June 24, 2016 Posted June 24, 2016 According to schematics, USB ID detection pin is connected to SoC GPIO PH4 on Banana Pi and Banana Pi M1 and to PH3 on Banana Pro Edit: USB0-DRV (responsible for powering OTG port when OTG cable is connected) is connected to AXP209 GPIO2 on all 3 mentioned boards.
ATK Posted June 24, 2016 Author Posted June 24, 2016 OK..I can confirm that the USB0-DRV signal connects to two points on Banana pi PCB .. (1) SOC`s PB9 pin . (2) PMU(AXP209) chip`s PIN no.6 (N_VBUSEN). so now i will try again with the fex settings for usbc0 provided by TK . TK : the board is from Lemaker .. its not a Sinov product .
tkaiser Posted June 25, 2016 Posted June 25, 2016 TK : the board is from Lemaker .. its not a Sinov product . Banana Pi is neither a LeMaker nor a SinoVoip product. I was only talking about 'quality' of documentation / hardware descriptions. I still think LeMaker never did any hardware, their role was to create a community around and they also were agents / reseller (at least last year here in Germany you were only able to get the unfortunate BPi M2 they really have nothing to do with through their sales channels and not SinoVoip's). Banana Pi is a Foxconn product, ODM was done by Xunlong, SinoVoip is currently producing the hardware (and does the most horrible 'support' anyone can imagine, same applies to LeMaker in the meantime too for obvious reasons): http://linux-sunxi.org/User:Tkaiser#Banana_Pi_development_history.2Frumours http://linux-sunxi.org/Banana_Pi https://www.google.com/?q=lemaker+foxconn+inurl:irclog.whitequark.org/linux-sunxi
Recommended Posts