Skip to content

arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 - #2582

Open
term-guy wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
term-guy:j704-pcie-port0
Open

term-guy wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
term-guy:j704-pcie-port0

Conversation

@term-guy

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

Copy link
Copy Markdown
Contributor

t8142-j704-pcie.dtsi describes apcie ports 0 (BCM4388 Wi-Fi/Bluetooth) and 2 (GL9755 SD reader) behind one generic ECAM host, with an MSI controller covering both ports' MSI blocks and both DARTs enabled. The bootloader trains port 0 only (aura's j813_n1_prepare(), with aura W1: aurora-silicon/aura#398), so port 2 is never brought up.

This describes port 0 only, as t8142-j813-n1.dtsi does: ECAM buses 0-1 (reg 0x200000), port 0's MSI block, port 0's DART; port 2's node, its iommu-map entry and the pcie2_dart enable are dropped. The SD reader can come back once a bootloader trains port 2. A comment records where port 2 is.

Tested on a J704 with Fedora 44's aurora 7.3.0 kernel (CONFIG_PCIE_APPLE_MSI=y) and an equivalent tree (our Fedora tree plus these PCIe nodes; the only difference from this branch is that its DARTs lack the newer power-domains = <&ps_apcie_sys_gp>):

pcie-apple-msi 488028000.msi-controller: 32 MSIs at 0xfffff000
pci 0000:01:00.0: [14e4:4434] type 00 class 0x028000 PCIe Endpoint
pci 0000:01:00.1: [14e4:5f72] type 00 class 0x028000 PCIe Endpoint
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4388c2-pcie for chip BCM4388/6
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4388/6 wl0: Aug 26 2026 05:28:29 version 23.10.1042.0.41.51.242

Wi-Fi scans 2.4 and 5 GHz and associates (NetworkManager, KDE); Bluetooth hci0 is powered and the BLE scan finds devices. Remaining noise: of_irq_parse_pci: failed with rc=-22 for each function (no INTx map; MSI is used) and no iommu-map translation for id 0x0 for the root port. make W=1 apple/t8142-j704.dtb adds no warning.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks good to me. The ECAM size, bus range, iommu-map, MSI window and DART enable all shrink together to port 0, and the comment records where port 2 sits for when it gets trained.

One small thing: the tested kernel's DARTs lacked the power-domains = <&ps_apcie_sys_gp> this branch carries. A boot of exactly this tree on the J704, checking Wi-Fi and Bluetooth again, would cover that difference. It would also help #2587, which is stacked on this.

Assisted-by: LLM (Claude:Opus 5.5)

@term-guy

Copy link
Copy Markdown
Contributor Author

Thanks. I booted exactly this tree on the J704: t8142-j704.dtb built from 15a449a, unchanged apart from /chosen/asahi,efi-system-partition for the installed root. Kernel is Fedora 44's aurora 7.3.0 (CONFIG_PCIE_APPLE_MSI=y).

pcie-apple-msi 488028000.msi-controller: 32 MSIs at 0xfffff000
apple-dart 488000000.iommu: params 9e313020 341100a3 2a2a0204 00011013, version 0204, 19 streams, ...
pci-host-generic 1cb0000000.pcie: ECAM at [mem 0x1cb0000000-0x1cb01fffff] for [bus 00-01]
pci 0000:01:00.0: [14e4:4434] type 00 class 0x028000 PCIe Endpoint
pci 0000:01:00.1: [14e4:5f72] type 00 class 0x028000 PCIe Endpoint
PM: genpd: Disabling unused power domains
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4388c2-pcie for chip BCM4388/6
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4388/6 wl0: Aug 26 2026 05:28:29 version 23.10.1042.0.41.51.242

The DART with power-domains = <&ps_apcie_sys_gp> probes with no genpd or DART errors, also with genpd turning off unused domains (no pd_ignore_unused). The link is 5 GT/s x1.

  • Wi-Fi: a scan finds networks on 2.4 GHz and 5 GHz. It associates (5 GHz, VHT80, 2 streams), gets DHCP, and ping works.
  • Bluetooth: hci0 is powered, and a 20 s scan finds 8 devices.

The noise is the same as before (of_irq_parse_pci: failed with rc=-22, no iommu-map translation for id 0x0), plus id 0x10 for the second root port (00:02.0), which still enumerates on bus 0 with nothing behind it.

I ran the BLE scan on this tree merged with #2587, which merges cleanly. The PCIe nodes are the same in both builds.

AI-assisted (Assisted-by: LLM), tested by me on the hardware.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train adversarial review (MERGETRAIN-LINUX2) at 15a449a: NO BLOCKERS.

Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below.

Full review

