Repository navigation
arm64: dts: apple: t8142-j815: external displays over USB-C (on #2383) - #1806
RyanTheTide merged 4 commits into
Conversation
|
J813 run (MacBook Air 13-inch M5, Mac17,3, 27.0 stub). No display yet. Three stops before any cable matters, two of them in the device tree. Built as asked: kernel 143c4c4 (plus one local primary-plane format patch), aura 91e2ffbe as ESP Stage 2. Nothing plugged in at each boot. Boot 1, branch as it is. Boots, desktop fine. Both Boot 2, loader creating the phandle. Both hand-overs The nodes have no Boot 3, unpatched loader, device tree fixed (diff below). Both hand-overs Plug tests on boot 3:
The device-tree change for boot 3. The clock rates are my reading of diff --git i/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi w/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
index 983793a03769..7e3c7f138611 100644
--- i/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
+++ w/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
@@ -67,7 +67,12 @@ dcpext0: dcp@506e00000 {
mboxes = <&dcpext0_mbox>;
mbox-names = "mbox";
iommus = <&dcpext0_dart 23>;
- clocks = <&clkref>;
+ /* J813 test: firmware clocks, /arm-io/dispext0 clock-ids, as the internal DCP lists its own. */
+ apple,clock-ids = <369 432>;
+ clocks = <&clkref>, <&dcp_fw_clk369>, <&dcp_fw_clk432>;
+ clock-names = "clock-154", "firmware-0", "firmware-1";
+ /* The loader finds its power domains through this phandle. */
+ phandle = <&dcpext0>;
apple,bw-scratch = <&pmgr_dcpext0 0 5 0>;
apple,bw-doorbell = <&pmgr_dcpext0 1 6>;
apple,iomfb-surfaces = <0 0 1 0>;
@@ -133,7 +138,12 @@ dcpext1: dcp@3aae00000 {
mboxes = <&dcpext1_mbox>;
mbox-names = "mbox";
iommus = <&dcpext1_dart 23>;
- clocks = <&clkref>;
+ /* J813 test: firmware clocks, /arm-io/dispext1 clock-ids, as the internal DCP lists its own. */
+ apple,clock-ids = <372 433>;
+ clocks = <&clkref>, <&dcp_fw_clk372>, <&dcp_fw_clk433>;
+ clock-names = "clock-154", "firmware-0", "firmware-1";
+ /* The loader finds its power domains through this phandle. */
+ phandle = <&dcpext1>;
apple,bw-scratch = <&pmgr_dcpext1 0 5 0>;
apple,bw-doorbell = <&pmgr_dcpext1 1 6>;
apple,iomfb-surfaces = <0 0 1 0>;
@@ -254,3 +264,34 @@ &dispext1_dart {
&dcpext1_dart {
apple,dma-range = <0x100 0x0 0x10 0x0>;
};
+
+/*
+ * J813 test: rates from /arm-io clock-frequencies (ids 0x100..0x1ad): 369 is
+ * 300 MHz, 372 is 468.75 MHz; 432 and 433 have no entry.
+ */
+/ {
+ dcp_fw_clk369: clock-dcp-firmware-369 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <300000000>;
+ clock-output-names = "dcp_firmware_369";
+ };
+ dcp_fw_clk432: clock-dcp-firmware-432 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ clock-output-names = "dcp_firmware_432";
+ };
+ dcp_fw_clk372: clock-dcp-firmware-372 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <468750000>;
+ clock-output-names = "dcp_firmware_372";
+ };
+ dcp_fw_clk433: clock-dcp-firmware-433 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ clock-output-names = "dcp_firmware_433";
+ };
+};Not tested: two displays at once, sleep, a USB-C to DP/HDMI adapter. I have the full dmesg of each step if you want one. Assisted-by: Claude Fable 5.2 |
…rmware clocks
Without apple,clock-ids the external processors failed to bind ("bind
failed: -22"): the DCP's clock setup needs the firmware's clock list, as
the internal disp0 node has it. The J813 and J815 ADTs agree:
/arm-io/dispext0 clock-ids 369 and 432, dispext1 372 and 433. Describe
them as disp0's are, with fixed rates from /arm-io clock-frequencies
(entries 0x71 and 0x74, ids from 0x100: 300 MHz and 468.75 MHz; 432 and
433 have no entry).
Found and measured by gig3m on a J813 (aurora-silicon#1806, the
same values); checked against the J815's live ADT.
Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Also reformats the carveout call (clang-format 20.1.8). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
|
@gig3m Thank you for the J813 run. All three stops are addressed. Kernel head is 7346085; the loader is
Also fixed:
Still open, and not addressed here:
None of this is booted yet, on either Air. If you try it again, the most useful logs are the AFK lines for endpoints 24 and 2a at boot ( Assisted-by: Claude Opus 5.5 |
1b8cd02 to
ee86c16
Compare
|
Retest on J813 (Mac17,3, boot firmware 27.0): both ports light up a monitor. Kernel: integration/aurora d89d8c0 + this PR at ee86c16 (+ #1732, #1805). Loader: aura main 2175c483 + Boot, nothing plugged
Monitor, one port at a time (1920x1080@60, USB-C)
USB, after the monitor had been on each port (NuPhy Air75 V2 keyboard, full speed)
Still there
No Not tested: SuperSpeed devices, a monitor and a USB device at the same time, two monitors, an adapter, sleep with a monitor attached. AFK lines for 0x24 and 0x2a at bootFront port: plug, then unplugRear port: monitor plug, unplug, then keyboardI have the full dmesg of each step (with Assisted-by: Claude Fable 5.2 |
|
Great to hear that! Thanks a lot for testing and logs |
|
Added possible audio support here, still not sure, couldn't test it |
|
DisplayPort audio on J813 (e4bdeb8, aura b97ef3a8 on main 2175c483): the cards come up, playback does not work yet. Two findings. 1. The loader drops the control tunables on J813. Kernel: In the J813 ADT both tables are 336 bytes (14 entries). + if (!tunable->size && !tunable->offset && !tunable->mask && !tunable->value) {
+ n_tunables = j;
+ break;
+ }
+
if (tunable->size != 4) {2. With the tunables in place, the stream still underruns at once. Monitor on the rear port ( The display processor does not complain: no One cycle (with tunables)Also new on this run: a boot with the monitor already attached (rear port, cold reboot). Not tested: the front port, a native USB-C monitor with speakers, other rates or formats. I have the full dmesg of both runs. Assisted-by: Claude Fable 5.2 |
|
Five more cases from the "not tested" list, J813, kernel at ee86c16:
Still not tested: two monitors, SuperSpeed devices, a real (not test) sleep with a monitor. Assisted-by: Claude Fable 5.2 |
On the J813 (and the J815, same ADT layout) both display ADMACs lost their
control tunables: admac-dispextN-ced-ssw's ssw-tunables is 336 bytes, one
real entry (offset 0, size 4, mask 1, value 1) then 13 all-zero entries,
and dt_append_acio_tunable() refused the size-0 entry, so neither
apple,tunable-ced nor apple,tunable-ssw reached the DT ("ACIO tunable has
invalid size 0", "no ADT tunables for admac-dispext0-control").
Found and tested by gig3m on a J813 (aurora-silicon/linux#1806): with the
table ended at its first all-zero entry both tables are copied
(apple,tunable-ced 168 bytes, apple,tunable-ssw 12 bytes). DP audio
playback still underruns on its own; that is a separate problem.
Suggested-by: gig3m (GitHub)
Assisted-by: Claude Opus 5.5
|
@m0d16l14n1 a J813 result on the macOS 27.2 (26B123) stub, with Linux at EL2: the external display works.
Three fixes that came out of it, as m0d16l14n1#2 against this branch:
|
3595ab8 to
c2bee55
Compare
|
The branch is rewritten (old head 3595ab8; the description above has the details) and the PR is out of draft. Most of the display work has landed in @gig3m @sithglan, thank you both for the J813 runs that got this working. If you have a monitor handy, a quick re-run on c2bee55 with the aura branch named above would be the J813 row for this final shape. Assisted-by: Claude Opus 5.5 |
|
Thanks for rebuilding this on top of what has already landed. Sharing One thing in the last commit: If the crossbar has to be there before dcpext probes, the robust fix is probe ordering: a device-link or softdep from the dcpext side, or module autoload through the crossbar's OF match table. That works the same whether the driver is built in or a module. If it really must be built in, please change it in the shared config for everyone and say why in the commit. The deferred-probe timeout (-110) you saw is a good thing to quote there. We can run boot and no-regression rows on our M1 Pro, M2, M4 Pro and A18 Pro. |
|
The loader side is now a PR: aurora-silicon/aura#391 (the same three commits, rebased on aura Assisted-by: Claude Opus 5.5 |
c2bee55 to
4e6ffec
Compare
|
J813 (MacBook Air 13" M5, macOS 27.2 stub), one external display on each USB-C port in turn: an XYM F156P1 portable monitor on a plain USB-C cable (DP alt mode), 1920x1080. Setup:
Result:
🤖 Generated with Claude Code |
|
Thanks for the J813 row on both USB-C ports, and to gig3m for running it. Nothing else is open from our side on 4e6ffec. GitHub now reports a conflict with integration/aurora, so it can't merge as it is. Could you rebase it? The DTS content can stay as it is; the rows cover it. |
The N1 PCIe functions (with their aliases) and the video encoder's status overrides were each written twice in t8142-j813.dts, the second copies coming in with merges. Drop the second copy of each. The built t8142-j813.dtb is byte-identical before and after. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
t8142-j813-j815-sleep.dtsi describes suspend-to-RAM for both M5 Airs, but only t8142-j813.dts included it, and the nodes around it were in the J813 board file alone: the CPU cluster power gate, the internal display's power words (dcp_power, and the DCP's apple,display-power), the DCP DART's PS write-disable word and the PMU's SPMI wake source. J815 therefore had no sleep controller, no DCP firmware stop, and its boot P core never powered down in WFI. All of them are words of the T8142 PMGR, DCP and nub-spmi0, the same on both boards (the sleep dtsi already lists NUB.SPMI0.SW3 among the wake sources taken from the J815 ADT). Move the cluster gate, dcp_power and the DCP/DART properties into t8142-j813-j815.dtsi, the PMU source into the sleep node, and include the sleep dtsi from t8142-j815.dts. t8142-j813.dtb keeps every node and value (only the order of /soc children changes). t8142-j815.dtb gains exactly J813's nodes, except that the sleep node lists only the DCP as display coprocessor until J815 describes its external displays. Fixes: 4de8bf0 ("arm64: dts: apple: t8142-j813: Describe suspend-to-RAM") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
J815 enables the Neural Engine and both JPEG engines; J813 left them disabled although they are the same T8142 nodes, with the same ADT entries (J813 27.0.1 ADT: ane ane-type 528, IRQs 751 and 764; jpeg0, jpeg1 and dart-jpeg IRQs 1156, 1159 and 1157). The boot loader hands the ANE preload over by the apple,t8142-ane compatible and disables the node when there is none; the JPEG engines need no firmware. Move the video encoder, ANE and JPEG enables into t8142-j813-j815.dtsi so both boards share them. t8142-j815.dtb is unchanged; t8142-j813.dtb changes only in those nine status properties. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The J815 has the J813's two USB-C ports with the same blocks behind them: dispext0/1 with their DARTs, the ATC PHYs' DisplayPort side, the display crossbars and the routes to the Type-C connectors. Include t8142-j813-dcpext.dtsi as the J813 does. Everything in it stays disabled until the loader hands the processors over and enables them. On a J815 (macOS 27.2 stub) with the hand-off, nothing plugged in: both hand-offs are okay, both external processors bind to the display subsystem, and DP-1 and DP-2 appear as disconnected connectors next to the panel. Signed-off-by: Nick <nekreshen@yandex.ru>
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 15.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
4e6ffec to
185dc8f
Compare
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 15.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
|
@RyanTheTide rebased onto cc14570. #2383 conflicts with integration too, so its three commits are rebased here as well. There were two DTS conflicts:
This PR's own commit is unchanged apart from the trailer, and Assisted-by: LLM (Claude:Opus 5.5) |
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 15.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
9923648
into
aurora-silicon:integration/aurora
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. The tables alone are not enough on a port iBoot lit at boot: the frontend keeps scanning out of the pages they map after the hand-off. Once the carveouts and the firmware segments are reserved, every page the scanout and PIODMA streams map must lie in a no-map reservation or a /memreserve/ entry; one page outside refuses the processor, and the log names the first such IOVA and its address. A translating stream logs how many pages it maps. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 12.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh; the least is gcc's stage1-dev-audit text). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. The tables alone are not enough on a port iBoot lit at boot: the frontend keeps scanning out of the pages they map after the hand-off. Once the carveouts and the firmware segments are reserved, every page the scanout and PIODMA streams map must lie in a no-map reservation or a /memreserve/ entry; one page outside refuses the processor, and the log names the first such IOVA and its address. A translating stream logs how many pages it maps. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 12.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh; the least is gcc's stage1-dev-audit text). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. The tables alone are not enough on a port iBoot lit at boot: the frontend keeps scanning out of the pages they map after the hand-off. Once the carveouts and the firmware segments are reserved, every page the scanout and PIODMA streams map must lie in a no-map reservation or a /memreserve/ entry; one page outside refuses the processor, and the log names the first such IOVA and its address. A translating stream logs how many pages it maps. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 12.7 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh; the least is gcc's stage1-dev-audit text). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. The tables alone are not enough on a port iBoot lit at boot: the frontend keeps scanning out of the pages they map after the hand-off. Once the carveouts and the firmware segments are reserved, every page the scanout and PIODMA streams map must lie in a no-map reservation or a /memreserve/ entry; one page outside refuses the processor, and the log names the first such IOVA and its address. A translating stream logs how many pages it maps. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 8.4 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh; the least is gcc's stage1-dev-audit text). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
…nning iBoot preloads dcpext0 and dcpext1 with the internal DCP's image on the T8142 Airs (J813, J815) and leaves them running idle, each with its own data carveouts (region-id-73/74 and 88/89) and a locked firmware DART. Linux had no way to adopt them, so a display on a USB-C port never lit. For each disabled apple,t8142-dcpext node, in its own FDT transaction: check that iBoot started the processor (ADT nub, DISPEXTn power words, locked and translating firmware stream), keep the inherited page tables, reserve the carveouts (per controller) and the live firmware segments, publish the firmware version, add the external frontend's DART to the display subsystem, and enable the node with its mailbox, DARTs, power domains and Type-C routes. A processor that fails a check stays disabled with its routes, so the port keeps working as USB. The outcome is recorded in /chosen as aurora,dcpextN-handoff. The scanout and PIODMA streams may be idle: a stream that is not locked or has no translating root has nothing to keep. Once a translating root is seen, any failure to collect or reserve its tables refuses that processor, so the kernel is never handed a table the DART still walks. The lock and the root are read from the registers before a DART view is made, so a locked, translating stream whose view cannot be made refuses the processor too. The tables alone are not enough on a port iBoot lit at boot: the frontend keeps scanning out of the pages they map after the hand-off. Once the carveouts and the firmware segments are reserved, every page the scanout and PIODMA streams map must lie in a no-map reservation or a /memreserve/ entry; one page outside refuses the processor, and the log names the first such IOVA and its address. A translating stream logs how many pages it maps. dt_reserve_m5_display_segments() takes the alias and nub now; for an external processor it only inspects a DART that iBoot locked. The segment bound stays 128 MiB for every processor: on the J815 the external ones list 30.9 MiB and the internal one 111.4 MiB. If disp0 already lists the external frontend's DART (the J704 tree does), it is not appended a second time. It is built into every image: with it, each Stage 1 flavour keeps at least 8.4 KiB of room below the DCP log buffer with clang and with gcc (tools/stage1_size.sh; the least is gcc's stage1-dev-audit text). Follows dmitzsaz's J704 hand-off (aura 3f29689, 9b44044). Tested with the kernel side (aurora-silicon/linux#1806), together with the phandle fix that follows: - J813, 27.0 stub (gig3m): both hand-offs okay, both processors probe, and a monitor lights up on either port, hot-unplug included; - J813, 27.2 stub at EL2 (sithglan): 2560x1440 through a dock on the rear port, the dock's USB3 hub at 10 Gb/s; - J815, 27.2 stub, nothing plugged in: both hand-offs okay, both processors bind, DP-1 and DP-2 appear disconnected. Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Signed-off-by: Nick <nekreshen@yandex.ru>
Conflicts: t8142-j813.dts, t8142-j815.dts (took integration: #1806 moved the board enables to t8142-j813-j815.dtsi and cluster_pwrgate there); dropped the now-redundant venc/ANE/JPEG enables from t8142-j813-j815.dtsi. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Stacked on #2383 (J813 and J815 share the same SoC nodes, including the sleep controller the external-display file refers to). Its three commits come first here and drop out once it merges. The new commit is the last one.
Rebased onto
integration/auroracc14570, #2383's three commits included, since #2383 conflicts too. Two DTS conflicts:t8142-j815.dts: the newapple,sleep-ssps-ruleson hpm0/hpm1, next to the shared sleep include. Both are kept.t8142-j813-j815.dtsi. They are now there once.The DTS content of the last commit is unchanged. The J813/J815 DTBs build, and
CHECK_DTBSwith the DCP and display-subsystem schemas is clean.What's left of this PR
Most of what this PR started with is now in
integration/aurora:apple,t8142-dcpextprocessors, and the DPTX controller endpoints;t8142-j813-dcpext.dtsiitself, with the firmware clocks and the LIOA windows.The branch has been rebuilt on top of that, and one change remains:
arm64: dts: apple: t8142-j815: External displays on the USB-C ports. The J815 includes
t8142-j813-dcpext.dtsias the J813 does: the same two USB-C ports and the same blocks behind them. Decompiled, the J815's new nodes are identical to the J813's apart from phandle numbers:Everything stays disabled until the loader hands the processors over.
The crossbar needs no config change: the shared
asahi.configbuildsMUX_APPLE_DPXBARas a module, and it autoloads from its OF table (apple,t8142-display-crossbar). dcpext defers until it binds. On the J815 kernel (DRM_APPLE=y,MUX_APPLE_DPXBAR=m), both external DCPs bind 8.35 s into boot. An earlierj813.configchange was dropped after review.DisplayPort audio is no longer in this PR. On the J813 the cards and ELD come up, but playback underruns at once (gig3m's 11-14 run: the ADMAC completes descriptors about every 192 µs and nothing paces it). I haven't found a fix since, and we can't test it on the J815. It will come back as its own PR once playback works.
Loader
The hand-off (
dt_set_t8142_dcpext) is aurora-silicon/aura#391, rebased on current auramainand now built into every image, not only the ESP Stage 2. Without it both nodes stay disabled and nothing changes.Testing
J813 (gig3m, sithglan), on earlier heads of this PR with the aura hand-off (now aura#391):
Those heads carried the same display code that's now upstream, plus this DT.
J815 (us), with no external display to plug in: the boot with this DT (plus the DP-audio graph that's no longer here) and the aura hand-off gives:
FDT: dcpext0 handoff: okayanddcpext1 handoff: okay;apple-drm display-subsystem: bound 506e00000.dcp, then3aae00000.dcp);DP-1andDP-2connectors appear next toeDP-1, disconnected.The PR's J815 nodes are a subset of that booted tree; the rest is the audio graph and tunables the loader adds.
DTBs (before this rebase): J704, J813 and J815 build. J704 and J813 were byte-identical to arm64: dts: apple: t8142: Give J813 and J815 the same SoC nodes #2383's head.
CHECK_DTBSshows no new warnings.checkpatch clean.
J813 row on the previous head (gig3m, 11-21): a monitor on each USB-C port in turn, with the internal panel up throughout.
Part of the J815 bring-up; board results are summarised in discussion #135.
Assisted-by: LLM (Claude:Opus 5.5)