Skip to content

WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) - #1806

Draft
m0d16l14n1 wants to merge 43 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-dp-altmode-wip
Draft

m0d16l14n1 wants to merge 43 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-dp-altmode-wip

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

WIP. Displays work on J813 (both ports, gig3m); not yet tried with a display on J815. Stacked on #1532 (the J815 device tree); the net change is the commits after #1532's merges: 0434a61...m0d16l14n1:linux:j815/t8142-dp-altmode-wip

External displays over USB-C (DisplayPort alt mode) on the T8142 MacBook Airs, J813 and J815. Opened as a draft so a J813 owner can try it as well. @gig3m, if you have time to test it on your J813, that would help a lot. It needs the aura side too (below).

What's here

Commit Author What
phy: apple: Enable the T8142 DisplayPort sequence dmitzsaz (cherry-pick, J704) T8122 AUX/AUSPLL/lane sequences on T8142; LIOA + common-config calibration from the loader before AUX
phy: apple: Release the T8142 PIPE boot hold dmitzsaz (cherry-pick, J704) clears the PIPE override hold the loader leaves, so the dummy backend locks
phy: apple: atc: T8142: Keep USB without the DisplayPort LIOA bank us a DT without the lioa window probes as before, DP off, USB intact
drm/apple: Order T8142 DPTX after Type-C PHY configuration dmitzsaz, adapted route admission after the PHY suppliers; fixed crossbar PCLK1 for T8142's PHYs; limited to apple,t8142-dcpext so T6050's routes keep their order
drm/apple: Admit the T8142 external display processors us apple,t8142-dcpext on the upstream firmware 27 external profile (adopt the live session, one DPTX port, EDID from sink metadata); a failing processor joins as an unusable pipe, the panel goes on
arm64: dts: apple: t8142-j813-j815: External displays on the USB-C ports us t8142-j813-dcpext.dtsi: dcpext0/1, mailboxes, DARTs, bandwidth slots, crossbars, PHY LIOA windows, Type-C graph; included by both J813 and J815, all disabled until the loader enables it
arm64: dts: apple: t8142-j813-dcpext: Give the external DCPs their firmware clocks us apple,clock-ids 369/432 and 372/433 (gig3m's J813 stop 2)
drm/apple: T8142 dcpext: open the DPTX controller, and the ports on DPTX_ENDPOINT us the endpoints macOS 27.2 binds on a J815 (gig3m's stop 3)
dt-bindings: apple: T8142 external DCPs and their PHYs' LIOA window us schema for the above
selftests: apple-dcp, atc: follow the T8142 DisplayPort PHY and route changes us host-test fixtures
drm/apple: T8142 dcpext: take the audio interface on dcpav-interface-ep us DP audio: the audio endpoint becomes a per-profile value; T8142's is 0x29 (below)
dt-bindings: dma, sound: T8142 display ADMAC, its control block and DP audio us apple,t8142-display-admac (fallback apple,t6050-display-admac), apple,t8142-admac-control, apple,t8142-dpaudio
arm64: dts: apple: t8142-j813-j815: DisplayPort audio of the external displays us t8142-j813-dpaudio.dtsi, included by both Airs: per display an ADMAC, its control block, its isochronous DART and power state, and the audio node linked to dcpextN

dmitzsaz's J704 tree is the T8142 reference for this. His PHY commits are taken as they are, with authorship and sign-off kept.

The board facts

  • Both external DCPs are preloaded by iBoot with the internal DCP's image and left running idle; data carveouts region-id 73/74 (dcpext0), 88/89 (dcpext1); crossbars 0x40304c000 / 0x40b04c000; bandwidth scratch = pmgr bwr-agent DISP_EXT0 (3) / DISP_EXT1 (4); mailbox IRQs 853-856 / 925-928.
  • dcpext0 → front port (ATC0), dcpext1 → rear port (ATC1): one processor per port, so two displays need no arbitration.
  • J813: the stock 27.0 J813AP and J815AP ADTs differ only in speakers, AOP firmware name, trackpad personality, CLPC limits and product strings. Nothing display, Type-C or display-audio differs, so J813 includes the same files.

DisplayPort audio

The T6050 (J714s) design, with T8142's values from the J815AP ADT:

  • Each external display engine feeds its DisplayPort audio from its own ADMAC (one TX channel) behind its isochronous DART, stream 30, all in DISPEXTn_ADMA (parent DISPEXTn_SYS, which the running processor keeps up).
  • dp-audio1 → admac-dispext0 (0x5_0614_0000, IRQ 894) for dcpext0; dp-audio2 → admac-dispext1 (0x3_aa14_0000, IRQ 969) for dcpext1. Control blocks: IRQs 896 and 971. PMGR: 0x420 and 0x3b0.
  • macOS 27.2 on a J815 drives the same blocks: DCPAVAudioDMADelegate on dp-audio1, an AudioDMAController with one channel, DAX0TX, on admac-dispext0, and DCPAVAudioInterfaceProxy on the EPIC service dcpav-audio-interface-epic.
  • Endpoint: T6050's desktop firmware announces that service on 0x2b, and Linux expects it there. The T8142 DCP image (27.2) lists its endpoints as dcpav-controller-ep (0x24), -power, -sac (0x26), -device (0x27), -service (0x28), dcpav-interface-ep (0x29), dcpdptx-port-ep (0x2a), dcpdptx-hdcp-ep (0x2b). That puts the audio interface on 0x29; macOS binds dcpdptx-hdcp-interface on 0x2b on a J815. So the T8142 profile takes it on 0x29.
  • The ADMAC and its control block use T6050's driver through the fallback compatible. The boot loader copies the control blocks' ADT tunables by their admac-dispextN-control aliases; aura main has that (6ddaaa30), and so does the aura branch below.
  • The DCP side starts unless appledrm.hdmi_audio=0.

Boot loader side (aura)

Branch: m0d16l14n1/aura@main...j815/t8142-dp-altmode-wip (not a PR yet)

  • dmitzsaz's kboot: T8142: export DisplayPort LIOA and common configuration banks (cherry-pick)
  • ours: kboot: T8142: Hand over the external display processors iBoot left running: for each disabled apple,t8142-dcpext, checks that iBoot started it (nub, DISPEXTn power words, locked translating firmware stream), keeps its page tables, reserves carveouts and firmware, publishes the version, then enables the node with its mailbox, DARTs, power domains and Type-C routes in one FDT transaction. A failed check leaves the port as plain USB; the outcome is in /chosen/aurora,dcpextN-handoff. ESP Stage 2 only (the plain image has no room).

It builds on current aura main, but it was written before kboot_display_handoff.c. It should probably move into that framework before it becomes a PR. I'd like a boot result first.

Status

  • J813 (gig3m, 27.0 stub): both ports light up a 1920x1080@60 monitor (one at a time), unplugging leaves the panel running, and the rest of the machine is unaffected.
  • J815 (27.2 stub): both external processors are handed over and boot (DPTX controller on 0x24, both remote ports on 0x2a, "DCP booted"); not tried with a display yet.
  • DP audio: built (J813 and J815 DTBs, W=1, no new warnings); not tried, as no display was at hand.
  • Not done: USB4 tunnels (DisplayPort over Thunderbolt), sleep with an external display, HDMI (no HDMI port on the Airs).
  • Risk to USB: dmitzsaz's PHY flags change USB parking on both ports (park_dummy_phy, restore_after_pd_off, clear_boot_hold). So a test should check plain USB on both ports, with and without a display.

How to test (J813 or J815)

  1. Kernel from this branch, aura Stage 2 from the aura branch above (ESP Stage 2 build).
  2. Boot with nothing plugged in: USB on both ports (a stick or keyboard) as before? dmesg | grep -iE 'dcpext|atcphy|typec' and /chosen/aurora,dcpext{0,1}-handoff (cat under /proc/device-tree/chosen/).
  3. Plug a DisplayPort/USB-C monitor (or a USB-C→DP/HDMI adapter) into each port in turn: does it light up? cat /sys/class/drm/card*-DP-*/status, modetest -c.
  4. Unplug/replug, then both ports at once.
  5. Audio, on a monitor with speakers: aplay -l should list a card for the display; play to it (speaker-test -D hw:<card> -c 2 -t sine) or pick it in the desktop. Useful logs: dmesg | grep -iE 'admac|dpaudio|ep:29|audio' (with dyndbg="file afk.c +p" for the AFK announcements).

Logs from step 2 are useful even if nothing lights up.

Part of the J815 (MacBook Air 15-inch, M5, T8142) bring-up; board results in discussion #135.

Assisted-by: Claude Opus 5.5

m0d16l14n1 and others added 28 commits November 11, 2026 16:56
J704 and J815 describe their boards on top of the T8142 inventory in
t8142.dtsi, but J813 still defines its own root, CPUs, timer, AIC and
UARTs, and its fragments define the pmgr and DART nodes that the
inventory also has. A board that includes t8142.dtsi therefore cannot
use the J813 fragments: the labels are defined twice. That blocks the
J815, which shares most of them.

Include t8142.dtsi in J813 and enable what it uses, as J815 does. Turn
the fragments' pmgr, AOP, AVD, DCP, display, PCIe, PMP and MTP DART
definitions into references that keep J813's values. Enable the two USB
DARTs, which the inventory disables at the same paths.

The flattened J813 tree is unchanged apart from explicit
status = "okay", interrupt-parent now inherited from the root, and the
inventory's extra USB DART labels: compared with dtc -I dts -O dts -s
before and after, with phandle numbers removed.

Not tested on J813 hardware.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
J815 has J813's PMGR power domains, PMP, QSPI and FPWM. Include
t8142-j813-peripherals.dtsi, which J813 now builds on t8142.dtsi, in
place of the board's own PMGR and MTP DART enables. The PMP takes the
J815 board-id from the ADT (0x26).

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set
in a J815 tree that included the whole J813 board.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 ADT describes both Type-C ports like J813's: ATC PHYs, DWC3
controllers, DARTs and the CD3218B controllers on the same buses.
Include t8142-j813-usb.dtsi.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. A SuperSpeed Plus hub
and the USB 2/3 devices behind it enumerate, and USB-C headphones play
audio.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-display.dtsi and describe the J815 panel: 15.3-inch,
2880x1864 (2880x1800 below the notch), 326 x 211 mm.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. With the macOS 27.0 DCP
firmware this needs the FW27 display support in Linux aurora-silicon#1413; the console
and a KWin session run on the panel.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 GPU is J813's. Include t8142-j813-gpu.dtsi.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. With the macOS 27.0
firmware this needs Linux aurora-silicon#1413; the GPU driver initializes and KWin
renders through Mesa.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-avd.dtsi: J815 has J813's AVD, DART and power domain.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. With avd-fw-v5-t2 the
decoder probes and decodes through v4l2-request/VA-API: H.264 High 1080p
and HEVC Main 720p in mpv (vaapi-copy, one AVD interrupt per frame, no
kernel errors).

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-isp.dtsi. The J815 ADT gives the ISP sensor-type 0x72
(J813: 0x71).

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. The ISP firmware boots
and the camera streams.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-n1.dtsi for the N1 on apcie port 0. Describe the N1's
three PCI functions and alias wifi0 and bluetooth0 to them, so the
loader can fill in the factory MAC and BD addresses, as on T6050.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. Wi-Fi connects to WPA2
networks, and Bluetooth LE devices pair and reconnect. Both use the
factory addresses.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-audio.dtsi for the AOP, the AP and NUB pin
controllers, the ADMACs and the I2C buses with the headphone jack codec
and speaker amplifiers. J815 has six speaker amplifiers where J813 has
four, so keep J813's sound card and the AOP audio service disabled.
The J815 speaker layout is a separate change.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board, with audio enabled. The
AOP boots and its services come up. This exact variant, with audio
disabled, has been compile-tested only.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
The J815's AOP "als" service is an ST VD6286, as on the M4 Pro, not
T8140's CT817. Give the service device its compatible so aop_als binds
and sends the per-device calibration.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in
a J815 tree that included the whole J813 board. The sensor reports lux
and colour temperature.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
The discovered SMC temperatures carry no power rails and no SoC die
zone. Add the total system, AC input and 3.8 V rail power, the AC and
battery voltages and the AC current, and J704's T8142 die key list for
the SoC die thermal zone.

Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set
in a J815 tree that included the whole J813 board.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
From the J815 ADT (macOS 27.0): the SEP is a pre-booted
iop-sep,ascwrap-v6 at 0x30a600000 with its ASC mailbox at +0x8000. Its
t8110 DART uses the BIT(40) input aperture, as on T8132. The Touch ID
sensor is on spi2 (0x3a5108000, 8 MHz, CS0, power domain SPI2 under
SPI_P), with power on NUB GPIO 36 and data-ready on AP GPIO 200. Alias
the SEP so the loader can reserve its firmware and copy the boot
manifests onto the node, and expose the two sensor pins.

The SEP and its DART stay disabled: the SEP driver enables them.

Tested on J815 with the J815 SEP profile: the SEP attaches, the sensor
binds on spi2 and comes up in about 40 ms, and fingerprints enrol and
match (sudo with the finger).

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Match the existing DT and public driver interfaces: keep the specific fallback chains, T8142-only ALS, eight ISP power domains versus fourteen on T8140, and the two-mailbox/six-region T8142 GPU profile. Preserve the constraints on other SoCs. No DT resource values change.

Validated with dtschema 2026.9 strict document/reference checks and targeted processed-schema positive and negative cases. Full DTB validation and the draft J813 hardware gate remain separate.

Signed-off-by: Diljit Singh <hey@djdev.me>
Carry byte-exact schema files from reviewed aurora-silicon#1423 at 18fa06f so the shared J813/J815 DT can be checked without inventing a second binding implementation.

Original binding updates by Thomas Glanzmann, signed off in commits 9afc945 and bb9ad0e. This is binding metadata only; no driver or speaker-protection adoption or parent edge is added. The M5 merge lane retains ownership of aurora-silicon#1423. Later identical binding changes coalesce in an ordinary merge.

Signed-off-by: Diljit Singh <hey@djdev.me>
Identify the J815 native profile with a T8142-specific compatible while retaining the PCI1900 fallback. The generic driver continues to match the host/PCI ID and obtain firmware data from its root board table; no firmware/platform/protocol values are invented. Keep all three wire27 properties required for the older PCI-only T6050 profile and forbid mixing those properties into the native profile.

Only the J815 endpoint compatible changes. Shared SoC/J813 DT inputs and runtime resources remain unchanged. The J815 board firmware-table prerequisite is aurora-silicon#1530.

Signed-off-by: Diljit Singh <hey@djdev.me>
Preserve the current shared T8142 CPU topology, OPP power data and
trackpad actuator, along with the J813 firmware clock providers.
Reconcile T8142 binding profiles with the current T6050 sensor services
and preserve the T8140 ISP firmware memory and sensor power domains.
Match the existing J813/J815 fw-data crash-log region and its ordered
seven-region tuple. Preserve the six-region maximum for other GPUs.
Keep main's complete ISP binding, preserving the T8140/Neo sensor-domain
order and T8142 eight-domain case. All added and removed feature lines
in the remaining 15 DT and binding files match the preceding parent.

The complete bindings directory matches the validated aurora-silicon#1534 integration:
eight binding documents and 32 candidate/32 main GPU schema controls.
No repeated schema test or new compiled-DTB/hardware result is claimed.
J815 audio stays disabled here. Keep the underscore loader alias until
compatible-loader qualification/adoption; no warning filtering.

Preserve published ancestry and require fresh current-head Host/DT CI.
The required J813 shared-DT boot and existing loader/rollout gates remain.
No boot, audio playback, image build or protection-policy change.

Assisted-by: LLM
Add the N1 control/Wi-Fi/Bluetooth PCI functions and wifi0/bluetooth0
aliases already used by J815, so the loader can populate the factory
addresses on J813. Keep the change board-local and omit the untested SEP
alias. Do not change Bluetooth experimental module options.

Based on the patch and owner report by @gig3m in linux#1532 comment
6828183980. The supplied block is carried exactly; its PCI topology
matches J815. Symbolic source checks preserve all307 original nodes and
properties and add only the four PCI nodes/two aliases. This is not a
new compiled-DTB or whole integrated hardware qualification.

The owner reports five boots/daily use of the 97f1472 feature on a
2b05915 composition with this block/local display patch, firmware26.6.2.
GPU and SEP remain untested; Bluetooth pairing required opt-in flags.
The independent Aura165 alias qualification/adoption gate remains.

Assisted-by: LLM
Retain the parent's PMGR node layout and aurora-silicon#1527's newly merged ps_pmp
always-on property, including the SRAM supplier. Keep current main's
cpuidle source and its WFI/PSCI handling. All14 other feature line sets
are unchanged; the owner-provided J813 N1 targets stay byte-exact.

Symbolic checks cover PMP address/supplier/always-on and factory aliases
on J813 and J815 in parent and child. This is not a compiled DTB or new
physical boot result. Require fresh CI; keep the Aura165 loader alias
qualification/adoption gate and J815 physical rollout limits.

Assisted-by: LLM
Carry gig3m's node from linux#1532 comment6837248959 exactly. The J813
27.0 ADT supplies the same VD6286 ALS service as J815. The owner reports
illuminance and color-temperature readings using installer-supplied
per-device calibration on the previously stated composed tree.

Keep calibration loading in aop_als; firmware-name would select the
different CT817 setup-port calibration path. Existing nodes/properties
are preserved and the added ALS node equals J815's. This source check
is not a new DTB build or physical boot. Require fresh CI and retain
the independent Aura165 alias qualification/adoption gate.

Based-on: @gig3m's patch and owner report6837248959
Assisted-by: LLM (Codex)
Preserve the complete prior J815 board description and append main's
complete MCC enablement, including its shared cache definition. Keep
main RTC and binding updates alongside the existing bring-up features.
The shared MCC node is inherited disabled on J813; J815 is enabled as
on main. The old J815 audio graph and SEP two-file feature are preserved.

Metaschema checks caught a pre-existing duplicate agx-g17s enum in main.
Remove its redundant trailing occurrence, preserving the allowed set
and every other condition; retain current main's entry and ordering.

Keep published ancestry and require fresh CI. Existing loader-alias,
review and physical qualification limits remain; no hardware claim.

Assisted-by: LLM (Codex)

Carry intervening main673f6184 J700-only update; every reviewed/tested input is byte-identical, so validation is reused without repeated tests.
Run the T8122 AUX, AUSPLL and lane sequences for T8142. Apply
loader-supplied LIOA and common-configuration calibration before AUX,
using separately claimed resources. Refuse DP without the complete
calibration bundle.

Serialize lane validation with Type-C mux setup so DCP sees lanes only
after AUX is ready. No board identity or out-of-resource MMIO mapping is
needed.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
(cherry picked from commit df6cd4a in
 dmitzsaz/linux)
Signed-off-by: Nick <nekreshen@yandex.ru>
A port left at reset by the loader retains bit 16 of the nonselected
PIPE override. The dummy backend cannot acknowledge its lock while this
hold is asserted. Clear it before enabling that backend on T8142,
including ports which the loader did not initialize.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
(cherry picked from commit def4169 in
 dmitzsaz/linux)
Signed-off-by: Nick <nekreshen@yandex.ru>
A device tree written before DisplayPort was described has no "lioa"
window. Probe as before then and leave DisplayPort off, instead of
failing the probe and taking USB down with it.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Run a T8142 external processor's route admission in the fallible Type-C
finish phase, after every supplier has applied its hardware state. DCP
then observes completed AUX and lane setup without polling for PHY
readiness.

Release an unasserted DP-alt owner and leave a pin assignment with no
sink unallocated, so the pipe can serve a display on another port.

T8142's Type-C PHYs are of the T8122 generation and report no link
configuration: give the crossbar their fixed pixel clock (PCLK1, 8b/10b)
when DCP brings a link up.

Based on dmitzsaz's J704 commit 3829b86 ("drm/apple: Order T8142
DPTX after Type-C PHY configuration") and the crossbar clock of his
dcp_direct_crossbar_link(), limited here to apple,t8142-dcpext so
that the T6050 firmware 27 routes keep their order.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
dcpext0 and dcpext1 of the T8142 (MacBook Air M5: one per USB-C display,
J704: HDMI) run the internal DCP's firmware 27 image; iBoot leaves them
running idle and the boot loader hands them over. Give them the T6050
external profile's shape: adopt the live session, one DPTX port, EDID
from the sink metadata. A processor that fails to probe or bind joins as
an unusable pipe and the internal panel goes on.

Not booted.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Describe the two external display processors of the T8142 Airs, their
mailboxes and bandwidth scratch slots, the per-ATC display crossbars,
the PHYs' LIOA windows and the Type-C graph links: dcpext0 serves the
front port, dcpext1 the rear one.

iBoot leaves both processors running idle; the boot loader checks each,
reserves its firmware and enables it with its mailbox, DARTs and route.
Until then every node here stays disabled and the ports are plain USB.

Addresses, interrupts and bandwidth agent indexes are from the J815AP
ADT. The J813AP 27.0 ADT differs from it only in speakers, AOP firmware
name, trackpad personality, CLPC limits and product strings, so both
boards include the file. Not booted on either.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@gig3m

gig3m commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

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 /chosen/aurora,dcpextN-handoff read no device tree node. The loader needs a phandle on the dcpext node (fdt_get_phandle in dt_set_t8142_dcpext), and the node has none: the alias is a path and nothing else refers to it. The J815 DTB from this branch has none either.

Boot 2, loader creating the phandle. Both hand-overs okay, nodes enabled. Then on both:

apple-dcp 506e00000.dcp: external display processor unusable (bind failed: -22); the other displays go on without it

The nodes have no apple,clock-ids, and the clock setup in dcp.c returns -EINVAL without it. The J813 ADT gives /arm-io/dispext0 clock-ids [369, 432] and /arm-io/dispext1 [372, 433].

Boot 3, unpatched loader, device tree fixed (diff below). Both hand-overs okay, both processors DCP booted, card1-DP-1 and card1-DP-2 exist. But at boot, on both:

apple-dcp 506e00000.dcp: DPTX transport ready but port 0 service not announced
apple-dcp 506e00000.dcp: Failed to start DPTX endpoint: -110

Plug tests on boot 3:

  • USB keyboard, front port then rear port: works on both.
  • Monitor (USB-C, powered from the port), front port: no signal. The same monitor and cable show a picture on this Mac in macOS 27.2.1.
apple-dcp 506e00000.dcp: allocated Type-C DPTX PHY 0
apple-dcp 506e00000.dcp: dcp_dptx_connect: dptx service for port 0 not enabled   (x6)
sn201202x 1-0c: cable revalidation failed after 3 attempts
apple-dcp 506e00000.dcp: Type-C DPTX reconnect failed after 5 retries: -19
  • Monitor, rear port: the same on 3aae00000.dcp with allocated Type-C DPTX PHY 1.
  • Monitor in the rear port and keyboard in the front port: keyboard works.
  • New at every USB unplug, on the PHY of that port: phy-apple-atc 403000000.phy: Failed to lock pipehandler. Not seen on this Mac before this branch. USB kept working.
  • sn201202x 1-0c: cable revalidation failed after 3 attempts on every monitor plug, with a cable that works in macOS.

The device-tree change for boot 3. The clock rates are my reading of /arm-io clock-frequencies (369 is 300 MHz, 372 is 468.75 MHz, 432 and 433 have no entry), so treat them as a guess:

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

Retain the existing board extraction and owner follow-ups while taking
integration/aurora at 5d112b1. Main provides the merged
T8142 PMU and encoder definitions and preserves J815 enablement.

All parent files merged cleanly. Keep the existing disp0_piodma alias;
loader qualification and coordinated alias migration remain separate.
No full kernel, DTB or hardware qualification is claimed here.

Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>
… changes

The host fixtures model struct apple_atcphy and the display routes
themselves, and stopped compiling with this series: the PHY's
configuration applies T8142's banked DisplayPort calibration
(regs.lioa, tunables.dp_lioa/dp_common_config, apple_tunable_apply), and
the route's finish and set phases go through dcp_t8142_ext() and
dcp_typec_route_apply().

- The PHY fixtures (phy.py, quiesce.py, dwc3/mocks.c, atc-usb3-tests.py)
  carry the new fields; apple_tunable_apply is a no-op, as none of the
  modeled PHYs has dp_banked_tunables.
- quiesce.py stubs dcp_t8142_ext() (the modeled processors are not
  T8142 externals) and dcp_typec_route_apply(); transaction.py replaces
  that stub with the real dcp_typec_route_apply(), which dcp_typec_route_set()
  now calls for every mode.

apple-dcp 88/88 and atc-usb3-tests 37/37 (all mutations killed) on this
branch.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
m0d16l14n1 added a commit to m0d16l14n1/aura that referenced this pull request Nov 14, 2026
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>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@gig3m Thank you for the J813 run. All three stops are addressed. Kernel head is 7346085; the loader is j815/t8142-dp-altmode-wip at b97ef3a8.

  1. No phandle on the dcpext node (aura b97ef3a8). dt_set_t8142_dcpext() now gives the node a phandle when it has none (fdt_generate_phandle), as the other hand-offs in kboot.c do. Nothing in the DT has to refer to it.

  2. No apple,clock-ids (90ee825). This uses your values, which the J815's live ADT matches exactly: dispext0 369/432, dispext1 372/433. The rates are clock-frequencies entries 0x71/0x74: 300 MHz and 468.75 MHz, with no entry for 432/433. It's in t8142-j813-dcpext.dtsi, so both Airs get it.

  3. port 0 service not announced, -110 (002bae8). The T8142 dcpext had the T6050 external profile, which opens firmware 27's DPTX_ENDPOINT_V2 (0x2c) and no DPTX controller. macOS 27.2 on a J815, read from its IORegistry under iop-dcpextN-nub in a hypervisor run, binds these per processor:

    • AppleDCPDPTXController (dcpav-/dcpdp-controller-epic, units 0 and 1) on 0x24;
    • AppleDCPDPTXRemotePort (dcpdptx-port-epic, units 0 and 1) on 0x2a;
    • HDCP on 0x2b, and nothing on 0x2c.

    dmitzsaz's J704 tree opens the same. The profile now opens the controller first, takes the ports on 0x2a and expects two of them. Type-C still uses port 0.

Also fixed:

  • dt-checks: the DCP binding gains apple,t8142-dcpext, and the ATC PHY binding gains T8142's lioa window (134c625). Local CHECK_DTBS on j813/j815 leaves only the existing disp0_piodma alias warning.
  • host-tests: the apple-dcp and atc fixtures follow the PHY and route changes (7346085). apple-dcp 88/88 and atc-usb3 37/37 locally.

Still open, and not addressed here:

  • phy-apple-atc … Failed to lock pipehandler at every unplug. It's probably the park_dummy_phy behaviour from the J704 PHY flags. I'd like your dmesg around one unplug, if you still have it.
  • sn201202x … cable revalidation failed with a cable that works in macOS.

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 (dyndbg on afk.c), then one monitor plug on each port.

Assisted-by: Claude Opus 5.5

DjDeveloperr and others added 2 commits November 14, 2026 00:16
Merge ec396a4 without rewriting the existing series.
Resolve the GPU-binding overlap by retaining T8142 in the non-legacy
profile list while keeping main's duplicate removal and G17 dispatch
fixes.

Metaschema/reference checks, five T8142 memory-ABI cases and 378 finite
non-target comparisons pass, including the G17c/G17s compatible pair.
The incoming G17 dispatch blocks are identical to main. Both parent
board property maps and all four dependent board/layer checks pass.
DTS and SEP/audio feature files are unchanged by the merge.

Keep the existing loader-alias and physical/policy qualification gates.
No kernel/DTB or hardware qualification is claimed for this merge.

Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>
…de-wip

The selftest mocks gain aurora-silicon#1532's cio_sleep next to this branch's T8142
DisplayPort tunables.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1
m0d16l14n1 force-pushed the j815/t8142-dp-altmode-wip branch from 1b8cd02 to ee86c16 Compare November 14, 2026 11:37
@gig3m

gig3m commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

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 + j815/t8142-dp-altmode-wip b97ef3a8, as Stage 2 on the ESP.

Boot, nothing plugged

  • /chosen/aurora,dcpext0-handoff and dcpext1-handoff: both okay.
  • Both processors probe. card1-DP-1 and card1-DP-2 exist, disconnected.
  • Endpoint 0x24: four AppleDCPDPTXController services per processor (channels 1, 3, 5, 7). Endpoint 0x2a: two AppleDCPDPTXRemotePort per processor (channels 1, 3).

Monitor, one port at a time (1920x1080@60, USB-C)

  • Front port (403000000.phy, dcp@506e00000): DP-1 connected, picture.
  • Unplug: DP-1 disconnected, panel carries on.
  • Rear port (40b000000.phy, dcp@3aae00000): DP-2 connected, picture.
  • Internal panel, Wi-Fi, Bluetooth, ALS and Touch ID enclave unaffected.

USB, after the monitor had been on each port (NuPhy Air75 V2 keyboard, full speed)

  • Rear (40a280000.usb) and front (402280000.usb): enumerates, keys work, clean disconnect.

Still there

  • Failed to lock pipehandler, on both ports. It follows the xHCI removal at the switch from USB to DP, about 1 s before allocated Type-C DPTX PHY. The unplug from DP mode does not print it. It also follows each keyboard unplug, so it comes with every xHCI teardown from USB mode. Nothing seems to break because of it.
  • AFK service DCPDPService admission failed: -19 and dcpdp-service-epic ... unsupported on channel 3 at each plug; the display works anyway.

No cable revalidation failed this time.

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 boot
[    0.394572] apple-dcp 506e00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 1
[    0.395251] apple-dcp 3aae00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 1
[    0.395312] apple-dcp 506e00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 3
[    0.396032] apple-dcp 3aae00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 3
[    0.396094] apple-dcp 506e00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 5
[    0.396819] apple-dcp 3aae00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 5
[    0.396828] apple-dcp 506e00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 7
[    0.397582] apple-dcp 3aae00000.dcp: AFK[ep:24]: new service AppleDCPDPTXController on channel 7
[    0.401029] apple-dcp 506e00000.dcp: AFK[ep:2a]: new service AppleDCPDPTXRemotePort on channel 1
[    0.401819] apple-dcp 506e00000.dcp: AFK[ep:2a]: new service AppleDCPDPTXRemotePort on channel 3
[    0.402272] apple-dcp 3aae00000.dcp: AFK[ep:2a]: new service AppleDCPDPTXRemotePort on channel 1
[    0.403075] apple-dcp 3aae00000.dcp: AFK[ep:2a]: new service AppleDCPDPTXRemotePort on channel 3
Front port: plug, then unplug
[  160.788864] xhci-hcd xhci-hcd.7.auto: remove, state 1
[  160.810101] xhci-hcd xhci-hcd.7.auto: USB bus 2 deregistered
[  160.810110] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  160.811576] xhci-hcd xhci-hcd.7.auto: USB bus 1 deregistered
[  160.813845] phy-apple-atc 403000000.phy: Failed to lock pipehandler
[  161.796725] apple-dcp 506e00000.dcp: dcp_dptx_disconnect(port=0)
[  161.796735] apple-dcp 506e00000.dcp: allocated Type-C DPTX PHY 0
[  161.821274] apple-dcp 506e00000.dcp: AFK service DCPDPService admission failed: -19
[  161.823702] apple-dcp 506e00000.dcp: AFK optional dcpdp-service-epic (DCPDPService) is unsupported on channel 3
[  162.031802] apple-dcp 506e00000.dcp: dcp_hotplug() connected:0 valid_mode:0 nr_modes:15
[  162.032925] apple-dcp 506e00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:15
[  162.292603] apple-dcp 506e00000.dcp: set_digital_out_mode finished:8252
[  163.306884] apple-dcp 506e00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:15
[  163.310607] apple-dcp 506e00000.dcp: set_digital_out_mode finished:8498
[  219.763909] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  219.764783] xhci-hcd xhci-hcd.7.auto: USB bus 2 deregistered
[  219.764792] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  219.767334] xhci-hcd xhci-hcd.7.auto: USB bus 1 deregistered
[  219.769717] apple-dcp 506e00000.dcp: dcp_hotplug() connected:0 valid_mode:1 nr_modes:15
[  219.862994] apple-dcp 506e00000.dcp: dcp_dptx_disconnect(port=0)
Rear port: monitor plug, unplug, then keyboard
[  225.870664] xhci-hcd xhci-hcd.7.auto: remove, state 1
[  225.871272] xhci-hcd xhci-hcd.7.auto: USB bus 2 deregistered
[  225.871279] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  225.872020] xhci-hcd xhci-hcd.7.auto: USB bus 1 deregistered
[  225.874191] phy-apple-atc 40b000000.phy: Failed to lock pipehandler
[  225.876584] xhci-hcd xhci-hcd.7.auto: irq 125, io mem 0x40a280000
[  226.877977] apple-dcp 3aae00000.dcp: dcp_dptx_disconnect(port=0)
[  226.877989] apple-dcp 3aae00000.dcp: allocated Type-C DPTX PHY 1
[  226.900963] apple-dcp 3aae00000.dcp: AFK service DCPDPService admission failed: -19
[  226.903148] apple-dcp 3aae00000.dcp: AFK optional dcpdp-service-epic (DCPDPService) is unsupported on channel 3
[  227.114955] apple-dcp 3aae00000.dcp: dcp_hotplug() connected:0 valid_mode:0 nr_modes:15
[  227.116225] apple-dcp 3aae00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:15
[  227.382889] apple-dcp 3aae00000.dcp: set_digital_out_mode finished:8245
[  228.387896] apple-dcp 3aae00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:15
[  228.398168] apple-dcp 3aae00000.dcp: set_digital_out_mode finished:8500
[  290.379701] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  290.380232] xhci-hcd xhci-hcd.7.auto: USB bus 2 deregistered
[  290.380239] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  290.381093] xhci-hcd xhci-hcd.7.auto: USB bus 1 deregistered
[  290.382475] apple-dcp 3aae00000.dcp: dcp_hotplug() connected:0 valid_mode:1 nr_modes:15
[  290.482654] apple-dcp 3aae00000.dcp: dcp_dptx_disconnect(port=0)
[  325.662525] xhci-hcd xhci-hcd.7.auto: irq 125, io mem 0x40a280000
[  325.898963] usb 1-1: new full-speed USB device number 2 using xhci-hcd
[  326.023570] usb 1-1: Product: NuPhy Air75 V2
[  332.927555] usb 1-1: USB disconnect, device number 2
[  333.723366] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  333.723988] xhci-hcd xhci-hcd.7.auto: USB bus 2 deregistered
[  333.724001] xhci-hcd xhci-hcd.7.auto: remove, state 4
[  333.725736] xhci-hcd xhci-hcd.7.auto: USB bus 1 deregistered
[  333.727896] phy-apple-atc 40b000000.phy: Failed to lock pipehandler