#2582 arm64: dts: apple: t8142-j704: Keep the PCIe host to the trained port 0 @15a449a6

VERDICT: NO BLOCKERS

Checked on the merge: no remaining reference to the dropped port02/sdhci0 labels in any
J704/T8142 file. pcie2_dart stays defined and disabled in t8142-peripherals.dtsi:5-12. Its
other user, apcie2_piodma (:303-311), is disabled and not enabled on J704. The single-entry
reg on pcie0_msi is within the binding (apple,pcie-msi.yaml reg: minItems: 1) and matches
J813 (t8142-j813-n1.dtsi:33). bus-range <0 1>, the 0x200000 ECAM reg, the iommu-map and
the DART enable all shrink together. Only t8142-j704-pcie.dtsi is touched, so no other Mac
is affected. term-guy's exact-tree J704 boot (Wi-Fi associate + DHCP + ping, BT scan,
genpd-unused off, no DART errors) covers the head.

Nits:

  • Commit hygiene: 15a449a carries an Assisted-by: LLM trailer. It is already pushed, so per
    our rule it stays (NIT, not a blocker). New commits should carry only the Signed-off-by.
  • The commit message depends on aura#398 ("j813_n1: T8142: accept J704's BCM4388 on apcie port
    0"), which is still OPEN. Without it the default aura does not train port 0 on J704, and
    Wi-Fi/BT do not come up with or without this PR. Merge order: aura#398 first, or say in the
    PR that the DT is inert until then.
  • The root port 00:02.0 still enumerates on bus 0 with no bus number of its own ("no iommu-map
    translation for id 0x10"). That is harmless, but a comment line saying it is expected would
    stop the next reader chasing it.

Missing rows:

  • make dtbs_check for t8142-j704.dtb (only W=1 dtb was claimed; the buildbox needs the
    dtschema venv).
  • None on other Macs (J704-only file).

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

Pre-PR checklist review at 15a449a600c7: 1 blocker (§4 attribution).

Code, DT, and Safety Audit (§1–§3, §6)

  • Clean. Touches only arch/arm64/boot/dts/apple/t8142-j704-pcie.dtsi (J704-only).
  • bus-range (<0 1>), ECAM reg (0x200000), iommu-map, single-entry pcie0_msi reg (valid under apple,pcie-msi.yaml, minItems: 1, matching t8142-j813-n1.dtsi:33), and dropping &pcie2_dart all shrink consistently to port 0.
  • Verified no remaining references to port02, sdhci0, or pcie2_dart in any J704 DT file; pcie2_dart and apcie2_piodma remain disabled in t8142-peripherals.dtsi.
  • CI: dt-checks and host-tests are green.

Blockers

  1. §4 commit trailers: Commit 15a449a600c7 includes an Assisted-by: LLM trailer in the commit message. Per §4 of the pre-PR checklist, commits must carry human author/committer identity and human Signed-off-by: only, with zero Assisted-by: or AI trailers in commit messages (disclosure stays in the PR body only).

§5 Evidence & Runtime Notes (non-blocking)

  • Exact-tree J704 boot (Wi-Fi 2.4/5 GHz associate + DHCP + ping, BT hci0 scan, power-domains = <&ps_apcie_sys_gp> with genpd disabling unused domains and no DART errors) is well documented; please also state the explicit §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) on the updated head.
  • Note that runtime port-0 training on J704 still depends on aurora-silicon/aura#398 (currently open); this DT change is safe and harmlessly inert until that lands.

Assisted-by: LLM (Gemini 4 Neon)

