public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Fixes to Tegra USB role switching and phy handling
@ 2026-01-27 15:11 Diogo Ivo
  2026-01-27 15:11 ` [PATCH v2 1/6] phy: tegra: xusb: Fix USB2 port regulator disable logic Diogo Ivo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-01-27 15:11 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman, Thierry Reding,
	Jonathan Hunter, JC Kuo, Vinod Koul, Kishon Vijay Abraham I,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: linux-usb, linux-tegra, linux-kernel, linux-phy, devicetree,
	Diogo Ivo, stable

Hello,

This patch series contains fixes/improvements for USB role switching on the
Tegra210 and Tegra186 SoCs.

The first patch addresses a wrong check on the logic that disables the
VBUS regulator.

The second patch removes a redundant mutex lock when setting the PHY
mode.

The third patch guarantees proper ordering of events when switching PHY
roles.

The remaining patches are included to standardize the PHY .set_mode()
callback between Tegra186 and Tegra210.

With this patch series this feature can only be controlled from userspace,
by writing the desired role to sysfs as

echo "role" > /sys/class/usb_role/usb2-0-role-switch/role

with role being one of {device, host, none}.

Further patches will enable automatic role switching via the 'cros_ec_typec'
driver which is currently broken on Smaug.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
Changes in v2:
- Remove DT patches already taken to be upstreamed
- Add standardization between Tegra210 and Tegra186
- Address review comments from v1, detailed descriptions in each patch
- Link to v1: https://lore.kernel.org/r/20251204-diogo-tegra_phy-v1-0-51a2016d0be8@tecnico.ulisboa.pt

---
Diogo Ivo (6):
      phy: tegra: xusb: Fix USB2 port regulator disable logic
      usb: xhci: tegra: Remove redundant mutex when setting phy mode
      phy: tegra: xusb: Fix ordering issue when switching roles on USB2 ports
      phy: tegra: xusb: Add ID override support to padctl
      phy: tegra: xusb: Move .set_mode() to a shared location
      phy: tegra: xusb: Move T186 .set_mode() to common implementation

 drivers/phy/tegra/xusb-tegra186.c   | 73 +++++----------------------------
 drivers/phy/tegra/xusb-tegra210.c   | 42 +------------------
 drivers/phy/tegra/xusb.c            | 80 +++++++++++++++++++++++++++++++++++++
 drivers/phy/tegra/xusb.h            |  4 ++
 drivers/usb/gadget/udc/tegra-xudc.c |  4 ++
 drivers/usb/host/xhci-tegra.c       | 14 ++++---
 include/linux/phy/tegra/xusb.h      |  3 ++
 7 files changed, 111 insertions(+), 109 deletions(-)
---
base-commit: b02a5530af8abe0d3cd4852ba48990716e962934
change-id: 20251201-diogo-tegra_phy-86c89cab7377

Best regards,
-- 
Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-23 16:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 15:11 [PATCH v2 0/6] Fixes to Tegra USB role switching and phy handling Diogo Ivo
2026-01-27 15:11 ` [PATCH v2 1/6] phy: tegra: xusb: Fix USB2 port regulator disable logic Diogo Ivo
2026-03-02  9:10 ` [PATCH v2 0/6] Fixes to Tegra USB role switching and phy handling Diogo Ivo
2026-03-02  9:59 ` Vinod Koul
2026-03-23 16:15 ` Diogo Ivo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox