Skip to content

arm64: dts: apple: t6050-j716c: map die 0's second MMIO window - #3662

Merged
RyanTheTide merged 1 commit into
mainfrom
fix/j716c-media-ranges
Nov 30, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
fix/j716c-media-ranges

Conversation

@erikwb

@erikwb erikwb commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: On the J716c, the shared T6050 nodes sit in die 0's soc@200000000 bus, and that bus maps only 0x2_0000_0000 + 16 GiB. Since the media engines were enabled on every board (#2278), the JPEG and encoder DARTs at 0x22_8xxx_xxxx probe without a register resource, and apple-dart oopses at boot. This adds die 0's second MMIO window to that bus on the J716c. Fixes #3618
Tested: J716c M5 Max at 03b510a: boots to the desktop (main without it never gets past the logo); JPEG/encoder DARTs probe, jpeg0/jpeg1 bind; 1 failed unit and 0 new kernel errors vs the J716c daily, except the two media probe errors listed under Not yet
Risk: two-way door · J716c only (the other ten T6050 DTBs are byte-identical)
Not yet: deep sleep on main still resets on this board until the sleep entry lowers VENC1_SYS (companion PR #3663); the AVE0 encoder still fails its probe on the J716c (firmware DATA alias is missing or invalid; separate issue, unchanged by this PR), so its power domains stay in sync_state() pending; AVD needs its firmware file installed (-ENOENT)

Details

t6050-peripherals.dtsi creates the identity-mapped unit-less /soc on every board except the J716c, so on the J716c &{/soc} resolves to die 0's soc@200000000 (ranges = <0x2 0x0 0x2 0x0 0x4 0x0>). Nodes in the die's second window have no translatable reg: Linux names them soc@200000000:iommu@22830a0000, and their platform devices get no MEM resource. Before #2278 every such node was disabled. #2278 enabled jpeg0/jpeg1, ave0 and their three DARTs, and apple_dart_probe() dereferences the missing resource.

The added entry maps that window 1:1. Its physical base and size (0x22_2000_0000, 0x1_e000_0000) are those of the J716c ADT's /arm-io ranges[1]. ranges reserves no MMIO, so the overlap with the sibling buses soc@2300000000 and soc@2308000000 claims nothing; the other boards already overlap them with their identity /soc.

The AVE0-only disable proposed on #3618 would not be enough: the two AVE0 DARTs and the JPEG DART are separate enabled nodes in the same window, and they oops the same way.

Evidence

Trial kernel 7.3.0-ewb401+ = main 972a566 + 03b510a, the J716c build config with CONFIG_VIDEO_APPLE_AVE/JPEG/PRORES=m, booted once through a watchdog-armed trial loader. The command line is the default plus watchdog.open_timeout=120 (the trial dead-man).

$ cat /proc/device-tree/soc@200000000/ranges | xxd -p
000000020000000000000002000000000000000400000000000000222000
0000000000222000000000000001e0000000
apple-dart 22830a0000.iommu: params 1e313020 31121083 2a2a0204 00010010, version 0204, 16 streams, ...
apple-dart 2283080000.iommu: params 2e313040 301100e3 2a2a0204 00101010, version 0204, 16 streams, ...
apple-dart 2281020000.iommu: params 2e313020 302200a3 2a2a0204 00021002, version 0204, 2 streams, ...
apple-jpeg 2281000000.jpeg: JPEG encoder, HWREV 0x110010
apple-jpeg 2281060000.jpeg: JPEG encoder, HWREV 0x110010
video10: apple-jpeg   video11: apple-jpeg   video12: apple-prores   video13: apple-prores-decode
apple-ave 2283100000.video-encoder: error -ENODEV: firmware DATA alias is missing or invalid

No Unable to handle/Internal error/Oops in dmesg. systemctl is-system-running: degraded, from aurora-peripherals.service only, which fails the same way on the J716c daily (7.3.0-ewb342+). Kernel errors at err level and above: 4 unique lines. Two match the daily (systemd-gpt-auto-generator); the other two are the AVE0 DATA-alias error above and avd 2309080000.avd: probe with driver avd failed with error -2, from nodes the daily does not enable. No SELinux on this install.

Without this change, main (de965eb, booted the same way on this Mac with a console attached) oopses at about 0.22 s in apple_dart_probe() for soc@200000000:iommu@22830a0000 (no MEM resource), before the console comes up.

Offline: an FDT walker translated every reg of every node under a simple-bus, for each T6050 board DTB built from 972a566 with and without the commit:

DTB untranslatable reg entries on main with the change DTB bytes
t6050-j716c 242 (10 on enabled nodes) 0 changed: die 0 ranges only
other 10 T6050 boards 0 0 identical

checkpatch.pl -g HEAD: 0 errors, 0 warnings.

On the J716c the shared T6050 inventory is placed in die 0's soc node,
not in a unit-less /soc with identity ranges. Die 0's bus only maps
0x2_0000_0000 + 16 GiB, so nodes in the die's second MMIO window
(0x22_2000_0000 + 7.5 GiB: media, JPEG, encoder) have no translatable
reg. Since t6050-media.dtsi enabled the JPEG and encoder nodes and their
DARTs, the DARTs probe without a MEM resource and apple-dart oopses on
it at boot.

Map the window 1:1 in die 0's ranges on this board. Its physical base
and size are those of the J716c ADT's /arm-io ranges[1]. Every reg in
the J716c DTB now translates; the other T6050 DTBs are unchanged.

Fixes: 88d188d ("arm64: dts: apple: t6050: enable the media engines on every board")
Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team as code owners November 29, 2026 22:48
@erikwb
erikwb requested review from LiamRay11 and maralcbr November 29, 2026 22:48
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Merge readiness at 03b510a3: ready to merge

Check Detail
CI at head ok 6 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at 03b510a3
Conflicts ok none
PR text ok Risk: two-way · J716c only (the other ten T6050 DTBs are byte-identical)

Areas: area:bringup
Merge: gh pr merge 3662 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 03b510a3 — DT fix is clean; waiting on hosted dt-checks / host-tests at head.

Blockers:

  • Hosted CI at 03b510a3 (dt-checks, host-tests, readiness) is still queued (pr-text passed). Ready to approve once dt-checks completes cleanly.

Checked:

  • Audited the single-file, board-only diff (arch/arm64/boot/dts/apple/t6050-j716c.dts, +12/-0, DCO Signed-off-by present, MERGEABLE on main):
    • Adds die 0's second MMIO window <0x22 0x20000000 0x22 0x20000000 0x1 0xe0000000> ([0x22_2000_0000, 0x24_0000_0000), 1:1) to &die0 (soc@200000000), fixing #3618 where jpeg/ave0 DARTs at 0x22_8xxx_xxxx had no translatable MEM resource and caused apple_dart_probe() to oops at boot on main.
    • Confirmed ranges reserves no MMIO so sibling bus overlap is benign and matches the identity /soc on other T6050 boards.
  • Verified exact-head 03b510a3b6a1 J716c M5 Max boot row PASS (boots to desktop, all 3 DARTs probe, jpeg0/jpeg1 bind, 0 oopses, 0 new failed units vs daily; offline FDT translation confirms 0 untranslatable reg entries on t6050-j716c and all 10 other T6050 DTBs byte-identical).
Evidence
  • arch/arm64/boot/dts/apple/t6050-j716c.dts L67–L70: &die0 ranges adds <0x22 0x20000000 0x22 0x20000000 0x1 0xe0000000>, isolated strictly to J716c.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 03b510a3

Blockers: none

Checked:

  • Hosted dt-checks, host-tests, pr-text, and readiness checks at 03b510a3 have all passed, clearing the prior HOLD.
  • Single-file, board-only diff (arch/arm64/boot/dts/apple/t6050-j716c.dts, +12/-0, DCO Signed-off-by present) adds die 0's second MMIO window (<0x22 0x20000000 0x22 0x20000000 0x1 0xe0000000>) to &die0, fixing #3618 boot oops in apple_dart_probe().
  • Exact-head 03b510a3b6a1 J716c M5 Max boot row passes (boots to desktop, all 3 media DARTs probe, jpeg0/jpeg1 bind, 0 oopses, 0 new failed units; 0 untranslatable reg entries on t6050-j716c and all 10 other T6050 DTBs byte-identical).
Evidence
  • dt-checks (46319827171), host-tests, pr-text, and readiness: SUCCESS at 03b510a3b6a19d86bd49116067b0fbf57cac9300.
  • Companion merge order: land #3662 ahead of #3663 so J716c boots cleanly on main and closes #3618.

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

Approving at 03b510a3. This fixes the J716c regression from #2278, which enabled jpeg0/jpeg1, ave0 and their DARTs without checking that their reg translates on the J716c's die-0 bus. Sorry for that.

Checked:

  • The added window matches T6050 /arm-io ranges[1]. The J873S 27.0 ADT has parent 0x22_2000_0000, size 0x1_e000_0000, the same base and size used here, mapped 1:1 like window 0.
  • Only t6050-j716c.dts changes. Your table shows the other ten T6050 DTBs byte-identical, with 0 untranslatable reg entries before and after. So K114s/K116s/J714s/J873S, where #2278's rows ran, are untouched.
  • Agreed that an ave0-only disable (#3618's first trial) would not be enough, because the JPEG DART sits in the same window.
  • The two remaining J716c probe errors (AVE0 DATA alias, AVD -ENOENT firmware file) are on nodes the daily never enabled, and they fail cleanly. They are not regressions from this PR. I'll track the AVE0 DATA alias on #3618's follow-up.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 03b510a3. The review App and RyanTheTide (code owner) approved at this head and all hosted checks are green (CLEAN). Rows: J716c exact-head desktop boot; the 10 peer T6050 DTBs are byte-identical. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 37a19f9 into main Nov 30, 2026
11 checks passed
@RyanTheTide
RyanTheTide deleted the fix/j716c-media-ranges branch November 30, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

J716c (M5 Max) hangs at boot since #2278: ave0 encoder with pmgr4 enabled

2 participants