I have the full dmesg of each step (with dyndbg on afk.c) if you want one.

Assisted-by: Claude Fable 5.2

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Great to hear that! Thanks a lot for testing and logs

A firmware 27 external processor's DP/HDMI audio interface
(dcpav-audio-interface-epic) is expected on AV_AUDIO_ENDPOINT_DESKTOP
(0x2b), where T6050's desktop firmware announces it. T8142's image puts
it elsewhere: its endpoint name table runs dcpav-controller-ep (0x24),
dcpav-power-ep, dcpav-sac-ep (0x26), dcpav-device-ep (0x27),
dcpav-service-ep (0x28), dcpav-interface-ep (0x29), dcpdptx-port-ep
(0x2a), dcpdptx-hdcp-ep (0x2b), and macOS 27.2 binds
dcpdptx-hdcp-interface on 0x2b on a J815. The dcpav-*-interface-epic
services, audio among them, belong to dcpav-interface-ep.

Make the audio endpoint a per-profile value, defaulting to 0x2b, used
where the audio service is started, admitted and treated as compact
EPIC, and set it to AV_ENDPOINT (0x29) for apple,t8142-dcpext.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
…P audio

T8142's external display engines feed their DisplayPort audio from their
own ADMAC with an LLT escalation detector, the T6050 design. Add
apple,t8142-display-admac (with apple,t6050-display-admac as fallback),
apple,t8142-admac-control and apple,t8142-dpaudio.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
… displays

