mbox series

[0/3] usb: dwc2: drd: add support for role-switch-default-mode

Message ID 1638806203-6624-1-git-send-email-fabrice.gasnier@foss.st.com
Headers show
Series usb: dwc2: drd: add support for role-switch-default-mode | expand

Message

Fabrice Gasnier Dec. 6, 2021, 3:56 p.m. UTC
This series adds support for the role-switch-default-mode binding, to configure
the controller default mode, when the role is USB_ROLE_NONE.

This has been tested on STM32MP15 DK2 board, with:
 &usbotg_hs {
 	phys = <&usbphyc_port1 0>;
 	phy-names = "usb2-phy";
 	usb-role-switch;
 	dr_mode = "peripheral";
 	role-switch-default-mode = "peripheral";
 	status = "okay";
 }

Fabrice Gasnier (3):
  dt-bindings: usb: document role-switch-default-mode property in dwc2
  usb: dwc2: drd: add role-switch-default-node support
  usb: dwc2: drd: restore role and overrides upon resume

 Documentation/devicetree/bindings/usb/dwc2.yaml |  3 ++
 drivers/usb/dwc2/core.h                         |  3 ++
 drivers/usb/dwc2/drd.c                          | 51 ++++++++++++++++++++++++-
 drivers/usb/dwc2/platform.c                     | 10 +++--
 4 files changed, 61 insertions(+), 6 deletions(-)