HomeFreeBSD

aw_usbphy: add support for device mode operation

Description

aw_usbphy: add support for device mode operation

OTG mode is not supported still. It's easy to do it as a one-off
detection, but the proper support requires continuous monitoring and
communicating the current state to the USB layer.

Also, fix phy0_route setting for H3. Remove duplicate register
definitions.

Tested on Orange Pi PC Plus with dr_mode="peripheral" using

hw.usb.template=3
umodem_load="YES"

Reviewed by: manu
MFC after: 5 weeks
Differential Revision: https://reviews.freebsd.org/D26348

Details