Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,150 @@
&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 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 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";
};
160 changes: 0 additions & 160 deletions arch/arm64/boot/dts/apple/t8132-j713.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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";
};
13 changes: 7 additions & 6 deletions arch/arm64/boot/dts/apple/t8132-peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -160,7 +160,7 @@
interrupts = <AIC_IRQ 630 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_ane_sys>;
apple,dma-range = <0x0 0x0 0x400 0x0>;
status = "disabled";
status = "okay";
};

ane_dart2: iommu@501840000 {
Expand All @@ -171,7 +171,7 @@
interrupts = <AIC_IRQ 630 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_ane_sys>;
apple,dma-range = <0x0 0x0 0x400 0x0>;
status = "disabled";
status = "okay";
};

dart_ane_companion3: filter@501810000 {
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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 {
Expand Down
Loading