bananapi-zero-ubuntu-base-minimal icon indicating copy to clipboard operation
bananapi-zero-ubuntu-base-minimal copied to clipboard

g_ether

Open peterberbec opened this issue 5 years ago • 17 comments

According to the forums, a patch is required to enable OTG gadget ethernet. The file is here. Is this enabled on any of the kernels?

peterberbec avatar Aug 26 '18 04:08 peterberbec

This patch is for Kernel 3.4.112/113.

CONFIG_USB_OTG is not set for a reason, although I have it in DTB

&usb_otg {
	dr_mode = "**otg**";
	status = "okay";
};

When configured and enabled you will experience a high avg load > 1.0 and thus generate heat. I can configure it on next release as experimental, although I don't use it and never tested it.

avafinger avatar Aug 26 '18 13:08 avafinger

Can I enable it by decompiling the dtb or does it take a kernel recompilation?

peterberbec avatar Aug 26 '18 13:08 peterberbec

It needs a kernel recompilation, I was expecting kernel 4.18.6 for today and I set it for one shot and you tell the results unless you are in a hurry.

avafinger avatar Aug 26 '18 13:08 avafinger

Oh great! Let me know when the deb is up and I'll test it.

Thanks for all your work. Best image out there! You actually make this sbc useful.

peterberbec avatar Aug 26 '18 14:08 peterberbec

I will build one with OTG support, takes a couple of hours...

avafinger avatar Aug 26 '18 14:08 avafinger

Thanks, I'm not home anyway.

In the readme you say the board is colder if you disable hdmi. How would I go about doing that?

peterberbec avatar Aug 26 '18 14:08 peterberbec

Ok, i will do thist on 4.18.6...

avafinger avatar Aug 26 '18 14:08 avafinger

Please, try this kernel image and report back your findings... https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/commit/b753342f1b6122c96e4497bd3a3f5e02354e0962

avafinger avatar Aug 26 '18 14:08 avafinger

[ 51.164710] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers

peterberbec avatar Aug 26 '18 19:08 peterberbec

Does this sound like it makes sense to this issue?

peterberbec avatar Aug 26 '18 19:08 peterberbec

Seems so, I will build a new kernel image with that config set, please report back when you test.

avafinger avatar Aug 26 '18 20:08 avafinger

Small question, do you have this working on 3.4.112?

avafinger avatar Aug 26 '18 20:08 avafinger

I have not tested otg on the board at all. I was concentrating on i2c, spi, wifi and ethernet. I just now got around to otg.

peterberbec avatar Aug 26 '18 20:08 peterberbec

https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/commit/b91c11031eb9f7eeab91c94cd4a73d33be89f564

Built-in modules, you should have now OTG / gadget functionality. Hopefully.

avafinger avatar Aug 26 '18 21:08 avafinger

Got the same dmesg output. Should I try a banana-supplied image, figure out what makes it tick, and come back? I don't want you spending hours on this if there's some trick we need to know.

I'm going to try this They claim it supports USB Ethernet. I'll report back if it works, and we can try to disect how.

peterberbec avatar Aug 27 '18 03:08 peterberbec

Maybe you should have some g_ether params like this: https://gist.github.com/dwilkins/2be58627bfdd675e3a53a011f55c5d07

Try that image and see if it is working and there are parameters to be passed to g_ether

Sounds like you can't have OTG and gadget at the same time, who knows...

avafinger avatar Aug 27 '18 11:08 avafinger

Possibly. The inner workings of these devices follow rules only Dali would understand...

peterberbec avatar Aug 27 '18 11:08 peterberbec