Each external display engine feeds its DisplayPort audio from its own
ADMAC (one TX channel) behind its isochronous DART (stream 30), in
DISPEXTn_ADMA, as on T6050 (J714s). From the J815AP ADT: dp-audio1 ->
admac-dispext0 (0x5_0614_0000, IRQ 894) for dcpext0, dp-audio2 ->
admac-dispext1 (0x3_aa14_0000, IRQ 969) for dcpext1, their control blocks
(IRQs 896 and 971) and PMGR states 0x420 and 0x3b0, whose parent is
DISPEXTn_SYS. The J813AP ADT has the same nodes. macOS 27.2 drives
these the same way: DCPAVAudioDMADelegate on dp-audio1 and an
AudioDMAController with one channel, DAX0TX, on admac-dispext0.

The boot loader copies the control blocks' ADT tunables by their
admac-dispextN-control aliases (aura main 6ddaaa30).

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Added possible audio support here, still not sure, couldn't test it

@gig3m

gig3m commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

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: apple-admac ... has no apple,tunable-ced: left as it is on both display ADMACs. aura's Stage 2 log:

kboot: ACIO tunable has invalid size 0
ADT: unable to convert 'ssw-tunables' tunable
kboot: no ADT tunables for admac-dispext0-control (/arm-io/admac-dispext0-ced-ssw: 409736, DT: 73528)

