Skip to content
Merged
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
175 changes: 172 additions & 3 deletions arch/arm64/boot/dts/apple/t8132-j773g.dts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
* Every node is disabled. On macOS 27.2 the boot loader (aura) fills
* dcpext0's firmware memory and firmware clocks, leaves the main DCP running
* idle, and enables the display subsystem on iBoot's framebuffer; the display
* gate (drivers/soc/apple/display-gate.c) then enables this chain and points
* the display subsystem at dispext0's DART. On the M4 26.6.2 firmware path
* none of it is enabled from here.
* gate (drivers/soc/apple/display-gate.c) then enables the admitted external
* chains and points the display subsystem at their scanout DARTs. On the M4
* 26.6.2 firmware path none of it is enabled from here.
*/
/ {
reserved-memory {
Expand All @@ -81,6 +81,27 @@
no-map;
status = "disabled";
};

dcpext1_text: dcpext1-text {
compatible = "apple,asc-mem";
reg = <0x0 0x0 0x0 0x4000>;
no-map;
status = "disabled";
};

dcpext1_data: dcpext1-data {
compatible = "apple,asc-mem";
reg = <0x0 0x0 0x0 0x4000>;
no-map;
status = "disabled";
};

dcpext1_heap: dcpext1-heap {
compatible = "apple,asc-mem";
reg = <0x0 0x0 0x0 0x4000>;
no-map;
status = "disabled";
};
};
};

Expand Down Expand Up @@ -123,6 +144,17 @@
apple,always-on;
};

/*
* The M4 Air PMGR policy disables ps_dptx_phy; J773g wires lpdptx_phy and
* its boot framebuffer to it. Keep the domain enabled and always on so
* lpdptx_phy does not defer the display subsystem and Linux never powers it
* off under iBoot's HDMI boot framebuffer (e.g. during s2idle or nomodeset).
*/
&ps_dptx_phy {
apple,always-on;
status = "okay";
};

&dcpext0_mbox {
/delete-property/ power-domains;
};
Expand Down Expand Up @@ -155,6 +187,97 @@
memory-region-names = "text", "data", "heap";
};

/*
* Stage 2 only admits a powered pipe. Keep the firmware's state of its
* parents, including an off pipe on a boot without an external display.
* Its CPU remains under hardware control.
*/
&ps_dispext1_sys {
apple,firmware-owned;
};

&ps_dispext1_fe {
apple,firmware-owned;
};

&dcpext1_mbox {
/delete-property/ power-domains;
};

&dcpext1_dart {
/delete-property/ power-domains;
};

&dispext1_dart {
/delete-property/ power-domains;
};

/*
* dcpext1 feeds the three rear ports through UFP endpoint 2, port 0
* (selector 4). Stage 2 needs the processor and its DART disabled while
* validating the live handoff. The display gate then enables its chain.
*/
&dcpext1 {
/delete-property/ power-domains;
apple,connector-type = "USB-C";
phys = <&atcphy0 PHY_TYPE_DP>, <&atcphy1 PHY_TYPE_DP>, <&atcphy3 PHY_TYPE_DP>;
phy-names = "typec0", "typec1", "typec2";
mux-controls = <&atc0_dpxbar 0>, <&atc1_dpxbar 0>,
<&atc0_dpxbar 1>, <&atc0_dpxbar 2>,
<&atc1_dpxbar 1>, <&atc1_dpxbar 2>,
<&atc3_dpxbar 0>, <&atc3_dpxbar 1>, <&atc3_dpxbar 2>;
mux-control-names = "typec0", "typec1",
"typec0-dpin0", "typec0-dpin1",
"typec1-dpin0", "typec1-dpin1",
"typec2", "typec2-dpin0", "typec2-dpin1";
apple,typec-mux-indices = <4 4 4>;
apple,typec-dptx-phys = <0 1 3>;

memory-region = <&dcpext1_text>, <&dcpext1_data>, <&dcpext1_heap>;
memory-region-names = "text", "data", "heap";

typec-routes {
#address-cells = <1>;
#size-cells = <0>;

route@0 {
reg = <0>;
mode-switch;
status = "disabled";

port {
dcpext1_typec0: endpoint {
remote-endpoint = <&typec0_dcpext1>;
};
};
};

route@1 {
reg = <1>;
mode-switch;
status = "disabled";

port {
dcpext1_typec1: endpoint {
remote-endpoint = <&typec1_dcpext1>;
};
};
};

route@2 {
reg = <2>;
mode-switch;
status = "disabled";

port {
dcpext1_typec3: endpoint {
remote-endpoint = <&typec3_dcpext1>;
};
};
};
};
};

/*
* Without this, the PMP firmware faults in the PMC block (0x382800000)
* shortly after it starts on this board. J713 keeps ps_pmc out of Linux
Expand Down Expand Up @@ -195,12 +318,50 @@
};
};

&atc0_dpxbar {
status = "okay";
};

&atcphy0 {
apple,dp-alt-mode;
};

&atc1_dpxbar {
status = "okay";
};

&atcphy1 {
apple,dp-alt-mode;
};

&atc3_dpxbar {
status = "okay";
};

&typec0 {
label = "USB-C Back Middle";

ports {
port@3 {
reg = <3>;
typec0_dcpext1: endpoint {
remote-endpoint = <&dcpext1_typec0>;
};
};
};
};

&typec1 {
label = "USB-C Back Left";

ports {
port@3 {
reg = <3>;
typec1_dcpext1: endpoint {
remote-endpoint = <&dcpext1_typec1>;
};
};
};
};

/* ATC3's port controller (ADT nub-spmi-a0 hpm3). */
Expand Down Expand Up @@ -237,12 +398,20 @@
remote-endpoint = <&atcphy3_typec_lanes>;
};
};

port@3 {
reg = <3>;
typec3_dcpext1: endpoint {
remote-endpoint = <&dcpext1_typec3>;
};
};
};
};
};
};

&atcphy3 {
apple,dp-alt-mode;
status = "okay";

ports {
Expand Down
6 changes: 4 additions & 2 deletions drivers/soc/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ config APPLE_CLPC

config APPLE_DISPLAY_GATE
bool "Apple internal display enable gate"
depends on ARCH_APPLE && OF_DYNAMIC && OF_OVERLAY
depends on ARCH_APPLE || (COMPILE_TEST && KUNIT)
depends on OF_DYNAMIC && OF_OVERLAY
default ARCH_APPLE
help
The T6030 device tree keeps the internal display nodes disabled so
Expand Down Expand Up @@ -572,7 +573,8 @@ config APPLE_DISPLAY_GATE_KUNIT_TEST
that binds late still powers the external displays up. On the
J616c: each external display chain is enabled without a PMP once
its processor has firmware memory, and the display subsystem's
status is never written.
status is never written. On T8132: keep the scanout DARTs of just the
admitted HDMI, Type-C and internal display pipes.

config APPLE_AURORA_BOOT_SECURITY
tristate "Report how the boot chain verified this boot"
Expand Down
3 changes: 2 additions & 1 deletion drivers/soc/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ apple-display-gate-y := display-gate.o t6030-pmp.dtbo.o t6030-j516s-pmp.dtbo.o
apple-display-gate-$(CONFIG_APPLE_DISPLAY_GATE_KUNIT_TEST) += t6031-gate-test.dtbo.o \
t6030-gate-test.dtbo.o \
t8122-gate-test.dtbo.o \
t6041-gate-test.dtbo.o
t6041-gate-test.dtbo.o \
t8132-gate-test.dtbo.o
# The gate adds the interrupt parent from the base tree at boot.
DTC_FLAGS_t6030-pmp := -Wno-interrupts_property
DTC_FLAGS_t6030-j516s-pmp := -Wno-interrupts_property
Expand Down
Loading
Loading