Skip to content

arm64: dts: apple: t600x: mark the HDMI PHY domain sleep-wakeup-path - #3639

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
Ante042:fix/t600x-hdmi-sleep-phy
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
Ante042:fix/t600x-hdmi-sleep-phy

Conversation

@Ante042

@Ante042 Ante042 commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

What: On t600x the HDMI output's DP PHY sits in the atc3_usb power domain. The domain is off when the power controller probes, so genpd still powers it off in the noirq phase of s2idle, even though dcp_sleep_hold_phys() has put the PHY on the wakeup path. The HDMI DCP firmware keeps running through s2idle, and the SoC hangs the next time it touches the PHY. This marks ps_atc3_usb apple,sleep-wakeup-path, as the t604x common_dp domains already are.
Tested: J314s M1 Pro at ae360cc (candidate ca1f32d30f on main 498d53f), HDMI display attached: boots; the first s2idle 4 s after a lock, then four more, woke 5 of 5 (on main, 6 runs of this sequence out of 6 hung in the first sleep). Same tree before sign-off: 5 of 5 again, and a 40 s pm_test=platform hold right after the display power-off passed (3 of 3 hung on main). No warnings or DCP errors that main does not also show.
Risk: two-way door · M1 Pro/Max/Ultra (t600x). It only changes anything during s2idle with an HDMI link up.
Not yet: the other t600x boards (J316s, J314c, J316c, J375c, J375d) have the same tree and were not run. t602x has the same layout (atcphy3 in atc3_usb, no such property) and probably the same hang; I have no M2 Pro/Max to try it on, so it is not changed here. s2idle power with the domain held is not measured. A USB-C display on another port lost its link after the first sleep in the signed run; main did the same in one of two runs today, so it is not from this change, but it is not solved either.

Details

The hang needs the devices to be suspended across a point about 30 s after the HDMI display was powered off. Locking the session powers it off, so the first sleep right after a lock is the one that hangs. A sleep 40 s or more after the lock woke every time, and so did every sleep with the HDMI cable out. The kernel log of a hung boot ends at PM: suspend entry (s2idle).

With pwrstate debugging on, a pm_test=platform sleep showed atc3_usb coming back on in resume_noirq, so it had been cut in suspend_noirq under the running firmware. With the domain held, the same sleep showed no transitions of it.

pmgr-pwrstate gives GENPD_FLAG_ACTIVE_WAKEUP to a domain that is off at probe only when the node has apple,sleep-wakeup-path (cc013c0), and the t604x domains got it in c1c5e67. No driver change is needed. Deep sleep (s2r) is not touched: the DCP's s2r suspend returns before dcp_sleep_hold_phys(), so the PHY is not on the wakeup path there.

On this Mac the device tree comes from stage 2 on the ESP, not from the kernel build. For the rows I booted the candidate kernel with this Mac's own J314s tree with only this property added; /sys/firmware/devicetree/base/.../power-controller@e8/apple,sleep-wakeup-path was present on every boot.

If you'd rather have this done another way, or also on t602x now, say so.

Evidence

