chradev Posted October 4, 2016 Share Posted October 4, 2016 Hi Paolo, First of all thanks for the help.The USB port is enabled by default because i use it regularly for a keyboard and mouse. Here the original (not modified) dts file if anyone can help me. Paolo For removing the error about 'usb0_id_detect' you have to remove: * whole section usb0_id_detect_pin@0 { ... }; * following lines: pinctrl-0 = <0x2c>; usb0_id_det-gpio = <0x25 0x7 0x4 0x0>; from phy@01c13400 { ... }; section * and: pinctrl-0 = <0x0>; usb0_id_det-gpio = <0x0>; from second phy@01c13400 { ... }; section For setting of USB OTG in host only mode you have to change: * dr_mode = "otg"; to dr_mode = "host"; in usb@01c13000 { ... }; section USB OTH has to work in otg mode but it does not for me on Lime2-eMMC. You also have to verify that required modules are enabled in Kernel and loaded as described here: What I have done so far, is build the kernel using sunxi_defconfig and enabled USB_MUSB_SUNXI with its dependancies (musb isn't enabled there by default): USB_SUPPORT [=y] && USB_MUSB_HDRC [=y] && ARCH_SUNXI [=y] && NOP_USB_XCEIV [=y] && PHY_SUN4I_USB [=y] && EXTCON [=y] && GENERIC_PHY [=y] Selects: SUNXI_SRAM [=y] Unfortunately, working with converted dtb to dts file is not good idea. The better way is to build your own Armbian image controlling the staff with corresponding patches. Best regards Chris Link to comment Share on other sites More sharing options...
erpomata Posted October 5, 2016 Share Posted October 5, 2016 And 'too much for me, I will wait that Igor makes us the gift.Thank you Link to comment Share on other sites More sharing options...
Igor Posted October 5, 2016 Share Posted October 5, 2016 Few months ago I made an utility for easy switching between otg and host mode and it should be part of the build: sunxi-musb OTG / HOST changer for DTB v1.0 sunxi-musb filename.dtb otg | host Usage example: sunxi-musb sun4i-a10-mini-xplus.dtb otg If not, it's here. Link to comment Share on other sites More sharing options...
erpomata Posted October 7, 2016 Share Posted October 7, 2016 Great Igor works perfectly thank you 1 Link to comment Share on other sites More sharing options...
erpomata Posted October 8, 2016 Share Posted October 8, 2016 I realized now that I no longer have the wlan0 interface.I can do as well as replace the original file and losing the otg? Thanks Link to comment Share on other sites More sharing options...
Igor Posted October 8, 2016 Share Posted October 8, 2016 Enabling OTG should not affect wlan feature. Are you sure you did not modify anything else? Just try with original DTB too see if you got wifi back. Link to comment Share on other sites More sharing options...
erpomata Posted October 9, 2016 Share Posted October 9, 2016 No I have not changed anything else.I thought it was a consequence of the change to dtb also putting back the original file instead of the thing does not change.I open another topic.Thank you Link to comment Share on other sites More sharing options...
neomanic Posted November 24, 2016 Share Posted November 24, 2016 I've now made this change (set 'otg' to 'host' and removed the pinctrl lines) to my lime2 dts so I can have the extra USB port available, and am doing it as part of my custom image build. But given it's been a little while and a few kernel versions later, I was wondering whether there was any news on whether OTG mode works? Link to comment Share on other sites More sharing options...
chradev Posted November 24, 2016 Share Posted November 24, 2016 Hi Neomanic, I've now made this change (set 'otg' to 'host' and removed the pinctrl lines) to my lime2 dts so I can have the extra USB port available, and am doing it as part of my custom image build. But given it's been a little while and a few kernel versions later, I was wondering whether there was any news on whether OTG mode works? I am using OTG in host mode for a long time and have other problem. When my STM32-H405 board is connected as CDC device and communication (~160 kbps from H405 to Lime2) is started for a long periods of time (5-10 hours) without apparent reason device is disconnected but continue to be visible by 'lsusb' command. The only way to revert to working state is by rebooting the system. A few months ago (earlier Kernel version) this problems have been happened much more frequently - after 1-2 hours. My investigation shown that some changes to musb driver have made the things better but did not solve the issue. That is why I have decided to use USB Host ports for critical communications and USB OTG for optional once. Best regards Chris Link to comment Share on other sites More sharing options...
neomanic Posted November 27, 2016 Share Posted November 27, 2016 Yes, I have done the same and for similar reasons. I only use it for connecting my debug Ethernet adapter (main GBit one is to the network), as an attempt to test the OTG port using a flash drive caused a board lockup. Link to comment Share on other sites More sharing options...
Menion Posted December 13, 2016 Share Posted December 13, 2016 Apparently host mode of the BananaPi OTG USB port is not stable, or it is not stable with kernel 4.8.4 I have run fine DVB-T usb key in that port for a long while, then after the update to 4.8.4, what happens is that the USB DVB-T is detected and initialized fine, but the key doesn't just work, no stream nor valid info are received. And if I disconnect it while the system is running, I get 100% of the time a kernel panic. This happens with two different DVB-T keys Link to comment Share on other sites More sharing options...
jose1711 Posted August 4, 2017 Share Posted August 4, 2017 hello, any news about otg device mode on bananapi with kernel 4.12? thank you, jose Link to comment Share on other sites More sharing options...
Recommended Posts