2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/phy/tegra
BH Hsieh 55f1a5f7c9 phy: tegra: xusb: reset VBUS & ID OVERRIDE
Observed VBUS_OVERRIDE & ID_OVERRIDE might be programmed
with unexpected value prior to XUSB PADCTL driver, this
could also occur in virtualization scenario.

For example, UEFI firmware programs ID_OVERRIDE=GROUNDED to set
a type-c port to host mode and keeps the value to kernel.
If the type-c port is connected a usb host, below errors can be
observed right after usb host mode driver gets probed. The errors
would keep until usb role class driver detects the type-c port
as device mode and notifies usb device mode driver to set both
ID_OVERRIDE and VBUS_OVERRIDE to correct value by XUSB PADCTL
driver.

[  173.765814] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[  173.765837] usb usb3-port2: config error

Taking virtualization into account, asserting XUSB PADCTL
reset would break XUSB functions used by other guest OS,
hence only reset VBUS & ID OVERRIDE of the port in
utmi_phy_init.

Fixes: bbf711682c ("phy: tegra: xusb: Add Tegra186 support")
Cc: stable@vger.kernel.org
Change-Id: Ic63058d4d49b4a1f8f9ab313196e20ad131cc591
Signed-off-by: BH Hsieh <bhsieh@nvidia.com>
Signed-off-by: Henry Lin <henryl@nvidia.com>
Link: https://lore.kernel.org/r/20250122105943.8057-1-henryl@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-02-14 18:03:05 +05:30
..
Kconfig phy: tegra194: p2u: Allow to enable driver on Tegra234 2024-12-04 19:15:48 +05:30
Makefile phy: tegra: xusb: Add Tegra234 support 2023-01-12 22:57:06 +05:30
phy-tegra194-p2u.c phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
xusb-tegra124.c phy: tegra: xusb: Remove usb3 supply 2022-11-07 10:20:25 +05:30
xusb-tegra186.c phy: tegra: xusb: reset VBUS & ID OVERRIDE 2025-02-14 18:03:05 +05:30
xusb-tegra210.c phy: tegra: xusb: Remove usb3 supply 2022-11-07 10:20:25 +05:30
xusb.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
xusb.h phy: tegra: xusb: Support sleepwalk for Tegra234 2023-03-20 18:14:59 +05:30