Candidate ca1f32d30f = main 498d53f + ae360cc merged unchanged + one local commit outside this PR (the DRM driver name for the installed Mesa). The first two boots ran 17ff5f8e5e, the same tree with the commit before sign-off (ed25eaccc2).

  • Boot 1 (17ff5f8e5e), pm_test=platform, 5 s hold, pwrstate dynamic debug on: 0 atc3_usb transitions during the sleep (main: cut in suspend_noirq, back on in resume_noirq).
  • Boot 1, pm_test=platform, 40 s hold starting 4 s after the lock: passed, devices suspended for 42 s, 0 DCP errors.
  • Boot 2 (17ff5f8e5e), lock, first s2idle 4 s later, five 40 s RTC-timed sleeps: 5 of 5 woke, 2 s after the alarm each (the third was ended after 25 s by a mouse wake), HDMI and panel connected after each, 0 DCP errors, 0 warnings. No USB-C display on this boot.
  • Boot 3 (ca1f32d30f), the same five sleeps with a USB-C display also attached: 5 of 5 woke, 1 to 2 s after the alarm, HDMI and panel connected after each, 0 errors from the HDMI DCP. Also seen, both on main as well: one typec_altmode_update_active warning (drivers/usb/typec/class.c:317) at a USB-C replug before the lock (usb: typec: take the altmode module reference when the mode is already active #3571 fixes it), and the USB-C display's DCP failing its DPTX reconnect after the first sleep (failed to validate DPTX target 0:1: -110, 32 lines over the five wakes).

Before the fix, on main bc87129 and 6c869fd (no changes in pmgr-pwrstate, dcp.c, dcp-fabric.c, the PHY driver or t600x-pmgr.dtsi between 6c869fd and 498d53f):

Sequence (HDMI display attached) main with atc3_usb held
lock, first s2idle 4 s later, 5 rounds 6 of 6 runs hung in the first sleep 2 of 2 runs, 10 of 10 sleeps woke
pm_test=platform, 40 s hold right after the display power-off hung 3 of 3 passed
pm_test=platform, 5 s hold right after the power-off passed passed
pm_test=platform, 40 s hold starting 40 s after the power-off passed not run
first sleep 40 s or 120 s after the lock 10 of 10 woke not run

Thanks for taking a look!

The HDMI output's DCP keeps its firmware running through suspend-to-idle,
and dcp_sleep_hold_phys() puts the output's DP PHY on the wakeup path so
that the PHY's power domain stays up with the DCP's own. On t600x that
domain is atc3_usb. It is off when the power controller probes, so it gets
no GENPD_FLAG_ACTIVE_WAKEUP, and genpd powers it off in the noirq phase
anyway. When the firmware next touches the PHY, the SoC hangs.

On a MacBook Pro 14" M1 Pro (J314s) with an HDMI display attached, the
first s2idle sleep after locking the session hung 6 times out of 6. It
hangs when the devices are held suspended across the point about 30 s
after the HDMI display was powered off, which the lock does: a
pm_test=platform hold of 40 s right after the power-off hung 3 times out
of 3, while a hold of 5 s, or of 40 s starting 40 s later, passed. With
atc3_usb held, the 40 s hold passes and the lock-then-sleep sequence woke
5 times out of 5.

Mark ps_atc3_usb apple,sleep-wakeup-path, as the t604x common_dp domains
are. genpd holds the domain only while a device under it is on the wakeup
path, so nothing changes without an HDMI link.

Signed-off-by: Andreas Fernandez <[email protected]>
@Ante042
Ante042 requested review from a team as code owners November 29, 2026 16:55
@Ante042
Ante042 requested review from Acelogic and malik-na November 29, 2026 16:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T17:04:16.348068Z ae360cc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at ae360ccafb3b

Blockers: None (clean two-line DT fix with matched J314s control-vs-patched hardware verification; approve and wait for fork PR dt-checks / readiness CI to complete green before merging).

Checked:

  • Verified arch/arm64/boot/dts/apple/t600x-pmgr.dtsi (L2168-2177): adds apple,sleep-wakeup-path; to DIE_NODE(ps_atc3_usb) (power-controller@e8), matching the documented property in Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml (L184) and the existing t604x-pmgr.dtsi atc*_common_dp pattern (c1c5e67258).
  • Verified drivers/pmdomain/apple/pmgr-pwrstate.c (L978, L1068-1075): apple,sleep-wakeup-path sets GENPD_FLAG_ACTIVE_WAKEUP on a domain that is off at probe so genpd holds it (and its parent ps_atc3_common, alongside apple,always-on ps_atc3_usb_aon) during s2idle only while a consumer (atcphy3 in t600x-dieX.dtsi L1071) is marked on the wakeup path by dcp_sleep_hold_phys().
  • Verified no impact when HDMI is detached or during deep sleep (s2r), and verified DCO sign-off and matched J314s (M1 Pro, T6000) control-vs-patched evidence (0/6 hangs -> 10/10 wakes across 2 runs, 40 s pm_test=platform hold PASS, 0 atc3_usb transitions during sleep, 0 HDMI DCP errors).
Evidence
  • Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml L184: apple,sleep-wakeup-path is part of the schema.
  • arch/arm64/boot/dts/apple/t600x-dieX.dtsi L1071 & L1078: atcphy3 and atcphy3_xbar consume ps_atc3_usb.
  • arch/arm64/boot/dts/apple/t600x-pmgr.dtsi L2092: parent ps_atc3_usb_aon is apple,always-on;, and genpd keeps parent ps_atc3_common powered while active subdomain ps_atc3_usb remains on.
  • Hardware table on J314s at ae360ccafb3b: baseline main hung 6/6 on lock+4 s s2idle and 3/3 on 40 s pm_test=platform; patched passed 10/10 s2idle wakes and 40 s pm_test=platform hold with /sys/firmware/devicetree/base/.../power-controller@e8/apple,sleep-wakeup-path confirmed live.
  • Thank you for the thorough root-cause analysis and matched before/after testing!

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at ae360cca. App approved (NEON-PR-REVIEW2); J314s (T6000) control-vs-patched row (6/6 baseline hangs -> 10/10 wakes). Two-line T600x pmgr DT only. Merges under the 6-point rule 1 h from now once hosted CI is green, unless you object.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 29, 2026
@github-actions

Copy link
Copy Markdown

Merge readiness at ae360cca: not ready yet

Check Detail
CI at head ok 2 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at ae360cca
Conflicts ok none
PR text ok Risk: two-way · M1 Pro/Max/Ultra (t600x). It only changes anything during s2idle with an HDMI link up.

Areas: area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at ae360cca. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J314s-control-vs-patched;T600x-DT-only. (5) There's no blocking review. (6) Dj was pinged here 63 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 8f8a076 into aurora-silicon:main Nov 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants