Repository navigation
arm64: dts: apple: t8132-apcie-port2: keep pcie0 sleep tunable register banks - #4007
Conversation
…er banks t8132-apcie-port2.dtsi overrides &pcie0's reg and reg-names to add port2 and phy2, but omitted the five sleep tunable register banks (axi2af, cio3pll, clkgen, phy-block, phy-ip) defined in t8132.dtsi. On boards that include t8132-apcie-port2.dtsi (J604 and J773g), this strips those register windows from pcie0 and causes apple-sleep to refuse deep sleep with "no PCIe tunables for ANS: suspend-to-RAM with it stopped will be refused". Preserve axi2af, cio3pll, clkgen, phy-block, and phy-ip in &pcie0's reg and reg-names. 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. |
The T8132 pcie0 binding takes either the five shared windows or the third port, so a board that lists both, as the J604, the J773g and the iMacs now do, fails dtbs_check on reg and reg-names. Allow the shared windows after the third port's. Signed-off-by: DjDeveloperr <hey@djdev.me>
DjDeveloperr
left a comment
There was a problem hiding this comment.
I pushed c77edccad388 on top of your 3dbff5005e62 (binding only, no rewrite), so someone else has to approve this head. The DT change itself is right. It must not land before a J773g deep-sleep row.
Binding, fixed: at 3dbff500, dt-validate fails on the J604, J773g, J623 and J624: reg ... is too long and reg-names: 'oneOf' conditional failed. apple,pcie.yaml allowed either the five shared windows or port 2, not both. With c77edcca, all six T8132 boards validate the same as main.
Addresses: the five windows match t8132.dtsi and entries 2 to 6 of /arm-io/apcie reg in the J604 and J773g device trees of the public 26.6.2 IPSW: 0x497000000/0x40000, 0x497040000/0x20000, 0x496000000/0x1000000, 0x495046200/0x4000 and 0x495044000/0x4000.
What it changes, per board:
- J604, J623, J624: nothing yet. Their sleep controller is off on main, and nothing else reads these windows. The Risk line should name the iMacs, since
t8132-desktop.dtsiincludes this file. - J773g: a lot. #2763 enabled its sleep controller, so deep is already its default on main. Every deep suspend is refused at the last check (
refused: no tunables to bring ANS's PCIe block back) and the Mac stays up. aura already publishes the tables there, so the missing windows are the only reason for that refusal. With this PR alone, every default suspend becomes a real deep sleep. ANS is stopped, and the APCIe block goes off with Wi-Fi (port 0) and Ethernet (port 2) behind it. - The earlier J773g passes (#2763, #3629) ran with #2770 for port 2, which was stacked on #2762. Both are closed. On main as it is now, the generic reinit in
pcie-apple.chas to bring the two ports back, and I found no J773g row for that.
With #3629 (2c2788a9): alone, #3629 makes s2idle the J773g default, with ANS as the only part named as missing. With both, nothing is missing any more, so deep is the J773g default again and ANS is stopped in each sleep. J623 and J624 stay on s2idle (no CLKREQ#).
Order: #3629 first, with its own J773g row taken without this PR. Then this PR, after the row below. This is #2762 again, which I closed on 12-02 to wait for the multi-port deep sleep (it also had the binding change).
Checked on the merge with main b902937859ec: all six DTBs build, the J713 and J715 DTBs are unchanged, dt-validate matches main, checkpatch --strict is clean on both commits, and the full host tests pass on the series merged together (1028/1028).
Still owed at c77edcca, on top of #3629: J773g: boot shows deep sleep is the default and no deep sleep: or no PCIe tunables for ANS line. Then 3 deep sleeps by RTC (resumes 0 to 3, 0 failed). After each wake: NVMe read and write, end0 at 1000/full, Wi-Fi carrier, SEP hwrng, no SError or new warning. Last, one s2idle cycle. J604: one boot at this head, then one deep sleep chosen by hand with #3629, #4008 and #4009.
There was a problem hiding this comment.
Verdict: MERGE at c77edcc
Checked: I rebuilt the six affected and control T8132 DTBs. J604, J773g, J623 and J624 retain matching reg/name pairs for port 2 and all five shared windows. J713 and J715 retain the nine-window form. The shared addresses and lengths match the T8132 common node. The previous binding rejects the four port-2 name lists and register lengths. The current binding accepts them and passes dt-doc-validate. Hosted DT checks and host tests passed at this head.
The #3629 prerequisite is merged. The author reports J604 deep sleep on the earlier DT revision. The J773g classification and hardware check remain with merge readiness.
|
Schema validation at exact head
J773g committed |
RyanTheTide
left a comment
There was a problem hiding this comment.
The port-2 override retains all five shared windows in the same name order as the common controller. The exact binding and rebuilt DTBs passed schema validation. The J604 deep-sleep result came from an earlier integrated kernel, and the exact hardware row remains pending.
|
J773g (Apple M4 Mac mini, Exact commits / DTB provenance on this boot (single J773g generation):
Verified results:
|
|
Merging at
Not covered here: J604 at this exact head (your 10.5 h deep run was at |
What: Preserve the five sleep tunable register windows (
axi2af,cio3pll,clkgen,phy-block,phy-ip) in&pcie0'sregandreg-namesoverride inarch/arm64/boot/dts/apple/t8132-apcie-port2.dtsi.t8132.dtsidefines those five windows onpcie0, butt8132-apcie-port2.dtsioverwroteregandreg-nameswith onlyconfig,rc,port0,phy0,port2,phy2. On boards that includet8132-apcie-port2.dtsi(J604andJ773g), this strips those register banks and causesapple-sleepto logno PCIe tunables for ANS: suspend-to-RAM with it stopped will be refused. Related to #3629 and #1962.Tested:
3dbff5005e6(base53732c475cb):scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.make LLVM=1 ARCH=arm64 apple/t8132-j604.dtb apple/t8132-j713.dtb apple/t8132-j773g.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 this commit): eliminatedapple-sleep: no PCIe tunables for ANSand verified firmware suspend-to-RAM (deep) across both a short wake test and a 10.5-hour overnight deep sleep (boot object resumes 0 -> 1, NVMe/GPU/display/Wi-Fi/SEP all recovered cleanly), kernel taint8196, 0 failed units, 0 new kernel errors.Risk: two-way door · M4 (
t8132) boards includingt8132-apcie-port2.dtsi(J604,J773g). Restores the exact five windows already declared onpcie0int8132.dtsi.Not yet: Standalone boot at this exact single-commit head
3dbff5005e6and hardware verification onJ773g.