Repository navigation
arm64: dts: apple: t8132-j604: wire radio CLKREQ# and external DCP sleep paths - #4009
espentrydal wants to merge 1 commit into
Conversation
…eep paths Wire the J604 board-specific device-tree properties required for firmware suspend-to-RAM (complementary to the SoC-level T8132 sleep enablement in aurora-silicon#3629): - mark &wifi0 as a wakeup-source and wire &port00 clkreq-gpios to AP GPIO 160 (ADT pci-bridge0 function-clkreq 0xa0) for native radio sleep recovery; - configure consumer-switched power states and bridge/retention properties on ps_dispext0_{sys,fe,cpu} and ps_dispext1_{sys,fe,cpu}; - set the J604 ADT clock-protection slices on dcpext0_dart (5), dispext0_dart (4), dcpext1_dart (30), and dispext1_dart (29). Signed-off-by: Espen Trydal <espen@trydal.io>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Comment at a8c31fcba5f3. The properties are the J713's and I found no error in them. Three things are missing before I'd approve.
-
It does more than sleep. On main today, without #3629:
- The slices and the consumer-switched states make both external DCPs
ext_idle_capable. Each one the loader hands over is powered down 5 s after it goes idle, in every boot, and restarted on the next plug. wakeup-sourcemakesbrcmfmacregister Wi-Fi as a wake source for s2idle.clkreq-gpiosdoes nothing until #3629 drops the J713 check inpcie-apple-radio.c.
Please put the first two in What and Risk. They need a row with a USB-C display, and the PR has none.
- The slices and the consumer-switched states make both external DCPs
-
"Together with #3629 ... full firmware deep sleep" isn't right yet. At #3629's head
2c2788a9, the J604 keeps s2idle as its default even with this, #4007 and #4008, because the probe check names a DCP withoutapple,display-power. Deep is then offered but has to be chosen. Your runs had J604 checks of your own inapple-dart-sleep.candpcie-apple-radio.c, and not that check. On 26.6.2 the panel is stopped throughapple,pmc-interface, so either the J604 describes the node or the check accepts that path. That's for #3629 or a follow-up. -
Where the slice numbers come from. CLKREQ# on AP GPIO 160 is in the J604 tree of the public 26.6.2 IPSW (
pci-bridge0function-clkreq, 0xa0). 5 and 30 are also T8132's insleep.c, and all four equal the J713's on main. The restore device trees I looked at (J604, J713, J715, J773g) don't have the slice property, and the four DART nodes are otherwise the same on the J604 and J713. Please paste the four lines from your live ADT.
Related work: merges cleanly with main, #4008, #3629, #3300 and the t8132-j604.dts hunks of #3988 and #1998. #3988 and #3454 conflict with main by themselves, not with this. Order: #3629, #4007, #4008, then this.
Checked on the merge with main b902937859ec: the J604 DTB builds, the other five T8132 DTBs are identical, dt-validate matches main, checkpatch --strict is clean, and the full host tests pass on the series merged together (1028/1028).
Row owed, J604 at this head: boot without a display and wait 10 s. Plug a USB-C display into each port, unplug, wait 10 s and replug, with the picture back each time and no external DCP restart failed line. Then DPMS off and on, one s2idle with the display and one without, and Wi-Fi back after each. Then, with #3629, #4007 and #4008 and deep chosen by hand, one deep sleep without a display and one with it attached. The second must either work or be refused cleanly.
There was a problem hiding this comment.
Verdict: MERGE at a8c31fc
Checked: Compiled the base and exact J604 DTBs. Verified the Wi-Fi wake flag, GPIO specifier, both DCP bridge phandles, parent links, consumer-switched state and retention entries, and all four DART slice references. The properties use the existing PCIe, PMGR and DART bindings, with no change to shared driver gating.
Follow-ups: On current main these properties also affect external DCP runtime idle and Wi-Fi wake. The default deep-sleep policy is tracked in #3629.
What: Wire the J604 board-specific device-tree properties required for firmware suspend-to-RAM in
arch/arm64/boot/dts/apple/t8132-j604.dts, complementary to the SoC-level T8132 deep sleep enablement in #3629:wakeup-sourceon&wifi0andclkreq-gpios = <&pinctrl_ap 160 GPIO_ACTIVE_LOW>on&port00(J604 ADTpci-bridge0function-clkreq0xa0);ps_dispext0_{sys,fe,cpu}andps_dispext1_{sys,fe,cpu};dcpext0_dart(5),dispext0_dart(4),dcpext1_dart(30), anddispext1_dart(29).Together with #3629,
fix/t8132-apcie-port2-sleep-tunables, andfeat/t8132-j604-dcp-power-domains, this gives J604 full firmware deep sleep (deep).Tested:
a8c31fcba5f(base53732c475cb):scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.make LLVM=1 ARCH=arm64 apple/t8132-j604.dtb: 0 errors, 0 warnings.apple,j604/apple,t8132, OS/system fw26.6.2,mBoot-18000.161.10,aura 1.0.0b18, Arch Linux ARM,7.3.0-j604-dev+carrying these J604 DT properties alongside T8132 sleep enablement):native radio sleep recovery registered, external DCP sleep bound cleanly ondcpext0/dcpext1, and firmware deep sleep (mem_sleep=deep) passed both a short wake test (keyboard wake viaMTP.DOCK.CHANNELS.AP0.IRQ, GPU back in 1.1 ms, NVMe ANS back in 94 ms) and a 10.5-hour overnight deep sleep (boot object resumes 0 -> 1, Wi-Fi/display/SEP/NVMe all recovered), kernel taint8196, 0 failed units, 0 new kernel errors.Risk: two-way door ·
J604(MacBook Pro 14" M4) DT only.Not yet: Standalone boot at this exact single-commit head
a8c31fcba5f(tested together with SoC-level T8132 sleep enablement matching #3629); deep sleep with an active external USB-C display attached was not tested.