rockchip: handle peripheral as well as otg dr_mode

The OTG port is identified by inspecting the "dr_mode" property which is
expected to be "otg" for this port.  But it will work just as well as a
device controller when dr_mode is set to "peripheral", which may be
required if the mode detection pin is not set up correctly and the
device controller needs to be programmed to override this.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
John Keeping 2023-04-12 12:52:53 +01:00 committed by Kever Yang
parent 51c54080ff
commit 35c275065c

View file

@ -231,6 +231,7 @@ int board_usb_init(int index, enum usb_init_type init)
while (ofnode_valid(node)) {
switch (usb_get_dr_mode(node)) {
case USB_DR_MODE_OTG:
case USB_DR_MODE_PERIPHERAL:
matched = true;
break;