The bootloader trains apcie port 0 only (aura's j813_n1_prepare(), the
same sequence as J813, accepting J704's BCM4388 since
aurora-silicon/aura "j813_n1: T8142: accept J704's BCM4388 on apcie
port 0"). Port 2 (GL9755 SD reader) stays untrained, but the tree gave
the generic ECAM host buses 0-2, gave the MSI controller port 2's MSI
block and enabled port 2's DART.

Describe port 0 only, as J813 does: ECAM buses 0-1, port 0's MSI block
and DART. The SD reader comes back once port 2 is trained.

Tested on a J704 (Fedora 44, 7.3.0 aurora kernel with
CONFIG_PCIE_APPLE_MSI=y) with the equivalent tree: 01:00.0 BCM4388
[14e4:4434] rev 06 with brcmfmac (4388C2 firmware 23.10.1042) scans
2.4 and 5 GHz and associates through NetworkManager; 01:00.1
[14e4:5f72] with hci_bcm4377 gives hci0, BLE scan finds devices;
"pcie-apple-msi: 32 MSIs at 0xfffff000".

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

Copy link
Copy Markdown
Contributor Author

Updated (a9553e1):

  • The commit now carries only my Signed-off-by; the disclosure is the last line of the description.
  • Added the comment Ryan suggested above iommu-map: 00:02.0 still enumerates on bus 0 and has no entry there, so "no iommu-map translation for id 0x10" is expected. It is a comment only: the J704 DTB is byte-identical to 15a449a's, so the boots above apply to this head.
  • make CHECK_DTBS=y apple/t8142-j704.dtb: only the existing aliases: 'disp0_piodma' warning, which comes from the display tree, not this file.
  • As the description says, this is inert until aura#398 trains port 0 on the J704.

J704 boot on this head merged with #2587's (DTB byte-identical to the earlier one), resident aura replaced by aura#398's current head, installed 7.3.0 kernel, on-Mac self-test: ECAM bus 00-01, 01:00.0 [14e4:4434] + 01:00.1 [14e4:5f72], wld0 associated on 5 GHz with DHCP, ping 3/3; Bluetooth powered, 20 s scan 5 devices. 0 SELinux denials (enforcing), 0 failed units, 0 new kernel errors. The kernel error lines are the known ones: of_irq_parse_pci: failed with rc=-22 per function (no INTx map, MSI is used), and the DCP bind -22 that this bare tree gives without #2093's DCP data.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at a9553e1 (range-diff against 15a449a): the Assisted-by: LLM trailer is gone and the only other change is a comment in t8142-j704-pcie.dtsi explaining the expected "no iommu-map translation for id 0x10" for port 2's root port. Nothing functional changed, so your exact-tree J704 boot (Wi-Fi associate + DHCP + ping, BT scan, no DART/genpd errors) still covers it. Approved from my side; it still depends on aura#398 for port 0 to train with the default loader, and dt-checks is queued.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide RyanTheTide 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.

Approved at a9553e1: trailer + comment-only change since the J704 exact-tree boot.

@term-guy

Copy link
Copy Markdown
Contributor Author

A note from linux#2603's testing: on today's integration tip, a kernel booted with the default J704 DT (all three of pcie0_msi, pcie0_dart and pcie2_dart enabled) hangs on the J704 before the console, with no output. With this PR applied (port 0 only, pcie2_dart disabled) and aura#398 training port 0, the same kernel boots: 01:00.0 [14e4:4434] and 01:00.1 [14e4:5f72] enumerate, Wi-Fi associates and Bluetooth scans, 0 SELinux denials, 0 failed units. So this PR is also what makes the tip's default J704 tree boot. Details are in #2603 (comment).

Assisted-by: LLM (Claude:Opus 5.5)

@term-guy

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr could you re-review at a9553e19abce? The §4 blocker from your review at 15a449a6 is fixed: the commit carries only my Signed-off-by, and the disclosure is the last line of the description. The §5 regression counts at this head are in #2582 (comment) (0 SELinux denials, 0 failed units, 0 new kernel errors). The only other change is a comment in the dtsi. Ryan approved at this head. Port 0 still trains only with aura#398.

Assisted-by: LLM (Claude:Opus 5.5)

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

Re-review at a9553e19abce against the pre-PR checklist (§1–§6) and live integration/aurora (70a00e583b03): 0 blockers — approved.

Verified

  • §1–§3 (DT correctness, scope, safety): Clean. Scoped strictly to arch/arm64/boot/dts/apple/t8142-j704-pcie.dtsi (not superseded on integration/aurora). bus-range <0 1>, ECAM reg (0x200000), iommu-map, single-entry pcie0_msi reg (valid under apple,pcie-msi.yaml and matching t8142-j813-n1.dtsi), and dropping port02/sdhci0/&pcie2_dart all shrink consistently to port 0, with zero dangling references across t8142-j704*.dts*. The comment above iommu-map documents the expected id 0x10 message for root port 00:02.0.
  • §4 (Attribution & clean-room): Resolved. Commit a9553e19abce carries human author/committer and human Signed-off-by: only, with zero AI trailers in the commit; disclosure is in the PR body.
  • §5 (Evidence): Exact-head J704 boot (DTB byte-identical to 15a449a6) confirms ECAM bus 00–01, BCM4388 01:00.0 Wi-Fi 5 GHz association + DHCP + ping 3/3, 01:00.1 Bluetooth hci0 scan, pcie0_dart with power-domains = <&ps_apcie_sys_gp> under genpd unused-domain teardown, and 0 SELinux denials, 0 failed units, 0 new kernel errors (and resolves the early boot hang on the current tip J704 DT with pcie2_dart enabled). Runtime port-0 training still depends on aurora-silicon/aura#398.
  • §6 (Naming & live CI): Clean. Live CI dt-checks and host-tests are both green.

Assisted-by: LLM (Gemini 4 Neon)

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