aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2022-04-19 21:06:33 +0200
committerMarek Vasut <marex@denx.de>2022-05-20 09:41:33 +0200
commit6a6468f479a7e816fb656b3e1d8af30c7de837a4 (patch)
tree78f35a3ddb79df8e8cf38adb0197571f6e2ce246 /include
parentf83bd23e2a0e9861969c9d43395299a14f25ddda (diff)
downloadu-boot-6a6468f479a7e816fb656b3e1d8af30c7de837a4.zip
u-boot-6a6468f479a7e816fb656b3e1d8af30c7de837a4.tar.gz
u-boot-6a6468f479a7e816fb656b3e1d8af30c7de837a4.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/otg.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index c19b916..5d0dac9 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -28,6 +28,16 @@ enum usb_dr_mode {
enum usb_dr_mode usb_get_dr_mode(ofnode node);
/**
+ * usb_get_dr_mode() - Get dual role mode for given device
+ * @node: ofnode of the given device
+ *
+ * The function gets phy interface string from property
+ * 'role-switch-defaulr-mode', and returns the correspondig enum
+ * usb_dr_mode
+ */
+enum usb_dr_mode usb_get_role_switch_default_mode(ofnode node);
+
+/**
* usb_get_maximum_speed() - Get maximum speed for given device
* @node: ofnode of the given device
*