Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "usb: musb: da8xx: Set phy in OTG mode by default"

This reverts commit 7ccf62941a38701ec9a42b4a0fa2868af456e96a.

da8xx_musb_set_mode() forces OTG mode regardless the selected mode even
if the property 'dr_mode = "host"' is present in device-tree. This
causes an unrecoverable error when VBUS supply is shut down : plugged
gadgets are no longer detected once VBUS supply is back.

Reverting it allows to have a selected mode coherent with device-tree's
description. IMO, this shouldn't cause regression because OTG mode is
the default selection when 'dr_mode' property is not set.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Link: https://lore.kernel.org/r/20240528102026.40136-3-bastien.curutchet@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bastien Curutchet and committed by
Greg Kroah-Hartman
6ecd7749 ee8e41b5

-7
-7
drivers/usb/musb/da8xx.c
··· 328 328 struct da8xx_glue *glue = dev_get_drvdata(musb->controller->parent); 329 329 enum phy_mode phy_mode; 330 330 331 - /* 332 - * The PHY has some issues when it is forced in device or host mode. 333 - * Unless the user request another mode, configure the PHY in OTG mode. 334 - */ 335 - if (!musb->is_initialized) 336 - return phy_set_mode(glue->phy, PHY_MODE_USB_OTG); 337 - 338 331 switch (musb_mode) { 339 332 case MUSB_HOST: /* Force VBUS valid, ID = 0 */ 340 333 phy_mode = PHY_MODE_USB_HOST;