Skip to content

kboot: export the ATC tunables on the M4 Max laptops - #147

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
joske:pr/t6041-atc-usb3
Nov 11, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
joske:pr/t6041-atc-usb3

Conversation

@joske

@joske joske commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

On the M4 Max laptops (T6041 J614c and J616c) the USB-C ports only run at USB 2. kboot_setup_atc exports the ATC PHY and USB controller tunables only on the J614s. Other boards take the generic path, which finds no tunables for atc-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..2 are atc-phy,t6040, with every tunable j614s_atc_tunables lists;
  • usb-drd0..2 have 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 on main):

  • all three PHYs get their 11 tunables, and the HDMI PHY keeps its 9;
  • a Samsung T7 Shield runs at SuperSpeed Plus Gen 2x1 (10 Gbps) on each of the three ports, in both plug orientations, with 663 MB/s sequential reads;
  • a DisplayLink dock enumerates at 5 Gbps;
  • HDMI and USB-C DisplayPort still work.

Not tested on the J616c.

🤖 Generated with Claude Code

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

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

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.

@DjDeveloperr
DjDeveloperr merged commit b2b6da2 into aurora-silicon:main Nov 11, 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