Skip to content

iommu: apple-dart: Preserve secure roots when starting the T6050 ISP - #1252

Merged
DjDeveloperr merged 2 commits into
integration/aurorafrom
ewb/j716c-camera-dart
Nov 9, 2026
Merged

DjDeveloperr merged 2 commits into
integration/aurorafrom
ewb/j716c-camera-dart

Conversation

@erikwb

@erikwb erikwb commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

The J716c camera shares its T6050 DARTs with a secure core, so a full controller reset would clear translation roots that the host does not own. Add an ISP-specific compatible and reset only host streams, admit mappings on streams 0 and 12, and preserve the retained state across system sleep.

The source implementation streamed 150 NV12 frames at 1920×1080 and about 30 fps on J716c with kernel 7.3.0-ewb56+, without kernel errors during the test. This extraction onto integration/aurora compiles for ARM64; the combined camera changes pass 44 ISP KUnit tests in QEMU and the applicable device-tree schema checks. The integration port itself has not been booted on hardware.

Camera enablement also needs the companion ISP driver and J716c device-tree changes, plus a compatible bootloader handoff.

Created with GPT-6 Astra in Codex (T3 Code).

Identify the ISP DARTs separately so the driver can reset host-owned
streams without disturbing the secure core's translation roots.

Developed with Claude Code.
Signed-off-by: Erik Bourget <erik@ebourget.net>
The T6050 ISP shares its DARTs with a secure core. A full reset clears
translation roots outside the host's ownership.

Reset and invalidate only the host streams, admit client mappings on
streams 0 and 12, and preserve the retained translation state across
system sleep. Refuse a locked controller or a pending fault at reset.

Developed with Claude Code.
Signed-off-by: Erik Bourget <erik@ebourget.net>

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

Tested on the 14-inch M5 Pro (J714sAP, T6050, macOS 27.0 firmware) together with #1253 and #1254. The camera streams.

Setup: PR1012 +platform kernel with #1252, #1253 and #1254 cherry-picked unchanged. The J714s DT includes #1254's t6050-j716c-isp.dtsi, because the J714sAP ADT describes the same ISP, DARTs and DAPF. aura gets a J714s port of the J716c camera handoff (4c2b33e8: sensor type 0x74 on J714s, 0x75 on J716c; same two firmware segments).

Evidence:

  • 5828c0000.iommu, 5828e0000.iommu and 582900000.iommu bind to apple-dart with apple,t6050-isp-dart. 580000000.isp joins IOMMU group 3 and binds to apple-isp.
  • The capture went through these DARTs: 90/90 NV12 1920x1080 frames at 30.08 fps, then three more 60-frame runs at 30.12 fps, 0 frames flagged with an error. No DART fault and no ISP error in dmesg afterwards.
  • The J714sAP ADT agrees with the stream split here: dart-isp0 sid = streams 0 and 12, exclave-sid = 4/5 and 8/9, and remap = 1, 6, 7, 10, 11.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Retested before merging on the M5 Pro (J714sAP, bare metal, SSD boot), kernel 7.3.0-m5-merge: the M5's integration kernel with this round's rebased heads in place of the old ones (every PR's own patch identical to what is merged; logs in work/m5-pr-merge-20261109). CI green.

Before merging, this round (these 14 PRs, #1323 and the rebased #1254/#1306/#938/#1316/#1199) was test-merged in order onto integration/aurora f9cf6f9 with no conflicts: apple-dt-check.sh 414 → 414 warning lines (0 new) over 137 DTBs, all 20 changed bindings pass, and a local host-test run fails only where integration itself fails with this host's newer toolchain. A full arm64 build of the same set on 8d98b7a was clean.

  • The three ISP DARTs bind and the camera streams through them: 90/90 NV12 1920x1080 frames at 30.07 fps, 0 flagged errors, no DART fault in dmesg.
  • KUnit on integration + this round's merge set: apple-dart and apple-dart-firmware-leaf pass (camera config 72/73, 1 unrelated skip).

🤖 Generated with Claude Code

@DjDeveloperr
DjDeveloperr merged commit cfd9a2d into integration/aurora Nov 9, 2026
2 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