Allwinner USB DRD is based on the Mentor USB OTG controller, with a different register layout and a few missing registers.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/dev/usb/controller/musb_otg.c | ||
---|---|---|
3146 | (Why the extra parentheses?) |
sys/dev/usb/controller/musb_otg.c | ||
---|---|---|
3146 | Old code was like this, I only changed the indentation. |
Tweak the attach order of aw_usbphy and use c99 initializers in declaration of awusbdrd_driver
This is on hold due to an issue that showed up on Banana Pi testing. The board has two micro USB ports (OTG + power), and if the board is powered by the OTG port, configuring the PHY for host mode causes the board to reset. Ideally we will want to take ID and VBUS detect signaling into consideration (status which, depending on the board, is either read from GPIO pins, the AXP PMU, or both).
No news yet. The PHY driver has had some changes since this patch was last updated, so first I will need to merge with head.
Update to catch up with changed KPI and work on arm64 on the sopine.
This is untested on 32-bit arm.
It doesn't seem to quite work on the Allwinner A64. I'm getting the following when I try to use a wifi dongle:
... musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0001 musbotg_channel_alloc: No available channels. Mask: 0001 musbotg_channel_alloc: No available channels. Mask: 0001 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 musbotg_channel_alloc: No available channels. Mask: 0000 ...
sys/dev/usb/controller/musb_otg.h | ||
---|---|---|
432 ↗ | (On Diff #40535) | Spelling error? sc_eb_cfg -> sc_ep_cfg |
sys/dev/usb/controller/musb_otg_allwinner.c | ||
---|---|---|
70 | s/allwinner_machdep/aw_machdep/ |
My problem was clock related (which I've fixed this weekend) and using latest u-boot which have usb problem ...
You probably didn't have the error as u-boot setup the clocks for you, now that we correctly set the clocks it's working.
I don't think so, maybe there is a bit of stuff to do with regulator but if the driver still works that could be commited and we'll deal with regulator later.