mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [REGRESSION] pmdomain: mediatek: scpsys: MT7622 audsys domain kills USB (xhci-mtk) on boot
@ 2026-12-05 12:23 Imran Khalid
  0 siblings, 0 replies; only message in thread
From: Imran Khalid @ 2026-12-05 12:23 UTC (permalink / raw)
  To: angelogioacchino.delregno, ulf.hansson
  Cc: matthias.bgg, linux-mediatek, linux-pm, linux-arm-kernel,
	linux-kernel, regressions

Hi,

Commit 6d1fdcfeb026 ("pmdomain: mediatek: scpsys: Add MT7622 Audio
power domain to legacy driver"), merged for v7.1, breaks USB on MT7622.
After boot the xhci-mtk controller stops servicing transfers and is
declared dead. Removing the domain entry fixes it.

Hardware: Linksys E8450 (MT7622, mt7622-linksys-e8450-ubi.dts)
Kernel: 7.3.7 (OpenWrt main with a 7.3 port of the mediatek target)
Good: 6.18.64 on the same board, same userspace and same USB devices

Symptom
-------
Any USB storage device (a 2.5" HDD or a small flash stick) enumerates
and its partition table is read fine at ~5 s. Then:

[ 12.167565] mtk-scpsys 10006000.power-controller: Failed to power off domain audsys
[ 46.626175] xhci-mtk 1a0c0000.usb: xHCI host not responding to stop endpoint command
[ 46.626196] xhci-mtk 1a0c0000.usb: xHCI host controller not responding, assume dead
[ 46.626240] xhci-mtk 1a0c0000.usb: HC died; cleaning up
[ 46.626299] usb 1-1: USB disconnect, device number 2
[ 46.627594] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=DRIVER_OK cmd_age=35s
[ 46.627644] I/O error, dev sda, sector 0 op 0x0:(READ) flags 0x880700 phys_seg 4 prio class 2

The first read issued around 11 s never completes. The SCSI layer times
it out at 30 s, the stop endpoint command gets no completion in 5 s,
and the host is marked dead. Boot also stalls until then. This happens
on every boot at the same point.

Analysis
--------
The new entry in scp_domain_data_mt7622[] is:

[MT7622_POWER_DOMAIN_AUDIO] = {
.name = "audsys",
...
.bus_prot_mask = MT7622_TOP_AXI_PROT_EN_HIF1,
.caps = MTK_SCPD_ACTIVE_WAKEUP,
},

Its bus_prot_mask is MT7622_TOP_AXI_PROT_EN_HIF1. That is the same bus
protection as the HIF1 domain, which is the domain the SSUSB controller
is in (mt7622.dtsi: ssusb power-domains = <&scpsys
MT7622_POWER_DOMAIN_HIF1>).

In this tree nothing consumes MT7622_POWER_DOMAIN_AUDIO. The matching DT
patches from the same series ("arm64: dts: mediatek: mt7622: Add missing
clock to audio-controller" and "... Add missing power domain to afe") do
not appear to be in mainline as far as I can see. So genpd powers the
domain off as unused once the provider's consumers have probed. That
power-off fails, and from the symptom the HIF1 AXI path is left
protected, which cuts the USB controller off from the bus.

The only kernel messages that are new in the 7.3 boot compared with
6.18 are the audsys power-off failure and the USB errors above.

Things that did NOT help (ruled out on this board):
- replacing drivers/usb/host/xhci* with the 6.18.64 sources (same failure)
- external power for the disk / using a low-power flash stick
- removing uas from the boot modules

Fix tested
----------
Removing only the audsys entry from scp_domain_data_mt7622[] in
drivers/pmdomain/mediatek/mtk-scpsys.c (everything else upstream 7.3.7,
upstream xHCI) fixes it completely. The "Failed to power off domain
audsys" message is gone, the disk enumerates and mounts, there is no
xHCI timeout, and boot time is back to normal.

I'm not sure whether the right fix is to give the audio domain its own
correct bus protection bits (if HIF1 is not actually right for AUDSYS),
to stop powering it off while it has no consumer, or to revert until the
DT side is merged. I'm happy to test patches on the E8450.

#regzbot introduced: 6d1fdcfeb026


Thanks,
Imran

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-05 12:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-05 12:23 [REGRESSION] pmdomain: mediatek: scpsys: MT7622 audsys domain kills USB (xhci-mtk) on boot Imran Khalid

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

all inboxes | Powered by JetHome®