Skip to content

arm64: dts: apple: t6050: describe the single-die system cache controller - #2540

Open
erikwb wants to merge 1 commit into
j716c/display-takeover-readyfrom
j716c/t6050-cache-planes
Open

erikwb wants to merge 1 commit into
j716c/display-takeover-readyfrom
j716c/t6050-cache-planes

Conversation

@erikwb

@erikwb erikwb commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Single-die T6050 boards (M5 Pro and M5 Max, all including arch/arm64/boot/dts/apple/t6050-max.dtsi) have no apple,t6050-mcc node, so apple-mcc never binds and system level cache allocation stays disabled. In addition, the single-die T6050 laptop framebuffer@0 nodes do not name &dcp as their display, so apple-mcc cannot know when the internal DCP is still scanning out the boot framebuffer.

Change

  • Add soc@2220000000/mcc (compatible = "apple,t6050-mcc", apple,boot-dma-devices = <&dcp>) to arch/arm64/boot/dts/apple/t6050-max.dtsi, shared by all single-die T6050 boards (j714c, j714s, j716c, j716s, j775c, j873s, k114c, k114s, k116c, k116s).
  • List the four die-0 AMCCs (AMCC 0..3, 0x2220000000..0x22260c0000, 16 planes of 16 KiB each) verified across both M5 Pro (amcc-enable-mask = 0xf) and 614 GB/s M5 Max (amcc-enable-mask = 0xff). M5 Max also ships a 460 GB/s binned variant under the same board device trees whose /arm-io/mcc amcc-enable-mask has not been read from hardware yet, so AMCC 4..7 stay out of the static reg list (and remain non-allocating) until the boot loader populates reg from the live ADT's amcc-enable-mask. The parent bus ranges (0x22_20000000, size 0x10000000) already covers all eight die-0 AMCCs for that update.
  • Add display = <&dcp> to framebuffer@0 on every single-die T6050 laptop (t6050-j714c.dts, t6050-j714s.dts, t6050-j716c.dts, t6050-j716s.dts, and t6050-k114-k116.dtsi). drivers/soc/apple/mcc.c (apple_mcc_scans_boot_framebuffer()) parses display on enabled simple-framebuffer nodes so apple-mcc waits for the internal DCP to retire the boot scanout before enabling cache allocation (and keeps allocation off when the boot loader keeps simpledrm with &dcp disabled); simpledrm itself ignores display.
  • Desktop boards (t6050-j775c.dts and t6050-j873s.dts) also inherit the MCC node, have no boot framebuffer, and keep &dcp disabled in t6050-peripherals.dtsi. Under soc: apple: mcc: wait for display controllers to retire boot scanout #2538 a disabled apple,boot-dma-devices supplier holds apple-mcc in safe probe deferral, so desktop boards stay with cache allocation off until the boot loader enables dcp.

Stack:

Testing

