Repository navigation
arm64: dts: apple: t8132: keep the USB4 router DARTs out of the router's power state - #2691
RyanTheTide wants to merge 2 commits into
Conversation
…r's power state Since the USB4 NHI DARTs were given power-domains = <&ps_atcN_cio>, every deep sleep of an M4 MacBook Air with a USB4 partner attached hangs: the DART, a supplier of the NHI, suspends after the NHI's noirq suspend, so the native CIO sleep, which powers the router's states off from that noirq suspend, finds ATCN_CIO still held on, unwinds, and fails again in its recovery. The SoC watchdog then resets the machine. The DART does not need the state named: the router populates it only after powering its own states, and the native CIO sleep saves and restores it across their power cycle. Drop the property again on both routers and say why. Fixes: 202ede0 ("arm64: dts: apple: t8122/t8132/t603x: give the remaining DARTs their power domains") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
… is covered A USB4 router's DARTs are children of the router node, which names the router's power states. The router driver populates them only after it has powered those states, so they are never probed while the block is off, and naming the same states on the DART holds them on through the native CIO sleep. The check counted such a DART as a new gap. Treat a DART without power-domains as covered when its parent is a device node (not a simple-bus or similar, which platform code populates) with power-domains of its own, and require the parent's domains to be enabled. This is read from the tree's structure, not from a list of boards. On today's integration DTBs it exempts nothing new; it accepts the four T8132 router DARTs once they drop their domains. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
No blockers. Dropping power-domains from usb4_0/1_dart is consistent with how the router driver handles them: it adds its runtime links to all its domains before of_platform_populate() and depopulates before dropping them, so the DART never exists with the block off. The DART's suspend/resume callbacks skip register access while the CIO owner holds it, so the native sleep's domains-off check (which returns -EBUSY while genpd is on) can now pass. I built all Apple DTBs at base and head. The old checker reports the four T8132 router DARTs as new gaps, the new one reports none, and on base DTBs the new exemption matches nothing, so no existing gap is hidden. The checker unit tests pass. Two small points. The dtsi comment talks about the native CIO sleep, but J715 shares this file and never takes that path, so it would read better with the populate/depopulate ordering as the main reason. The new checker exemption relies on the parent's driver populating children only after powering them, which only the USB4 router does today: either restrict it to the router compatible or state that requirement in the docstring. Still needed before merge: the dock-with-PCIe-tunnel deep-sleep row (the PCIe-C DART keeps ps_atcN_cio_pcie, which the sleep takes down first), and a J715 boot/sleep row with a USB4 partner, since J715 gets the same DT change. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial pre-PR checklist review at 2fa243c99e6464e1aa70ea08f1e5a5374c445537 (COMMENT — 0 code/policy/attribution blockers, holding only for missing §5 HW rows).
Checklist Summary
- §1 (No model gating): Pass — DT fix removes
power-domainsfromusb4_0_dart/usb4_1_dartint8132-usb4.dtsi;scripts/dtc/apple-dart-pd-check.pydetermines coverage from DT structure (powered_device(parent)), not a board/SoC list. - §2 (No hacks / default cmdline): Pass.
- §3 (Safety / DT / checker correctness): Pass — verified:
- In
drivers/thunderbolt/apple.c,apple_cio_start()(:3433-3449) adds runtime-activeDL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVElinks (anddev_pm_syscore_device(..., true)) for all router domains (ps_atcN_cio,ps_atcN_cio_pcie,ps_atcN_cio_usb,ps_atcN_pcie) before callingof_platform_populate(acio->np, ...)(:3577), andapple_cio_stop()(:3171) callsof_platform_depopulate()before dropping those links. Thususb4_N_dartis never probed whileps_atcN_ciois powered off on either J713 or J715. - Dropping
power-domains = <&ps_atcN_cio>fromusb4_N_dartresolves the supplier noirq suspend ordering deadlock inapple_nhi_cio_domains_off()(drivers/thunderbolt/apple-cio-sleep.c:687-707), whileapple_dart_suspend/resumeskip register access whiledart->cio_activeis held. scripts/dtc/apple-dart-pd-check.pyproperly excludessimple-bus/simple-pm-bus/simple-mfd/isaand checks parent domains for disabled status, with 4 new unit tests passing.
- In
- §4 (Clean-room & attribution): Pass — both commits (
2eb9771e,2fa243c9) have human author/committer (Ryan Murray <ryan@aurorasilicon.org>) andSigned-off-by:only; PR body includesAssisted-by:. - §5 (Evidence): Incomplete — J713 USB4 host-to-host 10/10 deep-sleep clean proof and
dtbs_checkare in, holding for the remaining HW rows below. - §6 (Naming): Pass.
- CI: 2/2 checks PASS (
dt-checks,host-tests).
Non-blocking Nits
arch/arm64/boot/dts/apple/t8132-usb4.dtsi:80-85, 202-207: J715 sharest8132-usb4.dtsiand does not take the native CIO sleep path; leading the comment with the router's populate/depopulate power lifecycle makes it accurate for both J713 and J715.scripts/dtc/apple-dart-pd-check.py:137-143, 160-167:powered_device()assumes any non-bus parent withpower-domainspowers its domains before populating child DARTs (true forapple,*-usb4-aciotoday). Consider stating that requirement inpowered_device()'s docstring or narrowing to known populate-after-power compatibles; also notedisabled_domains()reports onlybad[0]if a parent has multiple disabled domains.
Remaining §5 HW Rows Before Approval
- J713 deep-sleep row with a dock carrying a PCIe tunnel (explicitly listed under
Still to run—usb4_N_pcie_dartretainsps_atcN_cio_pcieand needs end-to-end verification across native CIO sleep/wake). - J715 boot + sleep row with a USB4 partner (shares
t8132-usb4.dtsiwithout the native CIO sleep path). - Explicit confirmation of SELinux Enforcing / 0 AVC denials alongside 0 failed units and 0 new kernel errors on the regression rows.
Assisted-by: LLM (Gemini 4 Neon)
Problem
Since 202ede05e539 gave the T8132 USB4 NHI DARTs
power-domains = <&ps_atcN_cio>, a deep sleep of an M4 MacBook Air with a USB4 partner attached does not come back. The native CIO sleep powers the router's states off from the NHI's noirq suspend. The DART is a supplier of the NHI and suspends after it, so genpd keeps ATCN_CIO on. The CIO sleep then unwinds, its recovery fails the same way, and the SoC watchdog resets the machine about two minutes later. With the console suspended, nothing is logged.Change
Drop
power-domainsfromusb4_0_dartandusb4_1_dartagain, with a comment saying why. The DART doesn't need it: the router populates it only after powering its own states, and the native CIO sleep saves and restores it across their power cycle.Testing
On a J713 on the macOS 27.2 stub, with a USB4 host-to-host cable to another Mac, using a lab kernel carrying the other 27.2 deep-sleep fixes (DCP stop #2660, PMP data segment, Wi-Fi WoWLAN, CIO XDomain):
401a80000.iommuactive inatc0_cio.Still to run
ps_atcN_cio_pcie; the CIO sleep takes that state down first).Assisted-by: LLM (Claude:Opus 5.5)