Skip to content

kboot: T6050: take the camera's sensor type from the ADT on every board - #362

Merged
RyanTheTide merged 7 commits into
mainfrom
sweep/t6050-isp-sensor
Nov 29, 2026
Merged

RyanTheTide merged 7 commits into
mainfrom
sweep/t6050-isp-sensor

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

dt_set_t6050_isp() (src/kboot.c:9398-9411) handed the camera over only for four boards, each pinned to one OS firmware and one sensor type: J716c 0x75 and J714s 0x74 on 27.0, K114c 0xb9 on 27.3 beta, K116s 0xbc on 27.2. That refused J714c, J716s, K114s and K116c, which have the same ISP. It also refused a listed board on any other release. Yet the value written is just the ADT isp0 sensor-type, which the OS passes to the ISP firmware as its platform id, as macOS does.

Change

  • Drop the board table. On any T6050 board whose device tree has the isp node, the handoff uses the ADT isp0 sensor-type (it must be present and nonzero).
  • The firmware checks that matter stay. The two ISP segments must have the layout the OS driver expects: sizes, IOVAs and remaps, as before. The release must be 27.0 or later. The driver selects its interface by apple,firmware-version.
  • Boards whose tree has no ISP node (J714c, J716s, K114s, K116c today, and the desktops) are unchanged: nothing is handed over until their tree describes the camera.

The table came from bbfdf09 (Jens Axboe); the handoff itself is unchanged.

Testing

  • Build rc=0. clang-format is clean on the touched lines.
  • Host tests (python -m pytest tests): 780 passed, 26 skipped.
  • No hardware run: the lab has no T6050 laptop.

Still to run

  • J714s 27.0 and K116s 27.2 (regression): FDT: T6050 ISP: ... platform 0x74 (J714s) or platform 0xbc (K116s). The camera opens in Linux as before.
  • J716c on 27.2 (newly admitted): platform 0x75, then a camera frame.
  • K114c on 27.2 (newly admitted): platform 0xb9, then a camera frame.
  • Any sibling (J714c, J716s, K114s, K116c) once its tree includes the ISP: its platform id is logged, and the camera opens.
Per-board behaviour
Board Before After
J716c 27.0 only, 0x75 any 27.x with the checked layout, ADT sensor-type
J714s 27.0 only, 0x74 same
K114c 27.3 beta only, 0xb9 same
K116s 27.2 only, 0xbc same
J714c, J716s, K114s, K116c refused ("board or firmware not in the table") no ISP node in their trees yet, so untouched; handed over once the tree has one

dt_set_t6050_isp() handed the camera over only for four boards, each
pinned to one OS firmware and one sensor type (J716c 0x75 and J714s 0x74
on 27.0, K114c 0xb9 on 27.3 beta, K116s 0xbc on 27.2). A sibling with the
same ISP (J714c, J716s, K114s, K116c) or a listed board on another
release was refused, although the value written is the ADT isp0
sensor-type, which the OS passes to the firmware as its platform id, as
macOS does.

Drop the table. Any T6050 board whose device tree has the isp node gets
the ADT sensor-type (it must be present and nonzero). The firmware is
still checked where it matters: the ISP segments must have the layout
the OS's driver expects (sizes, IOVAs and remaps, as before), and the
release must be 27.0 or later; the driver selects its interface by
apple,firmware-version.

The table came from bbfdf09 by Jens Axboe; the handoff itself is
unchanged.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Early note on this draft (no full review yet):

  1. src/kboot.c:9412 (if (os_firmware.version < V27_0) return -1;): dropping the board table is right. The new firmware-release floor is still a version gate, though, and the checks that follow already decide what matters: the ADT isp0 sensor-type must be present and nonzero, and the two segments must have the layout the OS driver expects. If an older release lays out the segments differently, the segment check already refuses it. If something else about pre-27 firmware breaks the handoff, key on that property (or the apple,firmware-version the driver selects its interface by) and say in the commit message why the floor can't go.

Assisted-by: LLM (Claude:Opus 5.5)

Aurora agent policy: remove assistant instruction files that are
not copies of .github/aurora/AGENTS.md on main, and keep the copies on policy
branches identical to it.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Still needed: drop the 27.0 release floor, or say in the commit message why the sensor-type and segment-layout checks cannot cover older releases. Then camera rows: J714s on 27.0 and K116s on 27.2 as regression, and J716c and K114c on 27.2 logging their platform id and delivering a frame; the branch also needs main merged in (the only conflict is in AGENTS.md, CLAUDE.md, GEMINI.md and .github/copilot-instructions.md; keep main's copies).

@ja-818

ja-818 commented Nov 23, 2026

Copy link
Copy Markdown

Tested the equivalent on a J716s on 27.2 (26B123): a table row with the ADT's sensor type (0x76) hands the camera over and it streams, light on. With this PR and linux #2275 the J716s should need no row of its own. Seen on one J716s (omarchy-m5 v272-17 kernel, Aura 22b7175 + omarchy-m5's patches). Report: betizzel/omarchy-m5#28.

