Repository navigation
pcie: hand off the radio port on the J715 and J604 too - #141
Merged
Merged
Conversation
RyanTheTide
reviewed
Nov 10, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the J604 (base M4 MacBook Pro 14") Wi-Fi and Bluetooth never come up on a stock tree: the radio DART
490000000.iommufails its probe with -16 andpcie-appledefers port 0 forever (Port .../pci@0,0 setup fail: -517).pcie_prepare_fdt()andpcie_handoff_fdt()act only onapple,j713, so on the J604 (and the J715) auraneither 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:
/amfm/function-reg_onis the samepKW4("gP13", 0x800000)action, and the J715 shares the J713'sboard (
t8132-j713-j715.dtsi;gpio-macsmc.clists the same action for both);enabled endpoint there (the J604's SD-reader port in
t8132-apcie-port2.dtsistays disabled);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.pynow runs every case for the J715 and the J604 too (the J773g is theboard that must be refused);
test_smp_handoff_gate.pygets a stub for the new helper. The rest of the Python suite passes, apart from the twotest_loadobjs.pycases that fail onmain as well.
integration/aurorakernel, 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 (firmware23.10.1042.0.41.51.242) joins the network and
hci_bcm4377brings up Bluetooth. The same kernel and tree with thesame 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.dtsiincludest8132-apcie-port2.dtsi), and on a failed radiohandoff kboot's fallback disables the whole controller, which would take the Ethernet with it.
Assisted-by: LLM