]> git.baikalelectronics.ru Git - uboot.git/commit
usb: xhci-dwc3: Support role switch default role
authorMark Kettenis <kettenis@openbsd.org>
Tue, 19 Apr 2022 19:06:33 +0000 (21:06 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 20 May 2022 07:41:33 +0000 (09:41 +0200)
commit8f1b9f05a9e2113a32ddd239af10308da198f7c8
tree78f35a3ddb79df8e8cf38adb0197571f6e2ce246
parentc2a592c543914b28e8d2a12801430e8e56318df9
usb: xhci-dwc3: Support role switch default role

When the device tree indicates support for role switching through
the "usb-role-switch" property, take the "role-switch-default-mode"
property into account when deciding which role to put the
controller into.

This makes USB devices work on Apple M1 systems where the device
tree may include a "dr_mode" property that is set to "otg", but
where we need to put the controller into "host" mode to see
devices connected to the type-C ports.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
drivers/usb/common/common.c
drivers/usb/host/xhci-dwc3.c
include/linux/usb/otg.h