Skip to content

feat(camera): support e-con e-CAM81_CUONX (AR0821) on JAJ#105

Draft
dakejahl wants to merge 1 commit into
mainfrom
feat/econ-cam81-jaj
Draft

feat(camera): support e-con e-CAM81_CUONX (AR0821) on JAJ#105
dakejahl wants to merge 1 commit into
mainfrom
feat/econ-cam81-jaj

Conversation

@dakejahl

Copy link
Copy Markdown
Collaborator

Summary

Adds e-con e-CAM81_CUONX (8MP AR0821 with on-module ISP/MCU, UYVY out) support on the JAJ target: the vendored and ported driver, two JAJ overlays (dual 2-lane and CAM1-only 4-lane for 4K30), and a usage doc at docs/cameras/econ-cam81/README.md. Compile- and DT-apply-validated; bench validation on hardware is still pending.

Problem

e-con only ships this camera for L4T 35.x (kernel 5.10, in-tree kernel/nvidia drivers) as full replacement DTBs for the NVIDIA dev kit. Nothing existed for our R36.5.0 nvidia-oot tree or ARK carriers, and the camera can't ride the existing Bayer/argus path at all: it is an MCU-fronted YUV device with its own V4L2 control set and I2C-flashed firmware.

Solution

Port the ar0821 driver to kernel 5.15 / nvidia-oot and vendor it via kernel_overlay/ with a fail-loud build.sh registration next to the IMX708 one. The port is small: pad ops take v4l2_subdev_state, and e-con's subdev g_parm/s_parm become g/s_frame_interval — R36's VI channel already routes VIDIOC_[GS]_PARM there via v4l2_[gs]_parm_cap, so none of e-con's kernel/VI framework patches are needed (the driver references none of those symbols). Their dev-kit DTBs are converted into two jetson-io overlays wired per ARK's flash-validated JAJ CSI topology (CAM0 = serial_a/port-index 0 + lane_polarity 6 rather than e-con's serial_b; the adapter's PCA6408 expander binds through the stock ti,tca6408 compatible with the BOOT0/RESET pins left unhogged so the driver can request them). The module builds warning-free under the oot -Werror against the staged R36.5 tree, and both dtbos compile and fdtoverlay-apply onto the built JAJ base DTB. CAM0-on-2-lane has no working prior art from e-con and is flagged as pending bench validation in the docs.

Vendor e-con's ar0821 MCU-based camera driver (L4T 35.4.1 release) into
kernel_overlay/ and port it to the r36 kernel/nvidia-oot APIs: pad ops take
v4l2_subdev_state, subdev g_parm/s_parm become g/s_frame_interval (the r36 VI
channel routes VIDIOC_[GS]_PARM through v4l2_[gs]_parm_cap), and the dead MCU
stream-on path is dropped. The MCU firmware ships embedded in the module and
is flashed over I2C on version mismatch.

Add two JAJ overlays built from e-con's devkit DT: dual (both ports, 2-lane)
and CAM1-only 4-lane (4K30). CSI wiring follows the flash-validated ARK
IMX708/IMX219 topology (CAM0 = serial_a/port-index 0, lane_polarity 6) rather
than e-con's serial_b choice; the adapter's PCA6408 expander binds via the
stock pca953x ti,tca6408 compatible, with BOOT0/RESET pins left unhogged for
the driver.

Module compiles warning-free against the staged r36.5 tree; both dtbos
compile and fdtoverlay-apply onto the built JAJ base DTB. Hardware
validation on the bench is still pending.
@dakejahl
dakejahl marked this pull request as draft July 13, 2026 22:10
@dakejahl

dakejahl commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Bench bring-up notes (paused)

Software on this PR is largely in place and on the test JAJ (driver loaded, dual overlay selected via jetson-io, DT nodes okay). The camera still never probes: adapter LED never lights, i2cdetect on cam mux buses 9/10 is blank, pca953x @ 0x20 fails with -121, and ar0821 @ 0x42 stays deferred waiting on that expander. IMX219/477/708 still work on the same CSI ports, so the carrier rail/I2C path is fine.

What we already tried

  • FFC matrix exhausted (same-side / opposite-side, both contact orientations) on both CAM0 and CAM1.
  • Overlay experiments on the bench JAJ: drop carrier CAM*_PWDN hog, PCA hog pin 7 only, add vcc-supply (used &hdr40_vdd_3v3p3768_vdd_3v3_sys is not a symbol on the JAJ base DTB). Redeployed + rebooted; still no LED / no ACK.

Likely next steps

  1. Hard power check on the ACC-RB-WTB-ADP: meter CN3 pin 1 (VCC_3P3) to pin 4 (GND) with Jetson on and FFC seated (pin 1 is marked; JST SM04B-SRSS — don’t probe the 0.5 mm FFC). ~3.3V → adapter rail alive, chase CN2/module/LED; 0V → no power into the ACC board (cable mapping or dead input rail).
  2. If 0V after a known-good cable: treat the adapter/module as suspect (e-con docs warn reverse FPC can damage the kit; stock e-con FPC is aimed at NVIDIA’s mirrored CSI pinout vs JAJ’s RPi-style numbering).
  3. If 3.3V + 0x20/0x42 appear: finish probe, then revisit CSI wiring — JAJ dual currently uses CAM0 serial_a/port-index 0; e-con stock + working JAJ IMX477 use serial_b/port-index 1 for CAM0; CAM1 4-lane serial_c/2 is the safer first port.
  4. Optionally land the DT tweaks from this session (PWDN hog removed, PCA hog pin 7, vcc-supply) if they aren’t already on the branch tip, and document the CN3 meter check + NVIDIA-vs-JAJ FPC pinout caveat in docs/cameras/econ-cam81/README.md.

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.

1 participant