From 3dfa8658bcc69f773cb48b5e3d0dcfc6b248a6e1 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:17:39 -0500 Subject: [PATCH] arm64: dts: apple: t6040-j614s: deep sleep, wired as on the J616s 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 --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 6 ++++ arch/arm64/boot/dts/apple/t6040-j616s.dts | 36 ------------------- .../arm64/boot/dts/apple/t604x-j614-j616.dtsi | 33 +++++++++++++++++ 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index 9e9a6eb1c543d..a3ec0c7fc6d28 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -26,6 +26,12 @@ brcm,board-type = "apple,mriya"; }; +&smc { + apple,sleep-wake-type; + /* VDD_CIO: bit 8 set, bit 0 keeps port 0's CIO rail powered across sleep. */ + apple,sleep-pmvc = <0x101>; +}; + &panel { compatible = "apple,panel-j614", "apple,panel-mini-led", "apple,panel"; width-mm = <302>; diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index fe2591c545be2..a7da6a1fe5764 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -200,33 +200,6 @@ */ #include "t6040-usb4-routers.dtsi" -/* - * The internal PCIe controller (Wi-Fi/Bluetooth, SD reader) needs APCIE_GP, - * APCIE_SYS_GP and APCIE_PHY_SW on top of the always-on ANS/APCIE_ST* - * states (ADT apcie0 clock-gates). iBoot leaves them on. The driver keeps - * internal links up through suspend-to-idle and cannot retrain them after - * a power cycle, so describe them as always-on: Linux now holds what it - * needs instead of relying on iBoot's state. - */ -&ps_apcie_gp { - apple,always-on; - status = "okay"; -}; - -&ps_apcie_sys_gp { - apple,always-on; - status = "okay"; -}; - -&ps_apcie_phy_sw { - apple,always-on; - status = "okay"; -}; - -&pcie0 { - power-domains = <&ps_apcie_sys_gp>, <&ps_apcie_phy_sw>; -}; - /* The debug UART on the DebugUSB port; it is not the console. */ &serial0 { status = "okay"; @@ -235,12 +208,3 @@ &ps_uart0 { status = "okay"; }; - -&t6040_sleep { - status = "okay"; -}; - -&dcp { - apple,sleep-host-stop; - apple,display-power = <&dcp_power>; -}; diff --git a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi index 0f82cd917b866..3f459333e6adc 100644 --- a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi +++ b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi @@ -3483,6 +3483,39 @@ #include "t604x-usb4-typec.dtsi" +/* + * The internal PCIe controller (Wi-Fi/Bluetooth, SD reader) needs APCIE_GP, + * APCIE_SYS_GP and APCIE_PHY_SW on top of the always-on ANS/APCIE_ST* + * states (ADT apcie0 clock-gates). iBoot leaves them on. The driver keeps + * internal links up through suspend-to-idle and cannot retrain them after + * a power cycle, so describe them as always-on: Linux now holds what it + * needs instead of relying on iBoot's state. + */ +&ps_apcie_gp { + apple,always-on; + status = "okay"; +}; + +&ps_apcie_sys_gp { + apple,always-on; + status = "okay"; +}; + +&ps_apcie_phy_sw { + apple,always-on; + status = "okay"; +}; + +&pcie0 { + power-domains = <&ps_apcie_sys_gp>, <&ps_apcie_phy_sw>; +}; + &t6040_sleep { apple,gp-pcie = <&pcie0>; + status = "okay"; +}; + +&dcp { + apple,sleep-host-stop; + apple,display-power = <&dcp_power>; };