Skip to content

arm64: dts: apple: t6041-j616c: system power state for the port controllers - #2174

Draft
AxxzyWasTaken wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:pr/j616c-usbpd-sleep-ssps
Draft

AxxzyWasTaken wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:pr/j616c-usbpd-sleep-ssps

Conversation

@AxxzyWasTaken

@AxxzyWasTaken AxxzyWasTaken commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #1664 (draft until it lands). It doesn't need #1664's commits to apply.

macOS tells the USB-C port controllers the system power state (SSPS): S3 before a sleep and S0 after it. For a controller with apple,sleep-ssps, the tipd driver does the same around a firmware-driven suspend. The J700, J714s, J716c and J813/J815 have the property; the J616c's four SN201202x controllers don't. This adds it to hpm0, hpm1, hpm2 and MagSafe's hpm5.

The property only matters for a firmware-driven suspend, which T6041 gets from #1664. It has nothing to do with #1889's idle sleep, which is runtime PM. On the J616c, the driver uses the plain SSPS path (no tipd_sleep_ssps_rules()): a failed S3 is a warning, not a refused sleep.

Testing

  • My J616C (32-core M4 Max) has booted DTBs with this property on these four nodes since 9 Nov, with soc: apple: suspend-to-RAM on the M4 Max (T6041, J616c) #1664's suspend-to-RAM. I haven't confirmed that the controllers take S3: the driver logs success only at debug level, and in my sleep tests the log was saved before that point.
  • This branch: the J616c DTB builds, and the decompiled DTB has apple,sleep-ssps on the four usb-pd nodes. No new dtc warnings with W=1. I couldn't run dtbs_check (no dtschema here); the sn201202x binding already has the property.
  • The J614c shares these nodes but is left unchanged: I couldn't test it.

Assisted-by: LLM (Anthropic:Claude Opus 5.5)

@AxxzyWasTaken
AxxzyWasTaken force-pushed the pr/j616c-usbpd-sleep-ssps branch from 7d925f6 to c9140b0 Compare November 21, 2026 09:48
@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks good; approve once the J616c suspend-to-RAM row below is on this head with #1664.

The DT change itself is correct: the four nodes exist in t6041-j614c-j616c.dtsi (hpm0/hpm1 on nub_spmi_a0, hpm5 at 0x8, hpm2 on nub_spmi_a1), all are interrupt-driven, so sn201202x_macos_entry() (drivers/usb/typec/tipd/spmi.c:1288-1296) is never taken and the USBw notifier registered at spmi.c:1028-1036 returns at once (!sn->macos_sleep). Only the plain S3/S0 path in core.c runs, and only when pm_suspend_via_firmware(), so nothing changes until #1664 (still open) lands. dt-checks and host-tests pass.

  1. arch/arm64/boot/dts/apple/t6041-j616c.dts:65-81: the property's only proof is "booted since 9 Nov"; the S3 result is logged at dev_dbg, and on this board the resume side is silent in both directions: without apple,sleep-ssps-rules, drivers/usb/typec/tipd/core.c:2039-2040 sets ret = 0 after the S0 switch, so a controller that stays in S3 after the wake is neither logged nor marked setup_pending. A controller left in S3 is exactly the failure this property can introduce (port or MagSafe charging not coming back), so the row has to show the S0 side by behaviour, not by log lines.
  2. Nit: the J614c shares these nodes through t6041-j614c-j616c.dtsi; if the J616c row passes, consider putting the property in the shared dtsi and asking a J614c owner for the same row, so the two boards don't drift.

HW row: J616c (M4 Max), this head + #1664 on current integration/aurora, default command line, dyndbg="file drivers/usb/typec/tipd/core.c +p"; 5 firmware suspend-to-RAM cycles (rtcwake on rtc1) with a USB device on hpm0, a DisplayPort sink on hpm2 and MagSafe charging; pass = "system power state S3" from all four controllers each cycle, no "didn't take system power state" warning, after each wake the USB device re-enumerates, the display relights and MagSafe reports charging within 10 s; 0 AVC, 0 failed units, no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@AxxzyWasTaken

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora (cacf35543b4d5) as a9cb8bbd6db2 (dt_binding_check, CHECK_DTBS=y, and checkpatch --strict 0/0/0 all clean). Queued for the 5-cycle rtcwake firmware S2R row on J616C as soon as #1664 v2 is boot-tested.

@AxxzyWasTaken
AxxzyWasTaken force-pushed the pr/j616c-usbpd-sleep-ssps branch from c9140b0 to a9cb8bb Compare November 21, 2026 23:55
…ollers

macOS tells the USB-C port controllers the system power state (SSPS),
S3 before a sleep and S0 after it. The tipd driver does the same around
a firmware-driven suspend for a controller with apple,sleep-ssps, as the
J700, J714s, J716c and J813/J815 have. Give it to the J616c's four
SN201202x controllers: hpm0, hpm1, hpm2 and MagSafe's hpm5.

Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
@AxxzyWasTaken
AxxzyWasTaken force-pushed the pr/j616c-usbpd-sleep-ssps branch from a9cb8bb to 7b1a2f3 Compare November 22, 2026 15:10
@AxxzyWasTaken

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora (eb6d9ec180e8 → 7b1a2f307a0b) to resolve the EOF conflict in arch/arm64/boot/dts/apple/t6041-j616c.dts after #2750/#2753. Zero semantic changes (t6041-j616c.dtb W=1 clean, 4 apple,sleep-ssps properties intact). Keeping Draft pending the paired #1664 5-cycle S2R row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants