Skip to content

arm64: dts: apple: t6020-j414s: Enable deep sleep by default - #4228

Merged
DjDeveloperr merged 2 commits into
mainfrom
feat/j414s-sleep-tested-dt
Dec 3, 2026
Merged

DjDeveloperr merged 2 commits into
mainfrom
feat/j414s-sleep-tested-dt

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What

Add apple,sleep-tested; to J414s's &sleep node in arch/arm64/boot/dts/apple/t6020-j414s.dts (matching t8122-j613.dts / t8122-j615.dts and the per-board DT opt-in pattern in drivers/soc/apple/sleep.c) and document apple,sleep-tested in Documentation/devicetree/bindings/soc/apple/apple,t6020-sleep.yaml (matching apple,t8140-sleep.yaml).

sleep-t6020.h, Kconfig, and sleep-test.c are untouched, so J416s and J474s keep the apple_sleep.deep=1 / apple_sleep.untested_commit=1 opt-ins until they have their own hardware rows.

All follow-ups from #3999 review (6175485736) are closed on main:

Replaces #4227.

Tested

  • Static & DT build checks at ae70c2bc1293:
    • scripts/checkpatch.pl --strict --git HEAD~2..HEAD: 0 errors, 0 warnings, 0 checks on both commits (384b2d91084a and ae70c2bc1293).
    • make ARCH=arm64 LLVM=1 W=1 apple/t6020-j414s.dtb: clean on /soc/sleep-controller@28e080000.
    • Built arch/arm64/boot/dts/apple/t6020-j414s.dtb node dump (dtc -q -I dtb -O dts, fdtget not installed on build host):
      sleep-controller@28e080000 {
          compatible = "apple,t6020-sleep";
          reg = <0x02 0x8e080000 0x00 0xc000 0x02 0x90280000 0x00 0xc000 0x02 0x9e280000 0x00 0x4000 0x04 0x4e80000 0x00 0x4000 0x02 0x8e08c000 0x00 0x100 0x02 0x8e0a8000 0x00 0x18 0x02 0x8e088000 0x00 0x40 0x02 0x9e5c4000 0x00 0x04 0x02 0x9e2c4000 0x00 0x100 0x02 0x9e114000 0x00 0x100 0x02 0x9e154000 0x00 0x100 0x02 0x9e004000 0x00 0x100 0x02 0x8e038000 0x00 0x200 0x02 0x8e224000 0x00 0x04 0x02 0x9e2cd010 0x00 0x04>;
          reg-names = "ps", "ps-east", "ps-aon", "ps-gfx", "pwrgate", "cpu-start", "cluster", "commit", "wdt", "spmi", "spmi1", "wake", "clk-mux", "pll", "aon-cfg";
          apple,pinctrl = <0x67>;
          apple,pinctrl-skip-pins = <0x82 0x83 0x87>;
          status = "okay";
          apple,wake-enable = <0x0c 0x0e 0x1a 0x1b 0x28 0x2b 0x31 0x32 0x33 0x34 0x36 0x55 0x5a 0x7e 0x7f 0x80 0x81 0x82 0x83 0x84 0x85 0xdf>;
          apple,sleep-tested;
      };
      
    • dt-validate is not installed on the build host; CI dtbs_check covers schema validation.
  • Hardware qualification row on J414s (Mac14,9, M2 Pro 10-core, T6020, OS firmware 27.2, m1n1/boot.bin sha256 196da4c690882ac64a70932e2dbb5affa0828e533117c975633e1b6705a9bd38):
    • The apple,sleep-tested DT property path itself (s->untested = s->soc->untested && !of_property_read_bool(..., "apple,sleep-tested")) is already proven on J613/J615 (t8122). Because the lab J414s stays on stock for physical pickup, no extra Stage 2 DTB boot was run at ae70c2bc1293; the 4/4 J414s qualification row below on main c77250fb4a9d exercises the exact J414s deep-sleep and s2idle paths enabled by apple,sleep-tested;.
    • Kernel: 7.3.0-j414s-qual-c772 (main c77250fb4a9d, tree a27800eeb800, build ID 06dd9b583c8d98644179c91acc7fb402d629a978, Image sha256 9ef2ec2b0a1eeee22d2c4f9f57513bfc7de906e6c13e7d7de832c9860dc5f271, stock config + DTB, with apple_sleep.deep=1 apple_sleep.untested_commit=1).
    • Boot ID: 1cb03ed8-85e9-4c73-a4b0-4d24252fb624, Apple SoC Watchdog + systemd dead-man timer armed and disarmed cleanly.
    • 4/4 sleeps in one boot (suspend_stats = 4/0, zero resets, BAD_LINES = 0, taint unchanged 4 -> 4):
      1. s2idle (rtcwake -d /dev/rtc0 -m freeze -s 15) with default appledrm.s2r_untested=Y (omitted from /proc/cmdline, sysfs parameter read Y; 389c00000.dcp, 289c00000.dcp, and 315c00000.dcp bound): GPU held for sleep: submitted=2083 completed=2083 pending=0 -> GPU released after sleep: running=Ok(0) pending=0; post-wake panel 117/500, eDP-1 connected/enabled/On, kwin_wayland 3024x1964, kscreen-doctor --dpms off/on (Off bl=0 -> On bl=117), dEQP-VK.api.smoke.* 8/8, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi wld0 up.
      2. Deep sleep mux: apple-display-crossbar: replace the T602x selector fields instead of OR-ing them #1 (rtcwake -d /dev/rtc0 -m mem -s 20) after Vulkan GPU load (dEQP-VK.api.smoke.* 8/8 pre-sleep): boot object resumes 0 -> 1, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 7457 us (pending=0); post-wake dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.199 s / 44.1 kHz 2.100 s (rc=0), panel 117/500, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
      3. Deep sleep drm/apple: release a stale DPTX link before borrowing a Type-C route #2 (rtcwake -d /dev/rtc0 -m mem -s 20) after internal-panel DPMS off/on (Off bl=0 -> On bl=117 pre-sleep): boot object resumes 1 -> 2, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 3350 us (pending=0); post-wake dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.197 s / 44.1 kHz 2.084 s (rc=0), panel 117/500, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
      4. Deep sleep HID: haptics for the Apple SPI trackpad #3 (rtcwake -d /dev/rtc0 -m mem -s 20, consecutive): boot object resumes 2 -> 3, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 3040 us (pending=0); post-wake DPMS Off bl=0 -> On bl=117, dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.197 s / 44.1 kHz 2.071 s (rc=0), apple_sep live SEP_SEAL_UNSEAL_OK bytes=226, panel 117/500, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
    • Clean stock return verified (7.3.0-47.fc45.aurora.aarch64, boot b41bdc32-3f5e-4715-b01b-bf3cf76e8569).
    • Archive: work/j414s-qual-c772-20261203/ (SHA256SUMS).

