Repository navigation
kboot: export the ATC tunables on the M4 Max laptops - #147
Conversation
The J614c and J616c ADTs have the J614s's per-port ATC and USB controller tunables on atc-phy0..2 and usb-drd0..2. Export them the same way. Their HDMI PHY (port 3) has no USB tunables and keeps the ones its device tree describes. Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
No remaining blocking source findings in the reviewed/integrated net change. The ATC handoff requires matching T6041/J614c-or-J616c identities and exports validated per-port tunables transactionally; a failed port stays disabled and HDMIATC3 is excluded. It is the source prerequisite for Linux1476, not permission to deploy a new default Stage1/Stage2. Posted J614c USB3/orientation/display evidence is attributed; newly approved current-head CI must pass.
Approval does not waive pending CI, dependency order, hardware-safety gates or source-versus-release qualification. No source merge is an installed-loader write or a new hardware test.
Apply the wrapping required by CI's clang-format 20.1.8. No non-whitespace source bytes change. Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
The format retry got past dependency setup and found a real clang-format violation in t6041_max_atc(). Pushed 634d853 as a normal child of your existing9163d519, preserving contributor ancestry. It changes only src/kboot_atc.c line wrapping; the exact non-whitespace byte sequence is identical. The entire changed file passes CI's pinned clang-format20.1.8 --dry-run --Werror, and git diff-tree --check passes.
No functional source/test/config/hardware change or new binary build. Existing source approval and per-board hardware evidence keep their scope; current CI is required before merge, with the Linux1476 pair and stack ordering retained. No rerun of the superseded failed job is needed.
On the M4 Max laptops (T6041 J614c and J616c) the USB-C ports only run at USB 2.
kboot_setup_atcexports the ATC PHY and USB controller tunables only on the J614s. Other boards take the generic path, which finds no tunables foratc-phy,t6040, so their device trees hardcode a USB 2 setup.I read the J614c's ADT from the running machine (26.6.2), and it has the J614s's ATC:
atc-phy0..2areatc-phy,t6040, with every tunablej614s_atc_tunableslists;usb-drd0..2have the controller tunables;atc-phy3, the HDMI PHY, has the 9 PHY tunables but no USB ones.This takes the J614s path on the J614c and J616c too, for ports 0–2. Port 3 is left alone, because the HDMI PHY keeps the tunables its device tree describes. As on the J614s, a port whose export fails has its PHY and controller disabled.
The kernel side, which drops the hardcoded tunables and wires up SuperSpeed, is aurora-silicon/linux#1476. With today's device trees, which still hardcode some of those tunables, the loader appends a second copy of each. The values are the same, so the ports should keep working at USB 2. I haven't tested that combination.
Tested on a J614c (built with
USE_CLANG=0 RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1, on 0a1f501 and onmain):Not tested on the J616c.
🤖 Generated with Claude Code