Skip to content

arm64: dts: apple: t6040-j614s: deep sleep, wired as on the J616s - #4158

Draft
DjDeveloperr wants to merge 1 commit into
mainfrom
feat/t6040-j614s-deep-sleep
Draft

DjDeveloperr wants to merge 1 commit into
mainfrom
feat/t6040-j614s-deep-sleep

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What: Deep sleep on the 14-inch M4 Pro MacBook Pro (J614s). Its tree gets the J616s wiring the T6040 sleep needs: the APCIE power states held on, the DCP's sleep-host stop and display power, the sleep controller, the SMC wake type and the VDD_CIO request (apple,sleep-pmvc).
Tested: Build only. cpp + dtc of all twelve M4 boards at main f5bf8bf8a2 and at the head: the J616s, J773s and all other DTBs are byte-identical, only the J614s changes. checkpatch --strict clean. The public 27.2 restore trees of the J614s and J616s differ only in the model names and the Wi-Fi module-instance, so the sleep, PCIe, display and SMC nodes are the same hardware.
Risk: two-way · J614s (M4 Pro 14") only. Deep sleep becomes its default sleep state. A sleep that fails ends in a watchdog reset, so the first run needs saved work and a way back. A plain revert undoes it.
Not yet: the J614s row at this head: boot (deep sleep is the default), s2idle x1, rtcwake -d rtc1 -m mem -s 20 x3 with no USB4 partner, then x3 with one; after each: panel, HDMI/USB-C display, Wi-Fi, Bluetooth, SD, NVMe, keyboard, trackpad, 0 new kernel errors. If the first deep sleep resets, the pmVC value macOS writes on a J614s is the missing measurement.

Details

#2215 enabled the sleep on the J616s only. A J614s test on that PR enabled the controller, apple,sleep-wake-type and the two DCP properties, and the Mac reset in its first deep sleep (row). That test left out two things the J616s tree has:

  • apple,sleep-pmvc = <0x101>. Without it the commit does not write pmVC, and the J614s boots with pmVC 0 (read). Every M4 Pro/Max laptop tree that has the property (J616s, J614c, J616c) uses 0x101.
  • ps_apcie_phy_sw held on and pcie0's power domains. The J614s leaves that state disabled, while the sleep's commit clock-gates it and the wake raises it.

The J616s blocks move to t604x-j614-j616.dtsi, which only these two boards include. Tracked in #4155.

The T6040 sleep driver and its windows are in t6040.dtsi, but only the
J616s enables it. The two 14- and 16-inch M4 Pro MacBook Pros share their
PCIe, display and sleep wiring, so move the J616s parts to the shared tree:
the APCIE power states held on, the DCP's sleep-host stop and display
power, and the sleep controller. The J614s also gets the SMC's wake type
and the VDD_CIO request that the J616s, J614c and J616c use.

An earlier J614s test of the controller alone reset the Mac in its first
deep sleep. It had neither the VDD_CIO request nor the APCIE_PHY_SW state
described here.

The J616s device tree is byte-identical.

Signed-off-by: DjDeveloperr <hey@djdev.me>

This branch has not been deployed

No deployments
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.

1 participant