Still to run

  • Boot this rebased 16-plane shared t6050-max.dtsi stack (#2538 5b302458 + #2539 7803302b + #2540) on J716c and a second M5 Max board (e.g. J714c or J716s) to confirm apple-mcc ... allocation enabled on 16 planes after boot scanout retired, internal panel up, 0 new kernel errors, and 0 failed units.
  • Confirm /arm-io/mcc amcc-enable-mask on a binned 460 GB/s M5 Max once someone with that SKU can read it (we only have a 614 GB/s 8-AMCC J716c locally).
  • Follow-up in the boot loader to populate mcc's reg from the live ADT's /arm-io/mcc amcc-enable-mask so 6-AMCC (460 GB/s) and 8-AMCC (614 GB/s) M5 Max parts enable their upper planes automatically without per-SKU DT tables.

Assisted-by: LLM (Anthropic:Claude, Google:Gemini 4 Neon, OpenAI:GPT-6.2 Sol)

@RyanTheTide

Copy link
Copy Markdown
Contributor

No blockers.

Checked the 32 register windows against t6050-ultra.dtsi's die-0 list (AMCC a at 0x2220000000 + a * 0x2000000, planes at +0x40000, 16 KiB each: they match), that &dcp resolves to t6050-peripherals.dtsi:2673, and how drivers/soc/apple/mcc.c consumes the two properties.

  1. arch/arm64/boot/dts/apple/t6050-j716c.dts:31-59: the MCC is part of the T6050 Max die, not of this board, but it is described only in the J716c file. J714c, J716s and K114c include the same t6050-max.dtsi and get no system level cache. t604x.dtsi, t8140.dtsi and t6050-ultra.dtsi describe the node in the SoC file; do the same in t6050-max.dtsi (with apple,boot-dma-devices = <&dcp>, which every T6050 board has through t6050-peripherals.dtsi) and keep only display = <&dcp> on each board's framebuffer. Without that framebuffer property, mcc.c:194 never waits for the scanout to retire, so the boards should get it together with the node.
  2. PR text: "Nothing in the kernel parses display on a simple-framebuffer" is not right: drivers/soc/apple/mcc.c:149 (apple_mcc_scans_boot_framebuffer) parses it, and that is what makes the cache wait for the boot scanout. Please correct the description. Also the commit message carries "Developed with Claude Code."; drop it from the commit and put an Assisted-by: LLM (...) line last in the PR body instead of the generated-with line.

HW row: after the move, one other Max board (J714c or J716s) on this stack: apple-mcc ... allocation enabled on 32 planes after boot scanout retired, internal panel up, 0 new kernel errors, 0 failed units.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Heads-up before moving the 32-plane MCC node into t6050-max.dtsi: M5 Pro boards include t6050-max.dtsi too, and they only have 4 of 8 AMCCs enabled (16 planes), not 8 AMCCs (32 planes).

Measured on a live J714s (14-inch M5 Pro, T6050):

  • /arm-io/mcc reports amcc-count = 8, amcc-enable-mask = 0xf (AMCC 0..3 only).
  • /chosen/lock-regs/amcc lists only 4 apertures: 0x2220000000, 0x2222000000, 0x2224000000, 0x2226000000 (plane-count = 4, plane-stride = 0x40000 -> 16 planes total).
  • Pre-kernel reads of all 16 enabled planes show +0x82c = 0x1, +0x2800 = 0x8000000c, +0x2804 = 0x0c000c00 (12 data/tag ways), +0x2844 = 0x0.

If t6050-max.dtsi carries all 32 planes (0x2220..0x222e) unconditionally, M5 Pro boards (t6050-j714s.dts, t6050-j716s.dts, t6050-j873s.dts, t6050-k114s.dts, t6050-k116s.dts) would inherit AMCC 4..7 (0x2228..0x222e) which are disabled on M5 Pro, so any shared t6050-max.dtsi MCC node needs M5 Pro boards to override reg to their 16 enabled planes (or keep 8-AMCC Max and 4-AMCC Pro reg lists separate).

On J714s with the 16-plane MCC node and display = <&dcp> on framebuffer@0, apple-mcc enables SLC allocation cleanly (system level cache allocation enabled on 16 planes), cutting P-core 16–32 MiB latency roughly in half (16 MiB 54.3 -> 28.7 ns, 24 MiB 101.0 -> 46.7 ns, 32 MiB 105.4 -> 56.7 ns, matching macOS 27.0) and speeding up Borealis Vulkan compute.light submits by 1.50x (156.99 -> 104.82 µs) with 0 AVC denials, 0 new failed units, and 0 new kernel errors. We also confirmed on J714s that without #2538/#2539 apple-mcc enables before apple-dcp finishes async RTKit startup, confirming the value of display = <&dcp> on framebuffer@0 here too.

Assisted-by: LLM (Claude:Opus 5.5, Google:Gemini 4 Neon)

@erikwb
erikwb force-pushed the j716c/t6050-cache-planes branch from f3a64c0 to 5c4935f Compare November 22, 2026 00:56
@erikwb erikwb changed the title arm64: dts: apple: describe the J716c system cache controller arm64: dts: apple: t6050: describe the single-die system cache controller Nov 22, 2026
@erikwb

erikwb commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Gemini 4 Neon responding on behalf of erikwb

Updated PR #2540 (5c4935f1c194) to address both reviews:

  • Shared MCC node (t6050-max.dtsi) and M5 Pro / binned M5 Max safety (@RyanTheTide, @DjDeveloperr): Moved soc@2220000000/mcc (apple,t6050-mcc, apple,boot-dma-devices = <&dcp>) into arch/arm64/boot/dts/apple/t6050-max.dtsi, listing the 4 AMCCs (0x2220000000..0x22260c0000, 16 planes) verified across both M5 Pro (amcc-enable-mask = 0xf) and M5 Max (0xff). We left AMCC 4..7 out of the static reg list because M5 Pro disables them and M5 Max also ships a 460 GB/s binned variant under the same board DTS whose mask is unverified; ranges stays sized (0x10000000) for all 8 die-0 AMCCs so the boot loader can populate the full enabled mask from the live ADT in a follow-up.
  • Boot framebuffer display = <&dcp>: Added display = <&dcp> to framebuffer@0 on all single-die T6050 laptops (t6050-j714c.dts, t6050-j714s.dts, t6050-j716c.dts, t6050-j716s.dts, and t6050-k114-k116.dtsi) so apple_mcc_scans_boot_framebuffer() waits for DCP retirement (and keeps SLC off under simpledrm).
  • PR text and commit trailers (@RyanTheTide): Corrected the PR description to state that drivers/soc/apple/mcc.c (apple_mcc_scans_boot_framebuffer()) parses display on simple-framebuffer, removed Developed with Claude Code. from the commit message, and replaced the PR footer with Assisted-by: LLM (...).
  • Verification: Rebuilt and decompiled all 11 t6050-*.dtb files (defconfig, 0 warnings; all 10 single-die boards have 16 planes and boot-dma -> dcp@48ae00000; all 8 single-die laptops have framebuffer@0 display -> dcp@48ae00000; t6050-j775d.dtb unchanged at 64 planes); scripts/checkpatch.pl reports 0 errors and 0 warnings. Hardware re-test on J716c + a second Max board is noted under "Still to run".

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, both points are fixed at 5c4935f. The controller is now in t6050-max.dtsi (lines 481-519), listing the four AMCCs that both M5 Pro and M5 Max enable, apple,boot-dma-devices = <&dcp> is set, and every single-die laptop framebuffer names &dcp. The description and commit trailer are corrected too.

Two smaller things:

  • t6050-j775c.dts and t6050-j873s.dts also pick up the node, but they have no boot framebuffer, and &dcp stays disabled (t6050-peripherals.dtsi:2686). With soc: apple: mcc: wait for display controllers to retire boot scanout #2538 a disabled supplier holds the controller in probe deferral (drivers/soc/apple/mcc.c:206-215), so unless the loader enables dcp on desktops, they get no cache allocation. That fails safe. Can you confirm what a desktop boot shows, or say in the commit message that desktops stay off until the loader enables dcp?
  • The comment assumes AMCC 0..3 are enabled on the binned 460 GB/s M5 Max. If you can get one, its /arm-io/mcc amcc-enable-mask would confirm that.

Rows still needed on this head: J716c with the shared 16-plane node ("allocation enabled on 16 planes" after "boot scanout retired", panel up, no new errors), plus one more M5 Max board (J714c or J716s). The J714s row from #2708 covers M5 Pro. #2539 and #2540 also still sit on the previous #2538 head (bddfd57), not 5b30245.

Assisted-by: LLM (Claude:Opus 5.5)

…ller

Single-die T6050 boards all include t6050-max.dtsi. M5 Pro parts enable
four of the eight die-0 AMCCs (AMCC 0..3, 16 planes, amcc-enable-mask
0xf), while M5 Max ships in both 460 GB/s (binned) and 614 GB/s (eight
AMCCs, 32 planes, amcc-enable-mask 0xff) variants under the same board
device trees.

Describe the die-0 memory cache controller (apple,t6050-mcc) in
t6050-max.dtsi with the four AMCCs (16 planes) verified across both M5
Pro and M5 Max and apple,boot-dma-devices = <&dcp>, so neither M5 Pro
nor a binned M5 Max reads unverified AMCC 4..7 apertures. Size the
parent bus ranges for all eight die-0 AMCCs so the boot loader can
populate the full enabled mask from the live ADT.

Add display = <&dcp> to the boot framebuffer node on every single-die
T6050 laptop (J714c, J714s, J716c, J716s, and the K114/K116 base) so
apple-mcc waits for the internal DCP to retire the boot scanout before
enabling cache allocation, including when the bootloader keeps the boot
framebuffer and leaves the DCP disabled. Desktop boards (t6050-j775c.dts
and t6050-j873s.dts) also inherit the MCC node, have no boot framebuffer,
and keep &dcp disabled, so they stay in safe probe deferral with no cache
allocation until the boot loader enables dcp.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb
erikwb force-pushed the j716c/display-takeover-ready branch from 6195f71 to 7803302 Compare November 22, 2026 07:24
@erikwb
erikwb force-pushed the j716c/t6050-cache-planes branch from 5c4935f to 2bd59c8 Compare November 22, 2026 07:24
@erikwb

erikwb commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Gemini 4 Neon responding on behalf of erikwb

Rebased #2540 onto the rebased #2539 (7803302be7ee, sitting on #2538 5b302458524f) in 2bd59c882c1e and addressed both notes:

  • Desktop boards (t6050-j775c.dts, t6050-j873s.dts): Updated both the commit message and PR body to state explicitly that those boards have no boot framebuffer and keep &dcp disabled, so under soc: apple: mcc: wait for display controllers to retire boot scanout #2538 apple-mcc stays in safe probe deferral with no cache allocation until the boot loader enables dcp (neither board has booted Linux yet).
  • Binned 460 GB/s M5 Max amcc-enable-mask: We do not have a binned 460 GB/s M5 Max locally (only a 614 GB/s 0xff J716c), so we cannot read its /arm-io/mcc amcc-enable-mask yet; noted this honestly in the PR body under Change and Still to run.
  • Verification on 2bd59c882c1e: Built all 11 t6050-*.dtb targets with defconfig (0 errors, 0 warnings), ran CHECK_DTBS=y on t6050-j716c.dtb, t6050-j714s.dtb, and t6050-j775c.dtb (no warnings on mcc or framebuffer@0), ran python3 tools/asahi/mcc-boot-dma-tests.py (PASS), and scripts/checkpatch.pl (0 errors, 0 warnings). The J716c + second M5 Max board live boot rows remain under "Still to run".

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. 2bd59c8 is the same device tree change as 5c4935f, rebased onto #2539 7803302 and #2538 5b30245, and the commit message now says the J775c and J873s desktops stay in probe deferral with cache allocation off until the loader enables dcp. That matches drivers/soc/apple/mcc.c:205-215 at 5b30245. Leaving AMCC 4..7 out until the 460 GB/s part's amcc-enable-mask can be read is the safe choice.

No further code comments. What's left is the boot row on this head: J716c with the shared 16-plane node ("allocation enabled on 16 planes" after "boot scanout retired", panel up, no new errors), plus J714c or J716s.

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.

Pre-PR checklist review at 2bd59c882c1e (0 code/DT/policy blockers; holding for CI and §5 live-head hardware proof):

Stack & Dependencies

  • Stacked cleanly on live #2539 (7803302be7ee, which sits on #2538 5b302458524f and #2518 e6fdaf6d4b23). Must land after #2518, #2538, and #2539 so apple-mcc waits for apple-dcp to retire the boot framebuffer before enabling SLC allocation.

DT & Safety Audit

  • arch/arm64/boot/dts/apple/t6050-max.dtsi: soc@2220000000 ranges (0x22 0x20000000, size 0x10000000) covers all 8 die-0 AMCCs and matches t6050-ultra.dtsi; mcc: memory-controller@2220000000 (apple,t6050-mcc) lists the 16 planes of AMCC 0..3 (0x2220..0x2226, 4 x 16 KiB planes each at +0x40000) verified on both M5 Pro (amcc-enable-mask = 0xf) and 614 GB/s M5 Max (0xff). Keeping AMCC 4..7 out of static reg until the boot loader populates reg from the live ADT avoids touching unverified apertures on M5 Pro and binned 460 GB/s M5 Max parts.
  • Board coverage & phandles: Verified &dcp resolves to t6050-peripherals.dtsi:2673 across all 10 single-die T6050 boards including t6050-max.dtsi (j714c, j714s, j716c, j716s, k114c, k114s, k116c, k116s, j775c, j873s), and t6050-j775d.dts (t6050-ultra.dtsi) is untouched. All 8 single-die laptops get standard display = <&dcp>; on framebuffer@0 (valid under Documentation/devicetree/bindings/display/simple-framebuffer.yaml). Desktops (t6050-j775c.dts, t6050-j873s.dts) have no boot framebuffer and keep &dcp disabled, failing safe in probe deferral under #2538 (now accurately documented in both commit message and PR body).
  • Note on binned 460 GB/s M5 Max: Acknowledged honestly in the PR body that its live /arm-io/mcc amcc-enable-mask has not been read yet; follow-up boot-loader ADT population remains the right long-term path.

Pre-PR Checklist (§1–§6)

  • §1 No model gating: PASS — shared in t6050-max.dtsi for all single-die T6050 boards with no per-board code gates.
  • §2 Production-ready: PASS — pure DT description, default cmdline.
  • §3 Safety: PASS — conservative verified 16-plane static reg; laptops wait for DCP retirement (and stay off under simpledrm); desktops stay safely deferred until &dcp is enabled.
  • §4 Clean-room & attribution: PASS — commit 2bd59c882c1e carries human author/committer and human Signed-off-by: only; PR body carries Assisted-by:.
  • §5 Evidence: HOLD — J714s (M5 Pro, 16 planes + display = <&dcp>) is covered by #2708, but live-head rows on 2bd59c882c1e are still needed:
    1. J716c boot with the shared 16-plane node (allocation enabled on 16 planes after boot scanout retired, panel up, 0 SELinux denials, 0 failed units, 0 new kernel errors).
    2. One additional M5 Max board (e.g. J714c or J716s) with the same verification + regression row.
  • §6 Naming: PASS.

CI Status

  • 0 GitHub Actions checks ran on 2bd59c882c1e because this PR targets stacked branch j716c/display-takeover-ready (dt-checks.yml and host-tests.yml only trigger on integration/aurora / aurora-wip). dt-checks CI will need to run and pass once retargeted after #2538/#2539 land.

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