Also, I am not finding any existing data structure to pass the musb
function to the phy in either usb_phy or usb_otg. Setting the mode
(host/peripheral/otg) is done in the same PHY register, so it seems
should be implemented in the new phy driver as well.
Perhaps we'd have to sacrifice that functionality...
The device I am working on (LEGO MINDSTORMS EV3) has the port wired as
peripheral only, so I don't think leaving this out is an option. Leaving it in
OTG mode doesn't work because the required electrical connections are just not
The set_mode() method doesn't have anything to do with the predefined
roles. What CFGCHIP2 setting do is to override the ID input (and also the VBUS
level comparator). This is not required for the normal functioning of either
host or peripheral AFAIR.