Jump to content

Recommended Posts

Posted

Dear all,

 

I am using armbian Mainline Debian Jessie 4.9.7 and 4.9.12 on a Banana Pi Pro (A20). Coming from legacy and fex, I came a long way learning a lot about Device Trees, Overlays, etc. the last 2 weeks. I even compiled some dev kernels to experiment.

 

I currently struggle with with the OTG port. I have two devices on the primary slots and need to get the OTG in host mode to attach my third device.

I've read that the OTG is not providing 5V to the device. Therefore, I use Pin4 5V DC and Pin6 GND of the 40Pin header. It works well when connecting Device #3 on USB 1 or 2. But not on OTG. I used dmesg to track devices.

 

Is there anything I am missing? Do I need to edit armbianEnv.txt with some parameter?

 

Thank you very much for your help!

Posted

I think this is related:

 

Quote

The otg port on the bananapi does not have a proper host controller,  instead it uses the musb app gadget controller in host emulation mode,  this is known to not work with some devices. You really should use one of the normal usb a ports on the bananapi, which are connected to a proper  usb host controller. 

https://groups.google.com/forum/#!searchin/linux-sunxi/usb$20otg|sort:relevance/linux-sunxi/-O3GckFuje8/aTAkPk1JCQAJ

Posted

The problem here I believe is switching the port to host mode, which requires loading one of the gadget modules (i.e. g_serial) and using OTG cable with ID pin shorted to the ground. This should also enable the power on the port if upstream DT is configured correctly.

Posted (edited)

I have recently tried bananian and the configuration works with bananian-otg. It is using the 3.x and fex style. The setup and vcc/gnd is working. My third device is fully recognized here!


I then looked into the dtb/ folder of armbian and decompiled the dtb to dts.

i have seen that the section -musb is inactive. I put it to status = "okay";

 

From my perspective and gained knowledge of device tree, that should have made it.

                usb@01c13000 {
                        compatible = "allwinner,sun4i-a10-musb";
                        reg = <0x1c13000 0x400>;
                        clocks = <0x2 0x0>;
                        interrupts = <0x0 0x26 0x4>;
                        interrupt-names = "mc";
                        phys = <0x30 0x0>;
                        phy-names = "usb";
                        extcon = <0x30 0x0>;
                        allwinner,sram = <0x31 0x1>;
                        status = "okay";
                        linux,phandle = <0x6e>;
                        phandle = <0x6e>;
                };

 

But it is not. I decompiled the bananapi.dtb when I read (in the forum) that otg got enabled here. Found a difference in

dr_mode = "otg".

 

But that was not solving my issue either. Any ideas? Thanks for your help!

I go with

dr_mode = "host";

now. I feel a bit closer as dmesg now tells me:

[    4.395972] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -16
[    4.396012] musb-hdrc: probe of musb-hdrc.1.auto failed with error -16

 

 

Edited by jacknob
gained more information
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines