Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]



i failed to figure out what to do to use motg(4;missing man page btw.)
on a sunxi(sun4i-a10-cubieboard.dtb) in hostmode.

currently it does ship with the motg node in device tree containing
	dr_mode = "otg";
which does mean that sunxi_musb_attach() will fail out prematurely.
fix for that is obvious, and the _attach() will proceed to end with:
	dr_mode = "host";

now, for linux it is enough to do the above, and changing the regulator
named "usb0-vbus" from "disabled" to "okay", but given the logic in
sunxi_usbphy.c i don't see how that alone could work, even if i added:
	usb0_vbus-supply = <..phandle_of_usb0-vbus..>;
to the usb phy node in device tree, and it didn't(i tried before taking
a look at the code).

sunxi_usbphy_vbus_detect() seems broken as is, and should imo. default
to return 0, given sc_gpio_vbus_det isn't even referenced elsewhere
atm., also the way it is, the otg port(0) will not acquire the optional
phy_reg regulator(so couldn't be enabled even if _vbus_detect() was
fixed), because it is skipped for the lack of "pmu0" named register
already in _usbphy_attach(), which shouldn't exist for phy_index==0 to
begin with.  the latter can be fixed by reordering the loop a bit.

does anyone use motg on sunxis currently? would like to know which
board, and w/what changes to the device tree(if any) there is for it
to work.

i can come up with diffs, if my explanation about the issues above
didn't make sense, just let me know.

Home | Main Index | Thread Index | Old Index