Skip to content

arm64: dts: apple: t6040-j773s: HDMI and USB-C displays - #2307

Closed
RyanTheTide wants to merge 10 commits into
integration/aurorafrom
m4fam/j773s-display
Closed

RyanTheTide wants to merge 10 commits into
integration/aurorafrom
m4fam/j773s-display

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The J773s (Mac mini M4 Pro) device tree has no display description: no dcp/dcpext nodes, no HDMI path and no USB-C display routes. The mini only ever gets iBoot's boot framebuffer. Its HDMI port does not use the J616s's ATC3 path. It runs through the LPDPTX PHY, as on the J575c Mac Studio, and the M4 Pro display gate only knew the ATC3 chain.

Change

Three commits:

  1. Split the shareable external display pieces out of the J616s/J575c files. Each piece is included where its text was, so every T604x DTB is byte-for-byte unchanged:
    • t6040-dispext0.dtsi: the DISPEXT0 PMP request and power.
    • t6040-extdisp-usbc.dtsi: DISPEXT1 power and dcpext1 over typec0-2.
    • t604x-dcpext1-mem.dtsi: dcpext1's firmware memory placeholders.
    • t604x-j575-j773-hdmi.dtsi: the renamed J575c LPDPTX HDMI file.
  2. J773s: describe HDMI and USB-C displays from those pieces.
    • dcpext0 drives HDMI through the LPDPTX PHY.
    • dcpext1 drives DisplayPort over the three back Thunderbolt ports.
    • Both chains get the J616s's PMP-acknowledged DISPEXT power.
    • The dcp/disp0/disp0-piodma aliases are added for the boot loader.
    • atcphy3, its mailbox and its crossbar from t604x-extdisp.dtsi are dropped, because ATC3 is the front USB hub here. ATC3 power stays as it was.
    • Every new node is disabled.
  3. display-gate: take the LPDPTX HDMI chain on any M4 Pro whose tree describes the LPDPTX PHY. The gate does not name the board. An HDMI processor without mux-controls no longer enables the Type-C crossbars.

Testing

  • DTBs built with cpp + dtc for all seven T604x boards. After commit 1, all seven are byte-identical to base (sha256 unchanged): J614s, J616s, J616s-tether, J773s, J575c, J614c, J616c. After commits 2 and 3, only the J773s changes. Its new warnings are the six unit_address_vs_reg warnings of the dcpext placeholders (8 to 14), the same warnings the J616s and J575c already have.
  • J773s booted-state diff, for nodes that were already in the tree: new aliases, plus mode-switch on atcphy0-2 (as on the J616s). Every added node is disabled except the connectors' port@3 graph endpoints, which point at disabled routes. Every path in the gate's J773s HDMI and USB-C stages exists in the J773s DTB and is disabled.
  • display-gate.c builds with clang and W=1 warnings with 0 warnings (base: 0). checkpatch: no new problems; the only warnings are the British "acknowledgement" spelling, which the tree already uses, and the MAINTAINERS note for the rename.

Still to run

A J773s boot. The owner of the community J773s is in #1479. The boot needs the MCC admission for board-id 2 (aura#253) and the aura display handoff without board lists (aura#335).

Pass criteria:

  • dmesg shows apple-t6041-display: routes enabled, waiting for the PMP, then stage 0 enabled, stage 1 enabled and processors and display subsystem enabled.
  • An HDMI monitor shows a picture with an HDMI-A connector in modetest -c, and hotplug works.
  • A USB-C/DP monitor on a back port works the same way.

A J616s regression boot is also owed: its DTB is unchanged, and its gate path only changes when the LPDPTX PHY is described.

ADT wiring this follows (J773s, macOS 26.6.2)
  • lpdptx-phy0: dptx-phy,t8132, the same two register windows as the J575c, dp-switch-dfp-endpoint 4, source-select-offset 1, PMGR DPTX_PHY at pmgr+0x360. The J616s has no such PMGR state.
  • dp2hdmi-gpio0: hdmi_hpd AOP GPIO 36, hdmi_pwr_en / dp2hdmi_pwr_en / reset on SMC keys, force-dpfu AOP GPIO 42, pcon-stays-on. Identical to the J575c. i2c8/pcon0 at 0x08.
  • display-crossbar0: dfp atc0-3 + lpdptx-phy0, ufp dispext0-3 + scodec0. atc0-2-dpphy on outputs 0-2; there is no atc3-dpphy/atc3-dpxbar (atc-phy3 is the front hub).
  • dcpext0-3 at the J616s/J575c addresses. DISPEXT0/1/2/3 PMGR states and PMP soc-device IDs 18-21 match the J616s and J575c.
  • disp0 has external; dcp has dp-switch-ufp-endpoint 15. Both match the J575c.
  • Only phandle values differ between the J773s and J575c display ADT nodes, plus the J575c's extra atc3-dpphy/atc3-dpxbar.
Not covered here
  • A third display (dcpext2 for a second USB-C display next to HDMI + dcpext1) needs a third gate stage on the M4 Pro.
  • HDMI/DP audio (dpaudio) on the J773s.
  • Thunderbolt display tunnels (apple_dpin_disabled on T6040).

Assisted-by: LLM (Claude:Opus 5.5)

RyanTheTide and others added 10 commits November 19, 2026 22:12
A DART probes as a device of its own. When its node names no power
domain, nothing holds the block it sits in on while it probes or runs,
and its first register read takes an SError when iBoot left that block
off. The DART has no power gate of its own; its engine's state covers
it. Several DARTs were added without one, and nothing caught it.

apple-dart-pd-check.py reads the compiled Apple DTBs and lists every
node with an "apple,*dart*" compatible that has no power-domains, and
every enabled DART that names a disabled power state (it would wait
for it forever) unless its engine names the same state. The SEP's and
the AOP's DARTs are exempt: those coprocessors run from before the
handoff on states the AP never switches off. Overrides through &label
are covered, as the check reads the DTBs, not the sources.

With --baseline-dtb-dir only new findings fail, as the ADT coverage
ratchet does, so the remaining ones can be fixed per SoC while no new
DART lands without its domain. The device tree workflow runs it base
against head.

Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…DARTs their power domains

The USB4 NHI DARTs (usb4_N_dart) and the PCIe-C tunnel DARTs
(apciecN_dart) on M1, M2, M1 Pro/Max/Ultra and M2 Pro/Max/Ultra name no
power domain, while their engines do: the ACIO block holds ATCn_CIO and
the PCIe-C root port holds ATCn_PCIE. A DART probes as a device of its
own, so nothing holds its block on while it probes or runs on its own,
and its first register read faults if that block is off.

Give each DART its engine's state, as the T6050 ACIO and PCIe-C DARTs
already have:
 - usb4_N_dart: ps_atcN_cio (the NHI DART sits in the ACIO block),
 - apciecN_dart: ps_atcN_pcie, the root port's own domain,
 - T6002 apciec4/5 (die 1 ports 0/1): ps_atc0/1_pcie_die1,
 - T6002 AUSB DARTs: ps_c0/1_usb31drd, their controller's domain,
 - the second DISPEXT DART of each M2-generation external display
   block (m2_dart_dispextN_1): the DISPEXT CPU state its sibling DART
   already names,
 - the T8103 PMP DART: ps_pmp, as on every other SoC.

ATCn_PCIE is apple,always-on on the non-Ultra M1/M2 SoCs, so the
PCIe-C DARTs there now take the retained-domain path of the DART
driver (no register save on suspend, no reset on resume), which was
written for this state and could not be reached while the DARTs named
no domain.

Fixes: 2f2c0fb ("arm64: dts: apple: t8103: Add USB4 ACIO and NHI")
Fixes: 80ee643 ("arm64: dts: apple: t60xx: Add USB4 ACIO and NHI")
Fixes: 13d0483 ("arm64: dts: apple: add T8103 and T8112 PCIe-C tunnels")
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…power domains

On M3, M3 Pro/Max/Ultra and M4 the USB4 NHI and PCIe-C DARTs, the
internal display DARTs, the AVE, APR (ProRes/scodec) and RSM DARTs, the
display/ISP/AVE companion DARTs and the T8132 SIO and APCIE port 2
DARTs name no power domain. A DART probes as a device of its own, so
nothing holds its block on while it probes or runs on its own, and its
first register read faults if that block is off.

Give each DART the state of the engine it serves, taken from the
engine's own node or from the same DART on the sibling SoC:
 - usb4_N_dart: ps_atcN_cio; usb4_N_pcie_dart: ps_atcN_cio_pcie, as
   the PCIe-C port names,
 - dcp_dart, disp0_dart and the DISP0 companion: the state the DCP
   names (ps_disp_cpu; ps_disp_fe on T6031/T6034),
 - DISPEXT companions: the state their block's DARTs name,
 - AVE DARTs and companions: the encoder's system state (ps_venc_sys,
   ps_venc0/1_sys), as the T6031 AVE DARTs have,
 - APR DARTs: the state the APR engine names (scodec or ProRes),
 - ISP companions: ps_isp_sys, as the ISP DARTs have,
 - RSM DARTs: ps_debug_gated, as on T6050 and T6031's RSM engine,
 - T8132 SIO DART: ps_sio_cpu, the SIO's own state,
 - T8132 APCIE port 2 DART: ps_apcie_sys_gp.

Every node except the USB4 DARTs, the T6030 and T8132 PCIe-C DARTs and
the T8132 DCP DART (J604, J713, J715) is disabled. The enabled ones name
states that are enabled on every board that enables them, but one: on
J604 the DCP DART now waits for ps_disp_cpu, which that board leaves
disabled; the DCP there names the same state, so it cannot probe
either way.

The T8132 internal PCIe DART (dart_apcie0) is left alone: J713 and J715
enable it and leave ps_apcie_sys_gp disabled.

Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… power domains

On T6040 (M4 Pro) the internal PCIe DARTs (pcie_dart, apcie1_dart and
the J773s apcie2_dart), the USB4 NHI and PCIe-C DARTs and the internal
and external display DARTs name no power domain; only the J616s board
files give the external display DARTs one. A DART probes as a device of
its own, so nothing holds its block on while it probes or runs on its
own, and its first register read faults if that block is off.

Give each DART the state of the engine it serves:
 - internal PCIe DARTs: ps_apcie_sys_gp, which the J616s PCIe
   controller names,
 - usb4_N_dart: ps_atcN_cio; apciecN_dart: ps_atcN_pcie, as the
   PCIe-C ports name,
 - disp0/dcp DARTs: ps_disp_fe; dispextN/dcpextN DARTs:
   ps_dispextN_fe, the front-end states the J616s external display
   DARTs already name (the CPU states belong to the coprocessor
   firmware).

These states exist only in the T6040 PMGR, so the PCIe and display
DARTs, which t604x.dtsi shares with T6041, get them in t6040.dtsi.

The internal PCIe DARTs are enabled on every T6040 board, but only J616s
enabled APCIE_GP and APCIE_SYS_GP, so on J614s and J773s the DARTs
would wait for them forever. Enable both, always-on, in t6040.dtsi, for
the reason J616s gives: iBoot leaves them on, and the PCIe driver keeps
internal links up through suspend-to-idle and cannot retrain them
after a power cycle. J616s's own description stays as it is.

The display and PCIe-C DARTs are disabled on every T6040 board, and the
USB4 DARTs are enabled only where ps_atcN_cio is.

Fixes: 05319b8 ("arm64: dts: apple: share the T604x SoC and PMGR description")
Fixes: c5fd88e ("arm64: dts: apple: t604x: describe the T6040-only blocks in t6040.dtsi")
Fixes: 3aefcf6 ("arm64: dts: apple: describe remaining fleet control devices")
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…domains

On T8140 the internal display DARTs (disp0_dart, dispgrt_dart,
dcp_dart), the external display DARTs (dispext0_dart, dcpext0_dart) and
the RSM DART name no power domain, while the same DARTs on T8103, T8112
and T600x do. A DART probes as a device of its own, so nothing holds its
block on while it probes or runs on its own, and its first register read
faults if that block is off.

Give each DART the state of the engine it serves:
 - DISP DARTs: ps_disp_cpu, which the DCP names (always-on here, as
   its firmware owns it),
 - DISPEXT0 DARTs: ps_dispext0_cpu, which dcpext names,
 - RSM DART: ps_debug_gated, as the T6050 RSM DART has.

All six DARTs are disabled on J700, so no current boot changes; when one
is enabled it now waits for its block's state instead of probing on an
unpowered block. ps_dispext0_* stay disabled until the external display
coprocessor has a driver, as before.

Fixes: f7079d0 ("arm64: add an isolated T8140 graphics and power profile")
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…their power domains

The shared T6050 PCIe-C DARTs (apciec0-3_dart) and the internal display
DARTs (disp0_dart, dcp_dart) name no power domain, while the board-level
PCIe-C DARTs on J714s/J716c already name ps_atcN_pcie. A DART probes as
a device of its own, so nothing holds its block on while it probes or
runs on its own, and its first register read faults if that block is
off.

Give the PCIe-C DARTs ps_atcN_pcie, as the board-level ones have, and
the display DARTs ps_disp_cpu, the DISP CPU state, as on T8132 and
T8140. All of these nodes are disabled on every T6050 board, so no
current boot changes.

The external display DARTs, the USB4 port 3 DART and the internal PCIe
DARTs are left: the T6050 PMGR describes no DISPEXT system/CPU states,
and the boards that enable usb4_3_dart and the APCIE DARTs leave
ps_atc3_cio and ps_apcie_sys_gp disabled.

Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…main

