]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: handle peripheral as well as otg dr_mode
authorJohn Keeping <john@metanate.com>
Wed, 12 Apr 2023 11:52:53 +0000 (12:52 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 9 May 2023 14:50:01 +0000 (22:50 +0800)
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>
arch/arm/mach-rockchip/board.c

index 6d33d65780113d6b51d6ffebc16b08c296705c53..45d9eae8700a13b37f73ac06f3e0deaa997ae207 100644 (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;