In the J813 ADT both tables are 336 bytes (14 entries). ced-tunables has 14 real entries. ssw-tunables has one (off 0, size 4, mask 1, value 1) and then 13 entries of zeros, and dt_append_acio_tunable() refuses a size that is not 4. With the table ended at its first all-zero entry, both are copied (admac-dispext0-control: ADT tunables copied; DT has apple,tunable-ced 168 bytes, apple,tunable-ssw 12 bytes):

+        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 (DP-2, 1920x1080@60, HDMI adapter), card DisplayPort_1: jack on, ELD filled, av_service_connect: starting audio service, plugged:1, PipeWire makes the sink. On playback (S24_LE, 2 ch, 48 kHz, period 1024) the PCM loops between XRUN and SETUP and PipeWire logs snd_pcm_avail after recover: Broken pipe. apple-admac with dyndbg: each 0x2000-byte descriptor is reported done about 192 us after the one before (stamps 0x1200 apart), where 1024 frames should take 21 ms. About 36 start/stop cycles a second. The same with and without the tunables.

The display processor does not complain: no link method ... answered error, and the link query answers 1 (audiosrv: link state 0x1) around every start. No apple-admac error status either (only the report bit). So the firmware says the link runs while nothing paces the ADMAC. 8192 bytes per 4608 ticks is a steady 16 bytes every 9 ticks.

