Skip to content

pcie: hand off the radio port on the J715 and J604 too - #141

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
aeries0x:j604-radio
Nov 10, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
aeries0x:j604-radio

Conversation

@aeries0x

@aeries0x aeries0x commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

On the J604 (base M4 MacBook Pro 14") Wi-Fi and Bluetooth never come up on a stock tree: the radio DART
490000000.iommu fails its probe with -16 and pcie-apple defers port 0 forever (Port .../pci@0,0 setup fail: -517). pcie_prepare_fdt() and pcie_handoff_fdt() act only on apple,j713, so on the J604 (and the J715) aura
neither raises the radio's gP13 rail nor puts the radio DART's SID16 into bypass. The DART stays as iBoot left it, the kernel's
managed-radio admission refuses it, and the port waits for a DART that never binds.

The J604 and the J715 have the J713's radio port:

  • the J604 ADT's /amfm/function-reg_on is the same pKW4("gP13", 0x800000) action, and the J715 shares the J713's
    board (t8132-j713-j715.dtsi; gpio-macsmc.c lists the same action for both);
  • their trees describe the same managed streams on port 0 of the built-in controller, and the radio is the only
    enabled endpoint there (the J604's SD-reader port in t8132-apcie-port2.dtsi stays disabled);
  • Linux already admits the managed radio on both (apple_t8132_managed_radio()).

This adds pcie_radio_board_fdt() (J713, J715, J604) and uses it for the rail, the bypass and kboot's failure fallback
(disable the controller instead of refusing the boot), in place of the four J713-only checks.

Testing

  • tests/python/test_m4_pcie_power_fdt.py now runs every case for the J715 and the J604 too (the J773g is the
    board that must be refused); test_smp_handoff_gate.py gets a stub for the new helper. The rest of the Python suite passes, apart from the two test_loadobjs.py cases that fail on
    main as well.
  • J604 (Mac16,1), macOS 26.6.2 firmware, current integration/aurora kernel, chainloaded aura main 21a70e6 + usb: wait for XferNotReady before every no-data status stage #139 +
    dapf: hand off the MTP filter on the J604 too #137 + this change, two cold boots (the second after a power-off with the radio up): the radio DART probes
    (j713_radio_fault_state: managed 0x6, no errors), port 0 links up, BCM4388 rev 6 Wi-Fi (firmware
    23.10.1042.0.41.51.242) joins the network and hci_bcm4377 brings up Bluetooth. The same kernel and tree with the
    same loader minus this change gives the -16/-517 above.

J715 and J773g

I could test only the J604. The J715 is in because it is the J713's board, and a J715 owner on Discord reports no
Wi-Fi on an installer build, which is what this fixes on the J604. The J773g is left out although its reg-on matches:
its Ethernet shares the controller (t8132-desktop.dtsi includes t8132-apcie-port2.dtsi), and on a failed radio
handoff kboot's fallback disables the whole controller, which would take the Ethernet with it.

Assisted-by: LLM

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

format-check fails on this head: src/pcie_fdt.c:190:37: error: code should be clang-formatted. The two-line condition in pcie_fdt_enable_pwren() fits on one line now that the call is shorter; clang-format -i src/pcie_fdt.c fixes it. Everything else is green (build, stage1-clang, all Pytest jobs).

The J715 shares the J713's board, and the J604's /amfm/function-reg_on
is the J713's pKW4("gP13", 0x800000) action too. On both the radio is
the only enabled endpoint on port 0 of the built-in controller (the
J604's SD reader port stays disabled in its tree), their trees list the
same managed streams, and Linux already admits the managed radio there.
Without the gP13 rail and the static SID16 bypass the radio DART stays
as iBoot left it, the kernel refuses to adopt it (-EBUSY) and port 0
defers forever.

Gate the rail, the bypass and the failure fallback on these three boards
instead of the J713 alone. The J773g stays out: its Ethernet shares the
controller, and the fallback disables the whole controller.

Assisted-by: LLM
Signed-off-by: Friedrich <261542475+aeries0x@users.noreply.github.com>
@aeries0x

Copy link
Copy Markdown
Contributor Author

Fixed: src/pcie_fdt.c is clang-formatted now (clang-format 20.1.8, the version format-check uses), so the condition sits on one line. Nothing else changed. format-check, both builds and the Python suite pass locally on the new head; only the two test_loadobjs.py cases fail, as they do on main.

@RyanTheTide
RyanTheTide merged commit 2c872cf into aurora-silicon:main Nov 10, 2026
9 checks passed
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.

2 participants