Revert the automated agent-policy bot commit 4ec8631 that deleted assistant instruction files on this PR branch. The policy workflow has since been updated (aura#475) to stop pushing to PR branches.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
@chrisohearn

Copy link
Copy Markdown

K114s (Mac17,13) on 27.2 (26B8125): the ADT isp0 has sensor-type 0xba, cam-connections-scheme 0x10 and two segments, 0xc1c000 and 0x13d0000 bytes at iova 0 and 0xc1c000, remap 0x10000000000 and 0x10000c1c000. Windows, interrupts, dart-isp0 and pmgr states match the K116s. Read from the ADT on the machine. Those are the layout values the handoff checks keep, so it should need no row of its own with this PR and linux #2275.

What was run, on one K114s: a table row {"apple,k114s", 0xba, V27_2} on loader v1.0.0b15 (0xba, the value this PR reads from the ADT), a local kernel build with a local opt-in patch (not upstream) that lets the ISP probe without a camera-light description, and a tree with the shared ISP node as in #2275. The loader handed the camera over with platform 0xba, the driver probed, and one 1920x1080 frame with picture content was captured; no new kernel warnings or errors. The 30 s capture from #2275's test list was not run, and the hardware LED was not checked.

Not run: the K114s with this PR's head instead of the row. I can run that on the same machine once the head is settled, if that row is wanted.

Conflict in dt_set_t6050_isp(): main added the K114c row (any firmware
version) and changed the version check. Resolved to this branch's
change: no board table, the ADT sensor type on every T6050 board. A
release newer than the loader knows (V_UNKNOWN) is still taken on the
segment layout check alone, as the K114c row allowed.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

K114s (T6050) row, 2026-11-29. Boot: aura-try one-shot Stage 2 = aura b17 e2a8cf9 + aura#362, DTB = the v4 K114s DTB + #2278 media and #2275 ISP nodes (plus K114S-LADDER's #2281/#3524 nodes on the same boot), kernel 7.3.0-k114sstack3 (main 68253d52 + K114s lab PRs). Health on that boot: 0 SErrors, 0 DART faults, 0 crashes, 0 DCP crashes, 0 failed units, Enforcing. The Mac is back on its saved default.

Camera hand-off on the K114s, which has no board-table entry: built from e222677 (same tree as the PR head). The ISP takes the sensor type from the ADT: sensor 0x958, setfile isp_2224_01XX.dat. NV12 1080p30 streams (300 and 600 frames). Everything else on the boot is healthy, see above. This covers the K114s case that aura#515 added a board-table row for.

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 28, 2026 13:29
@RyanTheTide
RyanTheTide requested review from a team as code owners November 28, 2026 13:29
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Ready for review. Hardware: the K114s row above (no board-table entry; the sensor type comes from the ADT). CI: fedora/gcc/nix fail with Code and data reach the DCP log buffer after stage 1!. aura main 99b6dd1 fails the same way, a known Stage 1 room issue tracked by aura#454, so it is not from this change; clang-macos, build and alarm pass. @aurora-silicon/core code-owner ping.

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

Blockers: none (land alongside/after #551 Stage 1 room fix so gcc/fedora/nix CI pass — this PR shrinks Stage 1 by removing t6050_isp_boards[] — and wait for queued pr-text)

Checked: no Apple material, no AI attribution, human DCO Signed-off-by, removes the 4-board t6050_isp_boards[] table (+10/-28 in src/kboot.c) in favor of reading ADT isp0 sensor-type (!platform rejected) on any T6050 board whose DT describes /soc/isp, preserves all ISP segment-range, IOVA, size, and remap validation plus os_firmware.version >= V27_0 (or V_UNKNOWN), leaves boards without a DT ISP node untouched, clang-macos/build/alarm CI and 780 host tests pass (gcc/fedora/nix fail only on pre-existing main 99b6dd13 Stage 1 room #454), exact-head e222677b K114s hardware row PASS (no board-table entry; ADT sensor-type handed off, sensor 0x958, 300 & 600 NV12 1080p30 frames, 0 faults/crashes/failed units, Enforcing), branch is MERGEABLE against main.

Evidence
  • Inspected full diff (+10/-28 in src/kboot.c): deletes t6050_isp_boards[], checks os_firmware.version != V_UNKNOWN && os_firmware.version < V27_0, requires non-zero ADT_GETPROP(adt, isp, "sensor-type", &platform), and preserves t6050_isp_segments_valid() and exact segment IOVA/size/remap checks.
  • Exact-head K114s row (e222677b, 2026-11-29): camera handoff succeeded without any board-table entry (sensor 0x958, isp_2224_01XX.dat, 300 + 600 NV12 1080p30 frames, 0 SErrors/DART faults/crashes/failed units).
  • PR opened 2026-11-19 (prior to pr-text enforcement cutoff).

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks required sections (bot) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Merge readiness at 99418f62: not ready yet

Check Detail
CI at head running running: policy, policy, pr-text / pr-text, Pytest (macos-26 + llvm-brew), selftest, clang-macos
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 99418f62, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: none matched in CODEOWNERS

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

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr code-owner ping: the review App approved this at 641511f6, and the K114s row is above. The only red jobs are the four Pytest jobs that main itself fails (fixed by #570). Once #570 lands I'll update this branch with a merge commit, re-run CI and merge on green. If you want a hold, say so here.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>

@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 after validation at 232c954.

Checked: Recreated the merge of #570 with no manual resolution. The camera change remains the ADT sensor-type lookup with the DT ISP-node prerequisite. Keep landing-tree CI and size validation.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 29, 2026
@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging at 99418f62 (merge) under the 6-point rule. (1) The review App's verdict at this head: APPROVED. (2) CI is green at this head (readiness excluded). (3/4) Rows: author K114s row on unchanged code (only main merges since). (5) No blocking review is open. (6) Dj was pinged with no objection. Revert: git revert -m 1 <commit>.

@RyanTheTide
RyanTheTide merged commit 5c54418 into main Nov 29, 2026
29 checks passed
@RyanTheTide
RyanTheTide deleted the sweep/t6050-isp-sensor branch November 29, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks required sections (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants