Skip to content

J704 (MacBook Pro 14" M5): HDMI port - #2603

Open
term-guy wants to merge 9 commits into
aurora-silicon:integration/aurorafrom
term-guy:j704-hdmi-upstream
Open

term-guy wants to merge 9 commits into
aurora-silicon:integration/aurorafrom
term-guy:j704-hdmi-upstream

Conversation

@term-guy

@term-guy term-guy commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

The J704's HDMI port, with the boot loader's T8142 display handoff (aurora-silicon/aura#409): DCPEXT1, display crossbar source 4, drives the fixed ATC2 DisplayPort link into the on-board DP-to-HDMI converter (power SMC gP0f/gP1a, hotplug AOP GPIO 41). Based on @dmitzsaz's J704 work (dmitzsaz/linux wip/j704/display); the HDMI driver side is already in integration/aurora.

  1. dt-bindings: power: apple,t8140-pmp-report: Add T8142 (Dmitriy; resolved against main's oneOf)
  2. pmdomain: apple: pmp-report: Add T8142 (Dmitriy): ATC2 is notify-PMP; its PHY is unusable until the PMP has acknowledged it.
  3. drm/apple: Leave the T8142 ATC PHY out of the display components: dcpext1's graph endpoint is its ATC PHY; add_dcp_components() skipped only T8103/T8122 PHYs, so the display subsystem waited for a component that never registers and neither display bound (from Dmitriy's 3b40fa4).
  4. arm64: dts: apple: t8142-j704: Give disp0_dart one register window: the handoff in kboot: T8142 display handoff: internal DCP and external DCPs (J704 HDMI) aura#409 admits a stream only on a single-window DART (J813 already has one). Safe with the current aura.
  5. dt-bindings: phy: apple,atcphy: Allow a DisplayPort-only T8142 PHY: ATC2 has only core, lpdptx, axi2af and lioa (reduced from Dmitriy's 7a73aeb).
  6. arm64: dts: apple: t8142-j704: Add the HDMI port: ATC2 power states (nub PMGR; ADT ATC2_USB_AON's parent is ATC2_COMMON), AOP pinctrl, PMP report + ATC2 entry (record 26), DisplayPort-only ATC2 PHY, crossbar, DCPEXT1 (disabled until the loader enables it). HDMI only: no Type-C routes on DCPEXT1, no display audio yet.

Tested on the J704 (macOS 27.2 / 26B123 stub, the same patches on the Fedora J704 tree, aura with aurora-silicon/aura#409): display subsystem bound, eDP-1 3024x1890@120 and HDMI-A-1 2560x1440@144 (hotplug, 41 modes, firmware EDID metadata) active together in KDE, no DART faults or flip timeouts. Found on the way: with two disp0_dart windows the handoff refuses the internal panel; with ATC2's USB power states in the main PMGR (they are ADT group 1, the nub PMGR) atc2-usb-aon never reaches 0xf; without (3) the internal panel does not bind either.

CHECK_DTBS for t8142-j704/j813/j815: only the existing alias-name warning (disp0_piodma; this adds dispext1_piodma, the name aura looks up). Both bindings pass dt-doc-validate and yamllint; pmp-report.o and apple_drv.o build with W=1.

This was prepared with AI assistance (Assisted-by: LLM), like the commits.

Signed-off-by: termg hello@termg.com

dmitzsaz and others added 6 commits November 20, 2026 19:56
Add the T8142 (M5) report aperture. Its entries use the T8140 entry
compatible as fallback. On T8142 the request and acknowledge bits are
indexed by soc-device record, so say what reg means there.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
(cherry picked from commit b957bbb)
Signed-off-by: termg <hello@termg.com>
Add the T8142 (M5) layout of the PMP report aperture, from the PTD
ranges of the ADT iop-pmp-nub: PMP-STATUS at entry 1, SOC-DEV-PS-REQ at
entry 39 and SOC-DEV-PS-ACK at entry 47, with 16-byte reads from the
base and 8-byte writes from base + 0x10000 as on T6041. The same ranges
are in the J704 and J813 device trees.

As on T6041, the PMP runs while any status bit is set, and requests are
held in memory until it runs: the boot loader leaves the PMP halted and
the request words are only meaningful to a running PMP.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
(cherry picked from commit da3af8d)
Signed-off-by: termg <hello@termg.com>
A T8142 external DCP with a fixed DisplayPort route (the J704's HDMI port:
dcpext1 -> ATC2) has a graph endpoint on its ATC PHY. add_dcp_components()
adds every endpoint's remote node as a component of the display subsystem
and skips only the T8103 and T8122 ATC PHYs, so it waits for a T8142 PHY
component that never registers: neither the external nor the internal
display binds. Skip apple,t8142-atcphy as well.

The same check is part of Dmitriy's 3b40fa4 ("drm/apple: Admit T8142
external firmware through the common lifecycle", dmitzsaz/linux
wip/j704/display); the rest of that commit is upstream in reworked form.

Tested on the J704 (MacBook Pro 14-inch, M5): display subsystem bound,
internal panel and an HDMI display (2560x1440@144) up together.

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
Scanout and PIODMA share the first register window of disp0's DART, as the
J813 tree already describes it. aura's T8142 display handoff admits a
display stream only on a DART with exactly one register window: with the
second window (0x286314000) it refuses the whole handoff, the internal
panel included, and Linux stays on the boot framebuffer.

Tested on the J704 (aurora-silicon#1180: refused with two windows; aurora-silicon#1181 on: handoff
okay, internal panel on the DCP).

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
T8142's ATC2 drives only the fixed DisplayPort link of the J704's HDMI
port: it has no USB controller, so its node has just the core, lpdptx,
axi2af and lioa banks. Allow that four-bank layout next to the USB ones.

Based on Dmitriy's 7a73aeb ("dt-bindings: phy: apple,atcphy:
Describe T8142 DisplayPort banks", dmitzsaz/linux wip/j704/display),
reduced to what upstream's binding does not describe yet.

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
The J704's HDMI port: DCPEXT1 (display crossbar source 4) drives the fixed
ATC2 DisplayPort link into the on-board DP-to-HDMI converter (power SMC
gP0f/gP1a, hotplug AOP GPIO 41). Add the ATC2 power states (nub PMGR; ADT
ATC2_USB_AON's parent is ATC2_COMMON), the AOP pin controller, the PMP
report with ATC2's entry (soc-device record 26), the DisplayPort-only ATC2
PHY, its crossbar, and DCPEXT1 with its mailbox, DART fixups,
firmware-owned PMGR islands, bandwidth registers and firmware clocks (ADT
dispext1 clock-ids 372/433). DCPEXT1 stays disabled until the boot
loader's T8142 display handoff (aura) has checked the running firmware
and enabled it. HDMI only: no Type-C routes and no display audio yet.

The nodes follow Dmitriy's J704 tree (dmitzsaz/linux wip/j704/display);
addresses, interrupts and GPIOs were checked against the J704 ADT.

Tested on the J704 (MacBook Pro 14-inch, M5) with aura's T8142 display
handoff, in the equivalent Fedora tree: dcpext1 handoff okay, eDP-1
3024x1890@120 and an HDMI display at 2560x1440@144 active together, no
DART faults. CHECK_DTBS: only the alias-name warning disp0_piodma already
has (dispext1_piodma is the name the boot loader looks up).

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Nice result with both outputs running. A few small things:

  • t8142-j704-hdmi.dtsi:39-41: &display now always lists dispext1_dart, and the internal panel depends on the loader pruning that entry when DCPEXT1 stays disabled. Has the refused-handoff path been booted (for example with the external DCP's checks failing, or the handoff turned off), so we know eDP still comes up alone? A line in the test notes would cover it.
  • apple,atcphy.yaml: the fourth reg-names entry becomes enum: [ usb2phy, lioa ] for every T8142 PHY, so a six-entry T8142 PHY with lioa in both slot 4 and slot 6 would now validate. Since the new oneOf branch already spells out the four DisplayPort-only names, the outer list could keep usb2phy.
  • atcphy2 has orientation-switch and mode-switch, but this PHY only drives the fixed HDMI link and has no Type-C connector. Unless the PHY driver needs them in order to probe, they can go.
  • Not covered yet: suspend and resume with the HDMI display attached. That can come with a later change.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

dt-checks counts one new warning on this head: t8142-j704.dtb: aliases: 'disp0_piodma', 'dispext1_piodma' do not match any of the regexes. The aliases schema only allows lowercase letters, digits and -, so the new dispext1_piodma alias adds to the existing disp0_piodma report (same warning as #1192 on the J773g). Either the driver looks the PIODMA node up another way (a phandle property on the dcpext node), or the alias waits until the base's disp0_piodma gets a schema-clean name, so both move together.

Assisted-by: LLM (Claude:Opus 5.5)

The DisplayPort-only T8142 PHY made the fourth reg-names entry
"usb2phy or lioa" for every T8142 PHY, so a six-bank PHY with lioa both
fourth and sixth validated. List all six names in the five- and six-bank
branch: usb2phy stays fourth there, and lioa can be fourth only on the
four-bank DisplayPort-only PHY.

That PHY drives a fixed link without a Type-C connector, so require
orientation-switch only on PHYs with a usb2phy bank. mode-switch stays
required: the DCP selects DisplayPort through the PHY's mux.

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
ATC2 drives only the fixed DisplayPort link into the HDMI converter; no
Type-C connector is attached, so nothing orients it. Keep mode-switch,
through which DCPEXT1 selects DisplayPort.

Tested on the J704: without orientation-switch, HDMI-A-1 at
2560x1440@144 and eDP-1 at 3024x1890@120 run together after a hotplug.

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
@term-guy

Copy link
Copy Markdown
Contributor Author

Thanks. All four, in two new commits on top (ce8979b1bde1 binding, 09a223842a5e DT):

  1. Refused DCPEXT1 handoff, eDP alone. Booted: with dcpext1's compatible changed in the test DTB, aura skips it, so dispext1_dart stays disabled. aurora,dcpext1-handoff is absent,
    /display-subsystem iommus is <&disp0_dart 0> only (aura's kboot_t8142_display_prune()), eDP-1 3024x1890@120 is up, and nothing is deferred. Added to the test notes.
  2. reg-names. Keeping usb2phy in the outer list does not work: the outer list and the oneOf branch both apply, so the four-bank PHY would need usb2phy and lioa in the same
    slot. Instead the USB branch (five or six banks) now lists all six names, so usb2phy is fixed fourth there and lioa can be fourth only on the four-bank PHY. Checked with dt-validate:
    core,lpdptx,axi2af,lioa,pipehandler,lioa and core,lpdptx,axi2af,lioa,pipehandler are now rejected (both passed before); the four-bank, five- and six-bank USB layouts pass.
  3. orientation-switch / mode-switch. orientation-switch is gone. mode-switch has to stay: dcpext1 switches the PHY to DisplayPort through fwnode_typec_mux_get() on its graph
    endpoint (dcp.c), and the Type-C core only matches a node with the mode-switch property. The binding required orientation-switch on every T8142 PHY, so it now requires it only on
    PHYs with a usb2phy bank; mode-switch and ports stay required. Booted without orientation-switch: typec_mux_set() returns 0, and after a hotplug HDMI-A-1 (41 modes) runs at
    2560x1440@144 together with eDP-1 at 3024x1890@120, with no DART faults or flip timeouts.
  4. Suspend/resume with HDMI attached: not yet, for a later change.

CHECK_DTBS for j704/j813/j815: unchanged (only the alias-name warning); dt_binding_check, dt-check-style and yamllint pass.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. That covers my points. The refused-handoff boot shows eDP alone with iommus pruned to disp0_dart. Fixing usb2phy fourth in the USB branch closes the slot-4/slot-6 hole, and both bad layouts are now rejected. Keeping mode-switch because dcpext1 finds the PHY through fwnode_typec_mux_get() makes sense, and requiring orientation-switch only on PHYs with a usb2phy bank is the right split. Suspend/resume with HDMI attached as a follow-up is fine.

Assisted-by: LLM (Claude:Opus 5.5)

…odma

The aliases schema allows only lowercase letters, digits and '-', so
dispext1_piodma added a CHECK_DTBS warning. Nothing but the loader reads
it, and only aura's T8142 display handoff (aurora-silicon/aura#409) does,
so give it the schema-clean name, as disp0-piodma is the canonical name
of the internal display's alias. The loader looks up dispextN-piodma
first and still accepts dispextN_piodma.

J704 keeps disp0_piodma for now: current loaders read only that name on
the T8142 internal display path.

Assisted-by: LLM
Signed-off-by: termg <hello@termg.com>
@term-guy

Copy link
Copy Markdown
Contributor Author

The alias: renamed to the schema-clean dispext1-piodma in 5dbc6a6. Only aura's T8142 display handoff (aura#409) reads it; its reworked version looks up dispextN-piodma first and still accepts dispextN_piodma. CHECK_DTBS for t8142-j704 now reports only the base's disp0_piodma, the same warning as J813. J704 keeps that name for now because aura main reads only disp0_piodma on the T8142 internal display path; it can move to disp0-piodma together with J813 once the loaders have switched.

AI-assisted (Assisted-by: LLM).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review of 5dbc6a6: No blockers.

  1. Resolved: the dt-checks alias warning. t8142-j704-hdmi.dtsi:34 is now dispext1-piodma = &dispext1_piodma;, so the only alias warning left is the base's disp0_piodma, which J813 shares. Nothing on aura main reads the dispext1 alias. Only aura#409 does, and it tries dispextN-piodma first and then the underscore form (kboot_t8142_dcpext_piodma()), so the rename can't break a loader that is already merged. HDMI still depends on aura#409 landing, as the description says.
  2. Nit: this commit, like the eight before it, has an Assisted-by: LLM trailer. Commits should carry only the human Signed-off-by. The disclosure goes on the PR body's last line as Assisted-by: LLM (<Vendor>:<Model>); the body currently has it in the middle.

HW row: J704 booted with the 5dbc6a6 DTB and aura#409 at d1550577. Pass: the loader resolves the PIODMA through dispext1-piodma, HDMI-A-1 and eDP-1 are both active, no DART faults or flip timeouts, 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

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.

3 participants