One cycle (with tunables)
[   85.206991] apple-admac 3aa140000.dma-controller: ch0 start
[   85.206993] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff02000 len=0x2000 flags=0xc0002
[   85.206997] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff04000 len=0x2000 flags=0xc0003
[   85.207001] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff06000 len=0x2000 flags=0xc0004
[   85.207005] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff08000 len=0x2000 flags=0xc0005
[   85.207197] apple-admac 3aa140000.dma-controller: ch0 report: stamp=0x8193ebde flags=0x1800000
[   85.207199] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff0a000 len=0x2000 flags=0xc0006
[   85.207389] apple-admac 3aa140000.dma-controller: ch0 report: stamp=0x8193fdde flags=0x2800000
[   85.207390] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff0c000 len=0x2000 flags=0xc0007
[   85.207581] apple-admac 3aa140000.dma-controller: ch0 report: stamp=0x81940fdf flags=0x3800000
[   85.207582] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff0e000 len=0x2000 flags=0xc0008
[   85.207773] apple-admac 3aa140000.dma-controller: ch0 report: stamp=0x819421df flags=0x4800000
[   85.207774] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff10000 len=0x2000 flags=0xc0009
[   85.207965] apple-admac 3aa140000.dma-controller: ch0 report: stamp=0x819433de flags=0x5800000
[   85.207966] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff12000 len=0x2000 flags=0xc000a
[   85.223532] apple-admac 3aa140000.dma-controller: ch0 stop
[   85.223541] apple-admac 3aa140000.dma-controller: ch0 stop
[   85.231656] apple-admac 3aa140000.dma-controller: ch0 stop
[   85.231668] apple-admac 3aa140000.dma-controller: ch0 descriptor: addr=0x0x0000010ffff00000 len=0x2000 flags=0xc0001

