Jetson customize camera

From NVIDIA/skills · View interactive version

Jetson customize camera is an AI agent skill from the GitHub repository NVIDIA/skills. Enable MIPI/GMSL camera sensors on a Jetson Thor or Orin custom carrier by rendering a kernel-DT overlay from the in-tree sensor DTSI. Do NOT use for UPHY lane allocation or ODMDATA edits.

How to use this skill

Skill file

Customize camera (CSI / MIPI / GMSL sensor bring-up)

Overview

Tegra264 (Thor) and Tegra234 (Orin) expose a single tegra-capture-vi

controller fronted by NVCSI and a fixed set of CSI ports. Camera

bring-up is:

  1. Sensor selection — picked from the set NVIDIA ships in-tree

.dtsi references for on the active platform.

  1. Carrier + module support check — verified against the Camera

Development Guide, Adaptation Guide §Camera, carrier schematic,

Module TRM, and carrier pinmap.

  1. Wiring — derived from the in-tree

tegra<soc>-camera-<sensor>*.dtsi when one exists (**the DTSI IS

the wiring source of truth**); captured per-sensor from the user

when the sensor is custom.

  1. Kernel-DT overlay — cpp-expand the in-tree DTSI, extract its

fragment@N body, append into the composite custom overlay

.dts for the active target (per

CODE0),

verify the composite with fdtoverlay.

/jetson-build-source compiles the composite and owns the

carrier conf's OVERLAY_DTB_FILE+= registration.

Agentic, not table-driven — sensor list is built at runtime by

globbing in-tree per-sensor dtbos. No _THOR_CAMERAS dict, no

questions.json, no Python renderer in the question path.

No ODMDATA edit — cameras don't consume UPHY lanes (CSI is a

separate PHY pool). The skill emits only a kernel-DT overlay; the

ODMDATA line in the carrier conf is untouched by this skill.

The output is one commit:

composite root if not already present) appended to the composite

custom overlay .dts per

CODE0

→ committed to the bsp_sources/ hardware repo.

/jetson-build-source compiles the composite to .dtbo and

owns its Makefile + flash-conf registration.

When to invoke

Owl / IMX sensor", "MIPI camera", "GMSL camera", or asks to bring

up tegra-capture-vi / NVCSI on a custom carrier.

tegra-capture-vi channels, OR sensor enumeration on a fresh

daughter-card needs to be confirmed.

(multi-sensor bring-up).

Prerequisites:

(/jetson-init-source).

in the overlay tracker.

exists and contains the in-tree per-sensor .dtsi files (sourced

by /jetson-init-source's Branch A archive extract).

contains the macro headers cpp needs (source_sync.sh may need to

run if Branch B was used — see Step 5a.i below).

Camera Development Guide (in bsp_developer_guide mirror or

separate path), Adaptation Guide §Camera, carrier schematic, SoC

TRM, Module Design Guide.

Procedure

Detailed step-by-step procedure (Steps 1–7, with all tables, code

blocks, and gates) lives in

CODE0. Summary:

  1. Step 1 — Resolve active target + open source-of-truth docs.
  2. Step 2 — Enumerate supported sensors by globbing in-tree

per-platform camera dtbos; classify as DPHY-direct / GMSL /

custom. Never invent sensors.

  1. Step 3 / 3a — Cross-check carrier + module support against

DTSI, Camera Development Guide, Adaptation Guide §Camera, SoC TRM,

Module Design Guide, schematic, and carrier pinmap. Render the

wiring table FIRST, then issue the confirm-or-customize gate.

  1. Step 4 (custom path only) — Batched per-sensor wiring

questions auto-filled from the carrier pinmap.

  1. Step 5 — Append exactly ONE /* custom-bsp: camera:<sensor> */

fragment to the composite custom overlay .dts (see

CODE0).

Clone path cpp-expands the in-tree DTSI; custom path splices Step-4

answers + mode tables in-place. Idempotently set

jetson-header-name on the composite root. Verify with

dtc + fdtoverlay (pre-compile single-fragment gate;

post-compile deep-tree uniqueness gate). Commit via the

workflow's commit-message preview gate.

  1. Step 6 — Verify ancillary CAM pin SFIOs (cam_i2c_*,

extperiph<m>_clk, reset/PWDN/PWR_EN GPIOs) via

pin_verifier.py; route mismatches to /jetson-customize-pinmux.

  1. Step 7 — Atomic-write run-state JSON sidecar at

<workspace>/target-platform/<profile-stem>.jetson-customize-camera.json

and emit the headline, then drive the downstream next-step chain via

sequential AskUserQuestion prompts per references/procedure.md

Step 7. **The chain is a documented workflow gate, not a clarifying

question — auto-mode does NOT exempt it.** Never substitute a

printed "Next step: …" line for the prompts.

Gotchas

fragment@N to the composite. A second one carrying status

overrides triggers dtc deep-merge → duplicate sibling subtrees

(e.g. two tca9546@70) → runtime first-match drops the dtsi-

supplied deep tree → camera silently doesn't enumerate. Gate on

this skill's marker only (Step 5c).

skill.** Don't widen from any in-tree per-sensor dtbo's

compatible (devkit-SKU-gated). Fix the composite root if needed.

carrier-agnostic; read once, paste onto the metadata root.

OVERLAY_DTB_FILE.** Registering both your rendered overlay AND

the in-tree tegra<soc>-p3971-camera-<sensor>-overlay.dtbo

produces a phantom subdev bind that bricks camera enumeration.

tegra-capture-vi { status="okay"; num-channels=<N>; } with no

ports / sensor / nvcsi body bricks the camera (`all channel init

failed`). Splice the FULL sensor body via cpp + dtc.

mode<N>, sensor_modes, pixel_phase — copy verbatim from the

closest in-tree DTSI.

avdd-reg / iovdd-reg / dvdd-reg strings — splice the FULL

sensor body; always-on rails fall back to dummy regulator.

Use target-path = "/tegra-capture-vi" when the label is absent;

fdtoverlay exits non-zero with FDT_ERR_NOTFOUND otherwise.

L4T source tree isn't staged. Re-run /jetson-init-source (Branch

B's source_sync.sh fetches the headers). Never fabricate the

macro expansion.

UPHY lanes. The carrier conf's ODMDATA="..." is untouched.

OVERLAY_DTB_FILE+= is owned by /jetson-build-source Step

5.0a — this skill never touches the carrier flash conf.

edits land in <source.root_path>/Linux_for_Tegra/ (overlay

tracker) and <source.root_path>/bsp_sources/ (overlay .dts)

under the pristine + customization commit pattern.

References

step-by-step Steps 1–7 procedure (extracted from this SKILL.md).

CSI / nvcsi / vi DT binding reference notes.

guidance on the metadata-root + clone-body overlay shape.

— starter .dts.tmpl templates: dphy-direct.dts.tmpl,

gmsl-serdes.dts.tmpl.

— shared HSIO pin verifier (Step 6).

— documents: block consumed by Step 1.

— overlay edit protocol.

sibling skill auto-invoked by Step 6 to fix HSIO pin SFIO

mismatches (CAM I²C, MCLK, reset GPIOs).

— must run first; produces the carrier base overlay (the

*-dynamic.dtbo) this skill's composite stacks after.

produces the overlay tracker + bsp_sources repo (with the

hardware/nvidia/<chip-dir>/ per-sensor DTSI tree) this skill

reads and commits into.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.