Risk

Two-way. Removing apple,sleep-tested; from t6020-j414s.dts (or passing mem_sleep_default=s2idle) reverts J414s to s2idle default. Scoped strictly to J414s; J416s and J474s remain opt-in.

Not yet

  • J416s and J474s are not enabled here and remain opt-in until they have their own hardware rows.
  • No separate Stage 2 DTB boot at ae70c2bc1293 without apple_sleep.* args was run because the lab J414s is parked on stock for pickup; the apple,sleep-tested property path is proven on J613/J615 and the J414s sleep path is qualified 4/4 above.

Allow the per-board boolean property apple,sleep-tested in
apple,t6020-sleep.yaml, matching apple,t8140-sleep.yaml.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Add apple,sleep-tested to J414s's &sleep node so deep sleep is offered
and selected by default on J414s without apple_sleep.deep=1 or
apple_sleep.untested_commit=1, while keeping the opt-ins on untested
T6020 boards (J416s, J474s).

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 3, 2026 20:49
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m2 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 Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at ae70c2bc: not ready yet

Check Detail
CI at head running running: dt-checks, host-tests
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 ae70c2bc
Conflicts ok none
PR text ok Risk: two-way · . Removing apple,sleep-tested; from t6020-j414s.dts (or passing mem_sleep_default=s2idle) reverts J414s to s2idle default. Scoped strictly to J414s; J416s and J474s remain opt-in.

Areas: area:platform

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

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Frontier review at ae70c2bc1293: good to merge.

  • Scope is right. Only J414s gets deep sleep by default. J416s and J474s also include t6020.dtsi's apple,t6020-sleep node, and they keep the opt-ins until they have their own rows. This replaces #4227, which would have flipped all three.
  • The driver side is already on main: s->untested = soc->untested && !apple,sleep-tested. J613 and J615 use the same switch.
  • The binding has additionalProperties: false, so the yaml entry is needed. Checked locally with dtschema 2026.9 (hosted dt-checks was still queued): dt-doc-validate on the new yaml is clean. The J414s sleep node from the PR body, with apple,sleep-tested, validates clean against it. The same node fails against main's binding ('apple,sleep-tested' does not match any of the regexes), so this PR's binding change is what makes it pass.
  • Hardware: the c772 4/4 qualify (1 s2idle + 3 committed deep sleeps in one boot) ran with untested off on J414s. That's the same driver state this property gives the board, so it covers this head. The J414s has since gone back to its owner, so later T6020 rows come from peers.

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:m2 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.

1 participant