Also new on this run: a boot with the monitor already attached (rear port, cold reboot). DP-2 came up on its own: allocated Type-C DPTX PHY 1 at 2.9 s, mode set at 3.5 s, and no Failed to lock pipehandler anywhere in that boot.

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

@gig3m

gig3m commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Five more cases from the "not tested" list, J813, kernel at ee86c16:

  • Monitor and USB keyboard at once, both ways round: monitor front (DP-1) with the keyboard rear (40a280000.usb), then monitor rear (DP-2) with the keyboard front (402280000.usb). Picture stays, keys work, in both.
  • Suspend with the monitor attached (rear port, keyboard in the front): one 20 s pm_test=platform s2idle cycle, rc=0. On resume dcp@3aae00000 does dcp_dptx_disconnect(port=0), dcp_hotplug() connected:1, dcp_poweron(), and sets 1920x1080@60 again; DP-2 is connected with a picture on both screens, the keyboard and Wi-Fi are back. This is the test suspend (devices suspended, CPU held 20 s), not a lid-closed sleep.
  • Lid closed with the monitor attached: logind takes it as docked and does not suspend; the compositor (Hyprland) disables eDP-1 and keeps DP-2 at 1920x1080@60. The external picture stays and the USB keyboard keeps working.
  • Unplugged with the lid closed: keyboard, then monitor. logind suspends in the same second as the display's dcp_hotplug() connected:0 (real s2idle, 22 s). Lid open wakes it: internal panel back, Wi-Fi up, no failed units.

Failed to lock pipehandler in this boot, four times: at each monitor plug (front, then rear) and after each keyboard unplug (rear, then front). None around the suspends.

Still not tested: two monitors, SuperSpeed devices, a real (not test) sleep with a monitor.

Assisted-by: Claude Fable 5.2

m0d16l14n1 added a commit to m0d16l14n1/aura that referenced this pull request Nov 15, 2026
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
… endpoint

"drm/apple: T8142 dcpext: take the audio interface on dcpav-interface-ep"
makes afk_compact_capable() compare the endpoint with
dcp_av_audio_endpoint(). The retained recovery control
actual-queue-quiesce compiles that function without the helper, so it
no longer built and service-rebind failed.

When afk_compact_capable() uses it, give the fixture hw.av_audio_endpoint
and the helper from dcp-internal.h, as it already does for the M4 check.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
… DisplayPort calibration

On T8142 the mode switch refuses every mode with DP AUX while the boot
loader's LIOA and common configuration banks are missing ("DisplayPort
bank calibration missing; DP disabled"). A partner in DP Alt Mode then
loses its USB as well: on a J813 with a dock in pin assignment D, under
a loader without the bank export, the PHY init fails with -EOPNOTSUPP
and the port's dwc3 never probes, where the kernel before the T8142
DisplayPort sequence ran the dock's hub at 10 Gb/s.

Map the DP modes to the USB the partner keeps, as T8132 does: USB2 next
to four DP lanes (pin assignments C and E), USB3 next to two (D).
atc-usb3-tests covers the mapping with and without the banks.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Every external display route of the T8142 Airs goes through the display
crossbars (apple,t8142-display-crossbar). Without their driver both
dcpext processors wait for the crossbars until the deferred probe
timeout and end as unusable pipes ("external display processor unusable
(probe failed: -110)"), so the j813.config kernel shows no external
display although the boot loader hands both processors over.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan

Copy link
Copy Markdown
Contributor

@m0d16l14n1 a J813 result on the macOS 27.2 (26B123) stub, with Linux at EL2: the external display works.

  • The kernel is this PR's display commits on our J813 tree. The loader is aura with your three commits, enrolled.
  • Both hand-offs are okay.
  • An EIZO EV2780 behind a dock on the rear port (DP Alt Mode, pin D) runs at 2560x1440@59.95 as card1-DP-2 under sway. The dock's USB3 hub stays at 10000M.

Three fixes that came out of it, as m0d16l14n1#2 against this branch:

  • j813.config lacks MUX_APPLE_DPXBAR. Without it, both dcpext wait for the display crossbars until the deferred probe timeout and end unusable (-110).
  • USB under an older loader. Without the loader's LIOA/common banks, a DP Alt Mode partner loses USB entirely (phy init failed --> -95). The fix serves its USB as T8132 does.
  • The apple-dcp host test. On e4bdeb8, service-rebind fails: the DP audio commit's dcp_av_audio_endpoint() is missing from the recovery fixture.

T8142 DisplayPort: J813 fixes (crossbar config, USB without the DP banks, recovery fixture)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants