Skip to content

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

Draft
RyanTheTide wants to merge 3 commits into
mainfrom
m4fam/j773s-display-v2
Draft

RyanTheTide wants to merge 3 commits into
mainfrom
m4fam/j773s-display-v2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #2307, which was accidentally branched from an unmerged DART power-domain branch and carried its commits. Same three commits, now on integration/aurora; content unchanged. All six T604x DTBs rebuilt on this base: J614s, J616s, J614c, J616c and J575c are byte-identical to base, only the J773s changes.

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).

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

Looks good; approve once the J616s regression boot is on this head.

I built the J773s DTB at 1958e52. Every path in the new HDMI stage (t6041_lpdptx_hdmi_nodes) and the existing USB-C stage is there and disabled. /pmp@500700000 is okay. dcpext0 has no typec-routes, so staged_processors_bound() (display-gate.c:2753) skips it as it should. On the J616s, dcpext0 keeps mux-controls (t6040-j616s-extdisp.dtsi:35), and so does the J614s's dcpext2 (t6040-j614s-extdisp-hdmi.dtsi:81). The new staged_dcp_has_muxes() condition therefore keeps their HDMI-only crossbar enable as it was. Their DTBs have no /phy@51c200000, so the stage swap at display-gate.c:3059 cannot fire there. Commits are signed off, and CI is green.

  1. Not a bug, but the J773s row needs it: the J773s dcp has no panel child, so gate_t6041_internal() always bails at display-gate.c:2136. The chains then need the boot loader to have enabled /display-subsystem. If it has not, the gate stops at display-gate.c:3084 with "no display subsystem or PMP, nothing enabled". Add that line to the J773s pass criteria as the failure to look for when testing with the aura#335 side.
  2. Nit: on the J773s, staged_fallback() (display-gate.c, callers at 2955/2988/3104) logs "external displays stay off, internal panel only". This Mac has no panel. Something like "boot framebuffer only" would say what actually happens when the internal DCP was never handed over.

HW row: J616s on this head with HDMI and one USB-C display, then each alone. Expect "routes enabled, waiting for the PMP", both stages enabled, a picture on both, hotplug working, 2 s2idle cycles, 0 AVC, 0 failed units and no new kernel errors against the base. Then the J773s row from the PR body, on a boot loader with aura#253 and aura#335.

Assisted-by: LLM (Claude:Opus 5.5)

This branch has not been deployed

No deployments
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