summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2023-04-12 12:52:53 +0100
committerKever Yang <kever.yang@rock-chips.com>2023-05-09 22:50:01 +0800
commit35c275065c22a73fd68792d4fa0c345caab5071f (patch)
tree164f9ee42f1c5a412ba80881c524e73cee091404
parent51c54080ff8fd93d22331a3ef5abe0cee77ce285 (diff)
downloadu-boot-35c275065c22a73fd68792d4fa0c345caab5071f.tar.gz
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>
-rw-r--r--arch/arm/mach-rockchip/board.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 6d33d65780..45d9eae870 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -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;