buildroot-tiny200 icon indicating copy to clipboard operation
buildroot-tiny200 copied to clipboard

OTG not working

Open peterbmckinley opened this issue 3 years ago • 3 comments

Hi we have a partially working image based on the V2 firmware from MangoPi

https://github.com/mangopi-sbc/buildroot-mangopi-r

However OTG doesn't work, lsusb prints no info at all with a usb wifi dongle connected.

We set dr_mode to HOST instead of PERIPHERAL

Is there something else we need to do, in addition to this? Unfortunately the repo above has disabled Issue reporting

peterbmckinley avatar Apr 02 '22 17:04 peterbmckinley

if we use PA1 for OTG-ID, then :

&usb_otg {
dr_mode = "otg"; /* host peripheral otg*/
status = "okay";
};
&usbphy {
status = "okay";
usb0_id_det-gpios = <&pio 0 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PA1    0a1b2c3d4e5f6g7h */
};

I tested, it works.

mangobuge avatar Apr 03 '22 06:04 mangobuge

Thanks Mangobuge. Can we make this the default and submit a pull request to https://github.com/ouki-wang/buildroot-f1c-pinpong

Peter

peterbmckinley avatar Apr 03 '22 11:04 peterbmckinley

if we use PA1 for OTG-ID, then :

&usb_otg {
dr_mode = "otg"; /* host peripheral otg*/
status = "okay";
};
&usbphy {
status = "okay";
usb0_id_det-gpios = <&pio 0 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PA1    0a1b2c3d4e5f6g7h */
};

I tested, it works.

We copied your dts but it made no difference.

"# lsusb #"

According to the Schematic, the ID pin is not connected

peterbmckinley avatar Apr 03 '22 12:04 peterbmckinley

@peterbmckinley Greetings, I did some testing with my own F1C200s dev board and found setting it to this, gave me the desired result:

&usb_otg {
dr_mode = "host"; /* host peripheral otg*/
status = "okay";
};
&usbphy {
status = "okay";
};

I used this to get my USB Ethernet Adapter to work. This may be what you are looking for. Please let me know if this is helpful, it took me a lot of troubleshooting myself! :)

Patchy319 avatar Feb 12 '23 01:02 Patchy319

I haven't tested it, my project has moved on, but if it worked for you i'm happy to close the issue on that basis.

Thank for your help!

peterbmckinley avatar May 07 '23 10:05 peterbmckinley