The T8142 internal PCIe DARTs (pcie0_dart, pcie2_dart) name no power
domain, while the T8112, T8122 and T8140 PCIe DARTs do. A DART probes as
a device of its own, so nothing holds its block on while it probes or
runs on its own, and its first register read faults if that block is
off.

Give both ps_apcie_sys_gp, the APCIE system state. It is enabled on
every T8142 board and is a parent of ps_apcie_phy_sw, which the NVMe
controller holds, so the DARTs add a holder and power nothing down.

Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The J773s (Mac mini M4 Pro) has the J616s's DISPEXT0/DISPEXT1 power
and PMP wiring, the J616s's dcpext1 routes to three Type-C ports on
ATC0-2, and the J575c's LPDPTX HDMI path, but those descriptions sit
inside board files mixed with board-only parts. Move the shareable
parts into their own files, without changing any device tree:

- t6040-dispext0.dtsi: the DISPEXT0 PMP request and the dcpext0 chain
  power domains, out of t6040-j616s-extdisp-hdmi.dtsi (which keeps the
  J616s atcphy3 HDMI tunables).
- t6040-extdisp-usbc.dtsi: DISPEXT1 power and dcpext1 over typec0-2,
  out of t6040-j616s-extdisp-usbc.dtsi (which keeps dcpext0's hybrid
  routes next to its atcphy3 HDMI path).
- t604x-dcpext1-mem.dtsi: dcpext1's firmware memory placeholders, out
  of t6040-j616s-extdisp-mem-loader.dtsi.
- t604x-j575-j773-hdmi.dtsi: t6041-j575c-hdmi.dtsi, renamed.

Each file is included where its text was, so every T604x DTB (J614s,
J616s, J616s tether, J773s, J575c, J614c, J616c) is byte for byte the
same as before.

Signed-off-by: Ryan Murray <[email protected]>
The J773s (Mac mini M4 Pro) had no display description at all and kept
iBoot's boot framebuffer. Its ADT (macOS 26.6.2) has the J575c's HDMI
path: lpdptx-phy0 at the same registers with the same PMGR state,
display crossbar output 4, dp2hdmi-gpio0 with the same AOP hotplug pin
and SMC power pins, and the DP-to-HDMI converter on i2c8 at 0x08. Its
three back Thunderbolt ports are the J616s's ATC0-2 with atc0-2-dpphy
on crossbar outputs 0-2. dcpext0-3 and their DARTs sit at the J616s
and J575c addresses, and DISPEXT0/1 have the J616s's PMGR states and
PMP soc-device IDs (18 and 19). ATC3 is the front USB hub's PHY and
there is no atc3-dpxbar.

Describe it from the shared pieces: dcpext0 drives HDMI through the
LPDPTX PHY (t604x-j575-j773-hdmi.dtsi), dcpext1 drives DisplayPort
over the three back ports (t6040-extdisp-usbc.dtsi, t604x-dcpext1-
mem.dtsi), and both chains get the J616s's PMP-acknowledged DISPEXT
power (t6040-dispext0.dtsi). atcphy3, its mailbox and crossbar from
t604x-extdisp.dtsi are dropped for the front hub's own ATC3, whose
power stays as it was. The dcp/disp0/disp0-piodma aliases let the boot
loader find the display subsystem, as on the J575c.

Every new node is disabled. Booted state changes: the three back
ATC PHYs register a Type-C mode switch (as on the J616s) and the
connectors get disabled display routes. The boot loader fills the
external processors' firmware memory and the display gate enables
each chain once the PMP is bound.

Signed-off-by: Ryan Murray <[email protected]>
The M4 Pro display gate powered HDMI only through the J616s's ATC3
chain (atcphy3, its crossbar and power) or the J614s's dcpext2. The
J773s (Mac mini M4 Pro) has its HDMI port behind the LPDPTX PHY, as
the J575c, and its ATC3 is the front USB hub's: its HDMI chain is the
PHY's power, the PMP DISPEXT0 request, DISPEXT0, the AOP pins, the PHY,
dcpext0's DARTs, mailbox and dcpext0.

Take that chain on any M4 Pro whose device tree describes the LPDPTX
PHY, rather than naming the board. dcpext0 there has no Type-C routes
and no mux-controls, so the Type-C crossbars are enabled for an
HDMI-only processor only when its mux-controls name them.

The J616s and J614s, which do not describe the PHY, keep their chains.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by 2446: same three commits rebased onto integration/aurora (this branch was based on an unmerged branch).

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.

1 participant