mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
f83bd23e2a
commit
6a6468f479
3 changed files with 32 additions and 0 deletions
|
@ -27,6 +27,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue