Skip to content

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

Merged
RyanTheTide merged 12 commits into
aurora-silicon:mainfrom
term-guy:j704-hdmi-upstream
Nov 28, 2026
Merged

RyanTheTide merged 12 commits into
aurora-silicon:mainfrom
term-guy:j704-hdmi-upstream

Conversation

@term-guy

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

Copy link
Copy Markdown
Contributor

What: 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 and the T8142 PMP report (5fc679a, d32242d) are already in integration/aurora. Based on integration/aurora da67077.
Tested: J704 (MacBook Pro 14" M5) at 6880cfd9, boot #1231 (#2603 (comment)): with the closed linux#2093 (which carried linux#3417's commit) and aura#409 + aura#545 (the test tree's copy of this PR's files is identical to 6880cfd9), both handoffs okay, eDP-1 3024x1964 and HDMI-A-1 2560x1440@144 at once in KDE with HDMI connected at boot, hotplug in and out, 0 DART faults, 0 flip timeouts, 0 failed units, 0 SELinux denials. CHECK_DTBS for t8142-j704/j813/j815: only the existing disp0_piodma alias-name warning; dt_binding_check passes for apple,atcphy and apple,t8140-pmp-report; scripts/dtc/apple-dart-pd-check.py reports no new finding.
Risk: two-way door · J704 (DT, bindings); drm/apple skips the T8142 ATC PHY in add_dcp_components() by its IP compatible, which no other Mac's DT has.
Not yet: HDMI audio. Merge order: after linux#3417 (the J704 DCP's apple,clock-ids, split out of the closed linux#2093; aura cannot publish them on T8142, as the ADT has no frequency for clock 585, and without them the DCP fails to bind, -22). HDMI needs aura#409 for the handoff; with today's aura main (which already hands dcpext1 over) the internal panel and HDMI work too (#1225).

Details
  1. dt-bindings: power: apple,t8140-pmp-report: Add the T8142 report entry (Dmitriy): the entry compatible, with the T8140 entry as fallback, and what reg means on T8142.
  2. 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).
  3. arm64: dts: apple: t8142-j704: Give disp0_dart one register window: the handoff in aura#409 admits a stream only on a single-window DART (J813 already has one). Safe with the current aura.
  4. dt-bindings: phy: apple,atcphy: Allow a DisplayPort-only T8142 PHY: ATC2 has only core, lpdptx, axi2af and lioa (reduced from Dmitriy's 7a73aeb).
  5. 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, the ATC2 entry (report@1a, reg 26) under the existing &pmp_report, the DisplayPort-only ATC2 PHY, the crossbar, and DCPEXT1 (disabled until the loader enables it). HDMI only: no Type-C routes on DCPEXT1, no display audio yet.
  6. dt-bindings: phy: apple,atcphy: Keep usb2phy fourth on T8142 USB PHYs
  7. arm64: dts: apple: t8142-j704: Drop orientation-switch from the HDMI PHY (mode-switch stays: dcpext1 finds the PHY through fwnode_typec_mux_get()).
  8. arm64: dts: apple: t8142-j704: Name the HDMI PIODMA alias dispext1-piodma (schema-clean; aura#409 looks it up).
  9. arm64: dts: apple: t8142-j704: Leave the DCPEXT1 power states enabled: they are apple,firmware-owned (always on for Linux, never touched). dispext1_dart finds them on when the loader enables it with dcpext1 and appends it to &display's iommus (aura#409); &display itself lists only disp0_dart.
  10. arm64: dts: apple: t8142-j704: Give the DCPEXT1 power states #reset-cells: required by the binding once they are enabled, as on ps_sio.

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 (2) the internal panel does not bind either.

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

@term-guy

Copy link
Copy Markdown
Contributor Author

Thanks. All four, in two new commits on top (ce8979b binding, 09a2238 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)

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

@RyanTheTide

Copy link
Copy Markdown
Contributor

Status check against integration/aurora 4a17f73: the J704 HDMI description is not on the tip, so this is still needed, but part of it has landed from another series: the tip now has the T8142 PMP report compatible, the driver offsets (5fc679a) and a pmp_report node in t8142.dtsi that J704 already enables (d32242d). That is what the conflict in pmp-report.c is. @term-guy, could you rebase onto the tip: drop the pmdomain: apple: pmp-report: Add T8142 commit, keep only the report-entry part of the binding commit, and add the ATC2 entry under the existing &pmp_report node rather than defining the node again in t8142-j704-hdmi.dtsi (the tip's node has a larger register range). With that the other seven commits apply unchanged in a trial rebase. A J704 boot on the rebased head would confirm the ATC2 acknowledge still arrives with the tip's report offsets; HDMI still depends on aura#409.

dmitzsaz and others added 8 commits November 22, 2026 23:25
The T8142 report aperture is already described. Add its entry
compatible, with 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 <[email protected]>
(cherry picked from commit b957bbb)
[termg: kept only the entry compatible; the aperture compatible is on
 integration already]
Signed-off-by: termg <[email protected]>
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.

Signed-off-by: termg <[email protected]>
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).

Signed-off-by: termg <[email protected]>
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.

Signed-off-by: termg <[email protected]>
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, ATC2's entry
(soc-device record 26) in the shared PMP report node, 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).

Signed-off-by: termg <[email protected]>
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.

Signed-off-by: termg <[email protected]>
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.

Signed-off-by: termg <[email protected]>
…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.

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

Copy link
Copy Markdown
Contributor

Re-checked at 8c71deb, rebased on integration/aurora. This is the rebase I asked for: the pmp-report: Add T8142 commit is gone, the binding commit (0784628) now only adds the apple,t8142-pmp-v2-report-entry / apple,t8140-pmp-v2-report-entry entry, and pmp_report_atc2 sits under the tip's &pmp_report node (t8142-j704-hdmi.dtsi:252) instead of a second node definition. The entry binds through the existing apple,t8140-pmp-v2-report-entry match (pmp-report.c:3579), so no driver change is needed. The other seven commits are the same as before.

Still needed before merge: a J704 boot on this head showing the ATC2 report acknowledge arrives with the tip's report offsets (the HDMI output itself still waits on aura#409), and dt-checks, which is still queued.

Assisted-by: LLM (Claude:Opus 5.5)

@term-guy

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora da67077 (8c71deb), as suggested. All commits now carry only human Signed-off-bys.

  • pmdomain: apple: pmp-report: Add T8142 is dropped: the tip has the compatible and offsets (5fc679a).
  • The binding commit keeps only the report entry: apple,t8142-pmp-v2-report-entry with the T8140 entry fallback, and the reg description. The subject is now "Add the T8142 report entry".
  • t8142-j704-hdmi.dtsi no longer defines pmp_report. It adds pmp_report_atc2: report@1a (reg 26, power domain ps_atc2_usb) under the existing &pmp_report, which keeps the tip's register range, power domain and status (d32242d).
  • The other seven commits applied unchanged.

Each commit builds the J704 DTB. CHECK_DTBS W=1 for t8142-j704/j813/j815: only the base disp0_piodma alias warning. dt_binding_check for apple,atcphy and apple,t8140-pmp-report passes.

J704 boot on 8c71deb merged with #2093 (kernel built from that tree, aura#409 v3 chainloaded):

apple-dcp 3aae00000.dcp: typec_mux_set() returned: 0
apple-dcp 3aae00000.dcp: dcp_enable_dp2hdmi_hpd: DP2HDMI HPD connected:1
apple-dcp 3aae00000.dcp: HDMI: forwarding converter service requests (HBR3 link)
apple-pmp-report 3803c0000.pmp-report: PMP running (status 0x1), requests 0x4000000

So the ATC2 request (bit 26) is acknowledged with the tip's report offsets and pmp-atc2 is on. HDMI-A-1 runs at 2560x1440@144 (41 modes) next to eDP-1 at 3024x1890@120, with no DART faults or flip timeouts. 0 SELinux denials (enforcing), 0 failed units. The kernel error lines are the known ones: the two reserved-memory overlap reports, the DCP AFK lines (dcpdptx-hdcp-interface, AppleDCPPS190), and the 26A428 GPU firmware lines that #2585 removes.

Two things I had to change in the test DTB, neither from this PR. Both also apply to integration/aurora + #2093 without this PR:

  • With pcie0_msi, pcie0_dart and pcie2_dart enabled, as the tip's J704 tree has them, the kernel hangs early with no console, with or without this PR. Disabling those three, and changing nothing else, makes it boot. A kernel from the same tree boots with an older J704 DT that has them disabled.
  • The plain J704 DT has no asahi,efi-system-partition in /chosen, so our installed system's initramfs stops at "Apple EFI partition handoff is missing". I added it to the test DTB for this boot.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, the J704 row at 8c71deb shows what was needed: the ATC2 request (bit 26) is acknowledged with the tip's report offsets, and HDMI-A-1 runs at 2560x1440@144 next to the panel with no DART faults or flip timeouts.

  1. dt-checks fails on this head with one new finding (run 45083495621, "DART power domains, base vs head"): t8142-j704 /soc/iommu@3aa300000 (&dispext1_dart, t8142-j704-hdmi.dtsi:263) is disabled and its power domain ps_dispext1_cpu (power-controller@3b8, :72) is disabled too, as are ps_dispext1_fe/ps_dispext1_sys. I assume aura#409 turns these on at boot together with the DCPEXT1 nodes. If so, please say in the dtsi comment (and the commit message) which loader change enables them, and check how the other loader-enabled DCPEXT DARTs get past this check, so that it passes. If the loader does not enable them, the HDMI row must have run on a DT where they were enabled by hand, and that should be in the PR.
  2. The early hang with pcie0_msi, pcie0_dart and pcie2_dart enabled is a problem on the tip's J704 tree with or without this PR, so it shouldn't block this one. Does it still hang with arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 applied? arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 cuts the host down to the trained port 0. If it does, please open an issue with the last console output you have (or note it on arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582), since today the default J704 DT doesn't boot a tip kernel.
  3. The missing asahi,efi-system-partition in /chosen is the loader's job; noted, not for this PR.

With dt-checks green and 1 explained, this is fine from my side. HDMI still needs aura#409 to land.

Assisted-by: LLM (Claude:Opus 5.5)

&display lists dispext1_dart, which the loader enables together with
dcpext1 when it hands the external display session over (aura#409,
dt_set_t8142_dcpext()). With its power state disabled in the DTB that
DART would wait for its domain, and dt-checks' DART power-domain check
reports it.

The three DCPEXT1 states are apple,firmware-owned: the pmgr-pwrstate
driver keeps them always on and never reads or changes the hardware.
Leaving them enabled therefore changes nothing on the bus. Without a
handoff the loader keeps dcpext1 and its DARTs disabled and prunes
dispext1_dart from &display, so nothing uses them.

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

Copy link
Copy Markdown
Contributor

Checked e87234c. Leaving the three DCPEXT1 power states enabled is the right fix for the dt-checks finding. For apple,firmware-owned domains, pmgr-pwrstate only sets GENPD_FLAG_ALWAYS_ON and never reads, resets or changes the state register (pmgr-pwrstate.c:910-912, :997-999), so enabling the nodes adds no MMIO access, including on a boot without the handoff where dcpext1 and its DARTs stay disabled. The comment and commit message say which loader change enables them. With dt-checks green on this head, this is approved from my side. The HDMI output still depends on aura#409.

Assisted-by: LLM (Claude:Opus 5.5)

@term-guy

Copy link
Copy Markdown
Contributor Author
  1. dt-checks. e87234c leaves the three DCPEXT1 power states enabled. They are apple,firmware-owned, so pmgr-pwrstate keeps them always on and never reads or changes the hardware; enabling them changes nothing on the bus. The loader change is aura#409: dt_set_t8142_dcpext() enables dcpext1 and its DARTs on a handoff (and their domain chain, through drm/asahi: g17: five small fixes (soft faults, recovery blame, torn snapshots, signalled fences, HIGH priority) #391's dt_t8142_enable_power_domains()); without a handoff it keeps them disabled and prunes dispext1_dart from &display. The dtsi comment and the commit message say so. The other loader-enabled DCPEXT DARTs: on T8122 &display lists only disp0_dart and ps_dispext_* are enabled; T8140 J700's dispext0_dart has no power domain at all, which is one of the 88 baseline findings. scripts/dtc/apple-dart-pd-check.py against the tip's t8142 DTBs now reports new: 0.
  2. The PCIe hang. With arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 applied it is gone. J704 boot of a kernel from the tip + M5: J704 (MacBook Pro 14-inch, M5) GPU and display #2093 with this PR + arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 (pcie0_msi and pcie0_dart enabled as arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 leaves them, pcie2_dart disabled by arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582) and aura#409 + aura#398 chainloaded: it boots, port 0 trains (j813-n1: link up (0x9b001001), endpoint 14e4:4434), 01:00.0 [14e4:4434] and 01:00.1 [14e4:5f72] enumerate, Wi-Fi associates and Bluetooth scans. Without arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 the same kernel hangs before the console, with or without this PR. So the tip's default J704 tree needs arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 (and aura#398 for port 0) to boot. I'll note that on arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 #2582 rather than open an issue.

Same boot, display: dcp and dcpext1 handoff okay, typec_mux_set() returned: 0, DP2HDMI HPD connected:1, HDMI: forwarding converter service requests (HBR3 link), PMP report requests 0x4000000, eDP and HDMI modes set, no DART faults or flip timeouts. 0 SELinux denials (enforcing), 0 failed units. The kernel error lines are the known ones (the four of_irq_parse_pci INTx lines, the reserved-memory overlap reports, the DCP AFK lines and the 26A428 GPU lines that #2585 removes).

Assisted-by: LLM (Claude:Opus 5.5)

…ells

Now that they are enabled, the pmgr-pwrstate binding requires
#reset-cells on them, as on the other enabled firmware-owned state
(ps_sio). dt-checks counted the six missing-property warnings as new.

Signed-off-by: termg <[email protected]>

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formal review at 176e0f4ce3ab against the pre-PR checklist (§1–§6) and live integration/aurora (70a00e583b03): 1 blocking DT/bootloader chicken-and-egg bug (§1/§2/§3) + exact-head §5 evidence gap.

Blocker

  1. §1 chicken-and-egg / internal-display regression under current Aura main (arch/arm64/boot/dts/apple/t8142-j704-hdmi.dtsi:39-41):

    /* aura prunes a provider it leaves disabled from this list again. */
    &display {
        iommus = <&disp0_dart 0>, <&dispext1_dart 0>;
    };
    

    dispext1_dart stays status = "disabled" until aurora-silicon/aura#409 (still OPEN) enables it. Current aura main (src/kboot.c:9068-9073) does not prune disabled DARTs from &display's iommus. In Linux (drivers/iommu/of_iommu.c:25-76, 147-155), when of_iommu_configure_dev() hits the disabled second entry (dispext1_dart), of_iommu_xlate() returns -ENODEV, which aborts the loop and causes of_iommu_configure() to tear down dev->iommu / fwspec completely — dropping even disp0_dart from &display and breaking internal-panel scanout on every existing/released Aura bootloader without aura#409.

    aura#409 already appends <&dispext1_dart 0> to &display's iommus when enabling dcpext1 (!listed && fdt_appendprop(...)), and arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi on integration/aurora already keeps &display at iommus = <&disp0_dart 0>;. Please drop the &display iommus override from t8142-j704-hdmi.dtsi so the static DT remains safe under current aura main.

§5 Evidence Needed on Updated Head

  • Head commit 176e0f4ce3ab (#reset-cells = <0> on ps_dispext1_*) was pushed after the e87234c6 J704 boot, and the refused-handoff test used aura#409's pruner rather than unpatched aura main. After dropping the &display iommus override, please post an exact-head J704 boot row covering both current aura main (confirming internal eDP-1 comes up with disp0_dart attached and no IOMMU teardown) and aura#409 (eDP-1 + HDMI-A-1 active together), with explicit regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors).

Verified Clean (§2, §4, §6, CI)

  • drivers/gpu/drm/apple/apple_drv.c: skipping apple,t8142-atcphy in add_dcp_components() is correct; drivers/phy/apple/atc.c handles 4-bank dp_only T8142 PHYs cleanly.
  • apple,atcphy.yaml (4-bank DP-only layout, usb2phy pinned fourth on 5/6-bank USB PHYs, orientation-switch required only with usb2phy) and apple,t8140-pmp-report.yaml (apple,t8142-pmp-v2-report-entry with T8140 fallback) are clean; pmp_report_atc2 sits cleanly under &pmp_report.
  • ps_dispext1_{sys,fe,cpu} are apple,firmware-owned (pmgr-pwrstate.c performs no register accesses).
  • §4 attribution: Clean — all 10 commits carry human author/committer + human Signed-off-by: only (preserving Dmitriy's authorship/sign-off on commit 1), zero AI commit trailers, disclosure in PR body.
  • Live CI: host-tests and dt-checks are green at 176e0f4ce3ab.
  • Non-blocking nit: When updating the branch, consider folding the in-PR fixup commits (78549a1d, bca6c112, 8c71debb, e87234c6, 176e0f4c) into the commits they fix so the commit history is clean.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:display Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) labels Nov 24, 2026
@DjDeveloperr
DjDeveloperr dismissed their stale review November 26, 2026 23:30

Superseded by the review at 899dc80

DjDeveloperr
DjDeveloperr previously approved these changes Nov 26, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve at 899dc80a4ca5. Both blockers from my earlier review are resolved, so I'm dismissing it.

Blocker 1 (the &display iommus override): fixed in 899dc80a.

  • The override is gone, so &display keeps only disp0_dart.
  • aura appends dispext1_dart itself when it hands dcpext1 over (dt_set_t8142_dcpext()).
  • The DCPEXT1 power-state comment now says why the firmware-owned states stay enabled without relying on the override.

Blocker 2 (J704 row): covered. Your J704 boots at this head show:

  • On today's aura main: the internal panel is up (eDP-1 3024x1964@120). Since main already hands dcpext1 over, HDMI-A-1 runs at 2560x1440@144 too.
  • With aura#409: /display-subsystem iommus lists disp0_dart plus the dispext1_dart that aura appended, and both outputs run.
  • On both: 0 DART faults, 0 flip timeouts, 0 failed units and 0 AVC denials.

Correction to my earlier "rows before merging": I asked for a boot on a second generation because of apple_drv.c. That wasn't needed. The change only adds apple,t8142-atcphy to the list of ATC PHY ports that add_dcp_components() skips, and no other generation's DT has that compatible. So the J704 row is the only one this PR needs.

Checked: CHECK_DTBS for j704/j813/j815 shows only the existing disp0_piodma alias warning, and dt_binding_check passes for both bindings.

Before merge: every CI check at this head shows CANCELLED (the 14:28 run), so CI needs a fresh run, and it must be green before this merges. Merging is left to the PR Merge Lane.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) ci-failing A check failed at the PR head (bot) labels Nov 27, 2026
# Conflicts:
#	arch/arm64/boot/dts/apple/t8142-j704.dts
@RyanTheTide

Copy link
Copy Markdown
Contributor

Forward-merged main for you at 6880cfd, per the 24 h rebase window (normal push, your commits untouched). The only conflict was the include list at the end of t8142-j704.dts: main added t8142-j704-audio.dtsi next to your t8142-j704-hdmi.dtsi, and both are kept. CHECK_DTBS of j704/j813/j815 shows only the existing disp0_piodma alias warning. The J704 HDMI row should be re-run at this head when you can.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 27, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Hold at 6880cfd93b3d for integration and CI.

Blockers: The reported J704 result uses both linux#2093 and aura#409. Both are open. Please retain the dependency order in the merge plan and verify the final combination boots with both internal and HDMI displays. The required host-tests job failed in setup (exit 100), so rerun after the runner dependency issue is resolved.

Checked: The binding separates the fixed DP-only four-bank form from the USB form, and the component skip uses an IP compatible rather than a board name. DT checks, Apple build and KUnit are green. Linux #2582 and aura#398 are already merged. Record the exact DTB and boot chain used for the final J704 row.

@term-guy

term-guy commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

J704 at 6880cfd9 (boot #1231): PASS, internal panel and HDMI 2560x1440@144 at once with HDMI connected at boot, 0 DART faults. The test tree's copy of every file this PR changes is identical to 6880cfd9 (it differs only in the two lines linux#2093 adds to t8142-j704-display.dtsi and t8142-j704.dts).

Details (2026-11-27, HDMI display connected before boot):

  • Kernel 7.3.0-t28+: linux#2093 70682eb1 + linux#2603 899dc80a (6880cfd9 is that head with main merged; the only conflict is the j704.dts include lines of audio and HDMI, both kept), DTB = that tree's t8142-j704.dtb + the ESP partition in /chosen. Fedora 44 KDE root, macOS 27.2 (26B123) firmware.
  • aura chain: aura#409 b790cd16 + aura#545 88d36bff, plus test-only patches in neither PR (J704 SD-reader training, the ESP Stage 2 host window, the armed-watchdog keep), USE_CLANG=1 build chainloaded over the installed aura, RAM only.
  • FDT: dcp handoff: okay, FDT: dcpext1 handoff: okay, 50 /memreserve/ entries, 208810 bytes of FDT space left; /chosen aurora,dcp-handoff and aurora,dcpext1-handoff = okay; /display-subsystem iommus = <&disp0_dart 0>, <&dispext1_dart 0>, the second appended by aura.
  • eDP-1 3024x1964 and HDMI-A-1 2560x1440@144 (set_digital_out_mode at 6.4 s, finished) on the KDE desktop at once, HDMI checked on the monitor; KWin on card1 + renderD128 (GPU up with the SRAM voltages aura#545 filled). Unplugging the monitor at 102 s gave a clean HPD unplug (dcp_hotplug() connected:0).
  • 0 failed units, SELinux enforcing with 0 AVC denials, 0 DART faults, 0 GPU faults, 0 flip timeouts, 12 kernel err lines, all known kinds.

The same chain and kernel with the monitor plugged in after boot (#1230) hotplugged to 2560x1440 the same way.

@term-guy

Copy link
Copy Markdown
Contributor Author

Could a maintainer re-run host-tests at 6880cfd9? It failed in its setup step (exit 100, https://github.com/aurora-silicon/linux/actions/runs/45949238688/job/140340962544) before any test ran, and every other check at this head is green. I can't re-run it from here (no admin rights on the repository).

The J704 row at this head is above (#1231), and the description now follows What / Tested / Risk / Not yet, with the merge order after linux#2093 (+ aura#545).

@term-guy

Copy link
Copy Markdown
Contributor Author

The DCP clock dependency moved: linux#2093 is closed (its GPU part is held, see there), and the J704 DCP's apple,clock-ids are now #3417, one DT commit on main. The merge order in the description now names #3417 instead of #2093.

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 27, 2026
@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 28, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 6880cfd after Linux #3417 and a clean check against the live base.

Checked: The hosted host-tests rerun passes on this SHA, along with dt-checks, apple-build and KUnit. The fixed DP PHY keeps the mode switch, uses the four-bank register form, and leaves orientation required for the USB bank form. The display node retains just its internal DART until the loader appends the external DART. The author reports internal and HDMI scanout, hotplug and zero DART faults on the combined J704 boot. I compared the DCP clock diff: #3417 carries the same display clock properties and provider nodes used by the earlier #2093 test stack. Keep the kernel clock prerequisite in the merge order and use the combined row as integration evidence.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 6880cfd9. App approved at this head, every hosted check green (host-tests rerun passed), J704 row PASS at this head (boot #1231: eDP + HDMI 2560x1440@144, hotplug, 0 DART faults). linux#3417 (the DCP clock prerequisite) merged as 50d9872. The only shared-code change is one more compatible (apple,t8142-atcphy) in add_dcp_components(), which no other Mac's DT carries. Your 11-26 point was taken (override dropped in 899dc80). Unless you object, this merges in 1 h under the 6-point rule, then aura#409.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at 6880cfd9. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J704-head-row;compat-only-shared-line. (5) There's no blocking review. (6) Dj was pinged here 63 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit c6f28e1 into aurora-silicon:main Nov 28, 2026
26 of 29 checks passed
satchlj pushed a commit to satchlj/linux that referenced this pull request Nov 29, 2026
Hosted Ubuntu 24.04 runners pre-install third-party apt sources such as
packages.microsoft.com under /etc/apt/sources.list.d/. Workflows that
pass -o APT::Update::Error-Mode=any abort with exit code 100 whenever
one of those unused repositories returns a transient 403/5xx (observed
on PR aurora-silicon#3270 and PR aurora-silicon#2603).

Drop non-ubuntu.sources files from /etc/apt/sources.list.d/ before
apt-get update and pass -o Acquire::Retries=3 to apt-get update/install
across the Ubuntu runner workflows. All packages installed by these
workflows come from the standard signed Ubuntu archives.

Also update tools/asahi/run-host-tests.py so failed suites print any
'not ok ' TAP lines before the 40-line log tail; previously a failure
early in a long suite like apple-dcp scrolled off the tail and could not
be identified without downloading the artifact zip.

Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:display Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants