[PATCH RFC 05/22] usb: dwc3: apple: Do not use host-vbus-glitches workaround
Sven Peter
sven at kernel.org
Sat Aug 23 04:42:09 PDT 2025
On 22.08.25 00:28, Thinh Nguyen wrote:
> On Thu, Aug 21, 2025, Sven Peter wrote:
>> From: Janne Grunau <j at jannau.net>
[...]
>> /*
>> * Some platforms need to power off all Root hub ports immediately after DWC3 set to host
>> * mode to avoid VBUS glitch happen when xhci get reset later.
>> + * On Apple platforms we must not touch any MMIO yet because dwc3
>> + * will not work correctly before its PHY has been initialized.
>
> This doesn't make sense, the phy should've been initialized by this
> point. We already access MMIO before this. Even your [PATCH RFC 7/22]
> attempts to access MMIO before this, yet accessing here causes problem.
> Do we know when the phy get initialized then?
You're absolutely right, this doesn't make any sense!
dwc3_power_off_all_roothub_ports uses ioremap which will map the XHCI
region as Device-nGnRE. That just doesn't work on these machines and
actually explains the SErrors.
Resources on these machines generally have the IORESOURCE_MEM_NONPOSTED
flag set (via the nonposted-mmio dt property) and then use ioremap_np to
map them using Device-nGnRnE.
Best,
Sven
More information about the linux-arm-kernel
mailing list