diff --git a/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi index 3e1417dabb3a..3f501aa4c2b6 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi @@ -329,3 +329,135 @@ &avd { status = "okay"; }; + +/* + * Deep sleep: brought up on the J713; the J715 is the same board (same ADT + * apart from the radio island and the ATC PHY trims). + */ +&sleep { + status = "okay"; +}; + +/* Deep sleep needs both CPU clusters' power gates; iBoot enables E's only. */ +&cluster_pwrgate { + status = "okay"; +}; + +/* The ownership file above leaves the enclave domain off; the SEP needs it. */ +&ps_sep { + status = "okay"; +}; + +/* + * The DCP powers its display domains down while blanked + * (appledrm.power_gate_ms): the clock protection slices of its DARTs, as the + * ADT has them, and the internal pipe's PMC interface. + */ +&dcp_dart { + apple,clock-protection = <&ps_prot 42>; +}; + +&disp0_dart { + apple,clock-protection = <&ps_prot 8>; +}; + +&dcp { + apple,pmc-interface = <&pmc_disp0>; +}; + +/* + * Each external DCP powers its CPU, front-end and system domains off around + * a deep sleep. The system domains have a bus bridge in front of their + * block: its link words are 0x800104 past the start of the block's disp-3 + * registers (reg 4 of the external DCP). + */ +&ps_dispext0_sys { + apple,consumer-switched; + apple,bridge-link = <&dcpext0 4 0x800104>; +}; + +&ps_dispext0_fe { + apple,consumer-switched; +}; + +&ps_dispext0_cpu { + apple,consumer-switched; + /* Power-gate retention workaround, as macOS sets it while off. */ + apple,retention-workaround = <0x256cc 0x3 0x3>, <0x256f0 0x3 0x0>; +}; + +&ps_dispext1_sys { + apple,consumer-switched; + apple,bridge-link = <&dcpext1 4 0x800104>; +}; + +&ps_dispext1_fe { + apple,consumer-switched; +}; + +&ps_dispext1_cpu { + apple,consumer-switched; + /* Power-gate retention workaround, as macOS sets it while off. */ + apple,retention-workaround = <0x25b4c 0x3 0x3>, <0x25b70 0x3 0x0>; +}; + +/* + * A deep sleep with a dock attached powers these off: their hosts (the ACIO + * NHIs, the tunneled PCIe ports and the external DCPs) take them down and + * restore them, with these clock protection slices. + */ +&usb4_0_dart { + apple,clock-protection = <&ps_prot 15>; +}; + +&usb4_1_dart { + apple,clock-protection = <&ps_prot 19>; +}; + +&usb4_0_pcie_dart { + apple,clock-protection = <&ps_prot 14>; +}; + +&usb4_1_pcie_dart { + apple,clock-protection = <&ps_prot 18>; +}; + +&dcpext0_dart { + apple,clock-protection = <&ps_prot 5>; +}; + +&dispext0_dart { + apple,clock-protection = <&ps_prot 4>; +}; + +&dcpext1_dart { + apple,clock-protection = <&ps_prot 30>; +}; + +&dispext1_dart { + apple,clock-protection = <&ps_prot 29>; +}; + +/* Native radio recovery is required before admitting system sleep. */ +&pcie0 { + status = "okay"; +}; + +&dart_apcie0 { + status = "okay"; +}; + +&port00 { + clkreq-gpios = <&pinctrl_ap 160 GPIO_ACTIVE_LOW>; +}; + +/* Each ACIO host powers its Type-C PHY down and up around a deep sleep with a dock. */ +&usb4_0_acio { + phys = <&atcphy0 PHY_TYPE_USB3>; + phy-names = "cio"; +}; + +&usb4_1_acio { + phys = <&atcphy1 PHY_TYPE_USB3>; + phy-names = "cio"; +}; diff --git a/arch/arm64/boot/dts/apple/t8132-j713.dts b/arch/arm64/boot/dts/apple/t8132-j713.dts index 440ecff14d4a..150affc93f0f 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713.dts +++ b/arch/arm64/boot/dts/apple/t8132-j713.dts @@ -78,36 +78,6 @@ apple,machine-kind = "MacBook Air"; }; -/* Deep sleep has been brought up and tested on this machine only. */ -&sleep { - status = "okay"; -}; - -/* Deep sleep needs both CPU clusters' power gates; iBoot enables E's only. */ -&cluster_pwrgate { - status = "okay"; -}; - -/* The enclave must take the sleep request, so its driver has to bind. */ -&sep_dart { - status = "okay"; -}; - -/* Only named: the sleep's last refusal reads its state to see the enclave gate. */ -&ps_sep { - apple,firmware-owned; - status = "okay"; -}; - -&sep { - /* - * Without a domain the driver tells the enclave at .suspend, and a sleep - * refused after that finds it gated with its mailbox gone. - */ - power-domains = <&ps_sep>, <&ps_gpio>; - status = "okay"; -}; - /* * The four SN012776 speaker amps, held in hardware shutdown until the sound * card enables them (ADT /arm-io/i2c3/audio-speaker at 0x38 and its @@ -179,133 +149,3 @@ */ firmware-name = "apple/mesacal-j713.bin", "apple/msrk-j713.bin"; }; - -/* - * The DCP powers its display domains down while blanked - * (appledrm.power_gate_ms): the clock protection slices of its DARTs, as the - * ADT has them, and the internal pipe's PMC interface. - */ -&dcp_dart { - apple,clock-protection = <&ps_prot 42>; -}; - -&disp0_dart { - apple,clock-protection = <&ps_prot 8>; -}; - -&dcp { - apple,pmc-interface = <&pmc_disp0>; -}; - -/* - * Each external DCP powers its CPU, front-end and system domains off around - * a deep sleep. The system domains have a bus bridge in front of their - * block: its link words are 0x800104 past the start of the block's disp-3 - * registers (reg 4 of the external DCP). - */ -&ps_dispext0_sys { - apple,consumer-switched; - apple,bridge-link = <&dcpext0 4 0x800104>; -}; - -&ps_dispext0_fe { - apple,consumer-switched; -}; - -&ps_dispext0_cpu { - apple,consumer-switched; - /* Power-gate retention workaround, as macOS sets it while off. */ - apple,retention-workaround = <0x256cc 0x3 0x3>, <0x256f0 0x3 0x0>; -}; - -&ps_dispext1_sys { - apple,consumer-switched; - apple,bridge-link = <&dcpext1 4 0x800104>; -}; - -&ps_dispext1_fe { - apple,consumer-switched; -}; - -&ps_dispext1_cpu { - apple,consumer-switched; - /* Power-gate retention workaround, as macOS sets it while off. */ - apple,retention-workaround = <0x25b4c 0x3 0x3>, <0x25b70 0x3 0x0>; -}; - -/* - * A deep sleep with a dock attached powers these off: their hosts (the ACIO - * NHIs, the tunneled PCIe ports and the external DCPs) take them down and - * restore them, with these clock protection slices. - */ -&usb4_0_dart { - apple,clock-protection = <&ps_prot 15>; -}; - -&usb4_1_dart { - apple,clock-protection = <&ps_prot 19>; -}; - -&usb4_0_pcie_dart { - apple,clock-protection = <&ps_prot 14>; -}; - -&usb4_1_pcie_dart { - apple,clock-protection = <&ps_prot 18>; -}; - -&dcpext0_dart { - apple,clock-protection = <&ps_prot 5>; -}; - -&dispext0_dart { - apple,clock-protection = <&ps_prot 4>; -}; - -&dcpext1_dart { - apple,clock-protection = <&ps_prot 30>; -}; - -&dispext1_dart { - apple,clock-protection = <&ps_prot 29>; -}; - -/* Native radio recovery is required before admitting system sleep. */ -&pcie0 { - status = "okay"; -}; - -&dart_apcie0 { - status = "okay"; -}; - -&port00 { - clkreq-gpios = <&pinctrl_ap 160 GPIO_ACTIVE_LOW>; -}; - -/* Each ACIO host powers its Type-C PHY down and up around a deep sleep with a dock. */ -&usb4_0_acio { - phys = <&atcphy0 PHY_TYPE_USB3>; - phy-names = "cio"; -}; - -&usb4_1_acio { - phys = <&atcphy1 PHY_TYPE_USB3>; - phy-names = "cio"; -}; - -&ane_dart0 { - status = "okay"; -}; - -&ane_dart1 { - status = "okay"; -}; - -&ane_dart2 { - status = "okay"; -}; - -&ane { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/apple/t8132-peripherals.dtsi b/arch/arm64/boot/dts/apple/t8132-peripherals.dtsi index 47cac2a1376e..d4d47bed0d1e 100644 --- a/arch/arm64/boot/dts/apple/t8132-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-peripherals.dtsi @@ -149,7 +149,7 @@ power-domains = <&ps_ane_sys>; /* Include firmware identity MMIO pages below the preload DVAs. */ apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; + status = "okay"; }; ane_dart1: iommu@501820000 { @@ -160,7 +160,7 @@ interrupts = ; power-domains = <&ps_ane_sys>; apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; + status = "okay"; }; ane_dart2: iommu@501840000 { @@ -171,7 +171,7 @@ interrupts = ; power-domains = <&ps_ane_sys>; apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; + status = "okay"; }; dart_ane_companion3: filter@501810000 { @@ -344,8 +344,9 @@ }; /* - * ADT-derived only: keep disabled until an M4 owner qualifies the H16 - * backend and the loader hands off reserved TEXT/DATA preloads. + * Every M4 has the engine. The driver runs it only when the loader + * hands off the reserved TEXT/DATA preloads (memory-region and + * apple,firmware-iovas); without them it refuses to bind. */ ane: ane@500000000 { compatible = "apple,t8132-ane"; @@ -374,7 +375,7 @@ /bits/ 64 <0x302668000 0x302668003>; /* Default layout; the loader supplies per-boot physical reservations. */ apple,firmware-iovas = /bits/ 64 <0x10000000000 0x100000c0000>; - status = "disabled"; + status = "okay"; }; scaler0: scaler@505000000 { diff --git a/arch/arm64/boot/dts/apple/t8132-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8132-pmgr.dtsi index 0dafc5919650..003a46240450 100644 --- a/arch/arm64/boot/dts/apple/t8132-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-pmgr.dtsi @@ -901,6 +901,8 @@ #reset-cells = <0>; label = "sep"; apple,always-on; + /* Only named: the sleep's last refusal reads its state to see the enclave gate. */ + apple,firmware-owned; }; /* The ISP's own power states, children of ISP_SYS */ diff --git a/arch/arm64/boot/dts/apple/t8132.dtsi b/arch/arm64/boot/dts/apple/t8132.dtsi index 2351ddcb98cd..c09548a2d019 100644 --- a/arch/arm64/boot/dts/apple/t8132.dtsi +++ b/arch/arm64/boot/dts/apple/t8132.dtsi @@ -817,16 +817,22 @@ #iommu-cells = <1>; apple,dma-range = /bits/ 64 <0x10000004000 0xffff0000>; apple,dma-offset = /bits/ 64 <0x0>; - status = "disabled"; }; + /* + * Every M4 has the enclave. Its driver must bind on every board: + * the enclave takes the deep-sleep request, and Touch ID and the + * secure storage paths go through it. Without a domain the driver + * tells the enclave at .suspend, and a sleep refused after that + * finds it gated with its mailbox gone. + */ sep: sep@3aa600000 { compatible = "apple,sep"; reg = <0x3 0xaa600000 0x0 0x88000>; mboxes = <&sep_mbox>; mbox-names = "mbox"; iommus = <&sep_dart 0>; - status = "disabled"; + power-domains = <&ps_sep>, <&ps_gpio>; }; sep_mbox: mbox@3aa608000 {