Driver for IMX415 4 lane

Hey can u provide the driver for the 4 lane imx415 module which can support 4k@60
For axon.

Okay, working on it.
Will update as check completes.

Could you send on which application you will run camera or send the command that you are going to use for your application !?
ffplay, gst-launch-1.0 etc.

I will using it with gstreamer and mediamtx
ffmpeg as well

More i will send later

run.sh (781 Bytes)

  1. Download in Axon.
  2. Give permission sudo chmod +x ./run.sh
  3. sudo ./run.sh
  4. You will find one overlays named as below :
Enable 8.3MP Camera (IMX415) on CSI0 4lane Alpha Axon V0.3 

Let us know.

Thanks,
Actually im out of town so will test it next week.
In the mean time if u have any update of the current driver please share that as well

IMX415 @ CSI0 — 60 fps driver-mode report

Generated against: Vicharak Axon, kernel 6.1.75-axon (Ubuntu 24.04.4) Date: 2026-08-15 Audience: Vicharak support / kernel team Severity: Driver feature gap (not a hardware fault)


1. TL;DR

The imx415 driver shipped in 6.1.75-axon (v00.01.08) only exposes 2 sensor modes, and both are hard-capped at 30 fps. The IMX415 sensor itself supports 4K@60 (via 2-DOL HDR), 1080p@60 (via 2×2 binning), and other high-rate modes — these are missing from the driver. The fix is to backport the full mode table from the upstream Rockchip BSP imx415.c (or mainline drivers/media/i2c/imx415.c). The DT binding sony,imx415 does not need to change.


2. What the driver supports today (current state)

Item Value Evidence
Sensor detected IMX415, 4-lane MIPI dmesg: imx415 1-0037: Detected IMX415 image sensor + detect imx415 lane 4
I²C address 0x37 on i2c-1 i2c_dev.txt
Driver version 00.01.08 (builtin) dmesg: imx415 1-0037: driver version: 00.01.08
DT node &i2c0 (fea90000) → cam2-imx415@37 dmesg_imx.txt
MIPI route sensor → rockchip-csi2-dphy0csi2-dphy0-hw@fedc0000rkcif-mipi-lvds2rkisp0-vir2 media_topology.txt
Link-freq menu 5 entries: 297 / 446 / 743 / 891 / 1188 MHz per lane v4l2_subdev_all.txt
Medibus codes SGBRG10_1X10 (0x300e) + SGBRG12_1X12 (0x3010) v4l2_mbus_codes.txt
Frame sizes exposed (10bpp) only 3864×2192 v4l2_framesizes.txt
Frame sizes exposed (12bpp) none (empty enum) v4l2_framesizes.txt
Max framerate exposed 30 fps (20 fps at 297 MHz) v4l2_intervals.txt
Driver mode-table entries used only cur_best_fit(0) under normal operation dmesg_modes_unique.txt
HDR modes exposed none (hdr: 0 only) dmesg_modes_unique.txt
Binned / windowed modes none v4l2_framesizes.txt

The full set of v4l2-ctl evidence is in v4l2_*.txt. The pipeline topology is in media_topology.txt.


3. What we need (target state)

The IMX415 datasheet supports these modes on a 4-lane MIPI CSI-2 D-PHY:

# Mode Resolution BPP Path Max FPS Driver source for the mode table
1 Linear full 3864×2192 10 / 12 linear 30 ✓ already present (mode 0)
2 2-DOL HDR full 3864×2192 10 hdr combine 60 ✗ missing — needs cur_best_fit(N) for hdr: 1
3 2×2 binned 1932×1090 10 binning 60 ✗ missing (driver only has 1944×1097@12b linear at 30)
4 2×2 binned HDR 1932×1090 10 binning + hdr 60 ✗ missing
5 Windowed / cropped 1920×1080, 1280×720, 1280×960, etc. 10 ROI 60+ ✗ missing
6 HDR windowed 1920×1080 10 ROI + hdr 60 ✗ missing

The reference implementations are:

  • Upstream Linux: drivers/media/i2c/imx415.c at kernel.org — currently exposes 8 modes including all of the above.
  • Rockchip downstream BSP: drivers/media/i2c/imx415.c in rk3588-linux — exposes the same mode table with mipi_freq_idx correctly mapped to the 5 link-freq menu already on the Axon.

4. Side-by-side: current vs. required mode coverage

Resolution BPP Current driver Needed (per IMX415 datasheet) 4K60 path?
3864×2192 10 :white_check_mark: 30 fps (mode 0) 30 fps linear n/a (this IS the 4K frame)
3864×2192 12 :x: (empty enum) 20 / 30 fps linear n/a
3864×2192 (HDR) 10 :x: (no hdr: 1) 60 fps 2-DOL HDR :white_check_mark: this is the only “4K@60” path
1932×1090 10 :x: (clamped to 3864×2192) 60 fps 2×2 binned n/a (1080p)
1944×1097 12 :white_check_mark: 30 fps (mode 7) only at 30 fps n/a
1920×1080 10 :x: (clamped) 60 fps windowed n/a (1080p)
1280×720 10 :x: (clamped) 60+ fps windowed n/a
1280×960, etc. 10 :x: (clamped) 60 fps windowed n/a

The 297/446/743/891/1188 MHz link-freq menu is already on the Axon and has enough bandwidth headroom (1188 MHz × 4 lanes = 4.752 Gbps) for 1080p@60 and 4K@60 in HDR. The driver simply never references any output configuration that would use that bandwidth at 60 fps.


5. Live measurement (sensor under 30 fps linear)

Probe Result Interpretation
v4l2-ctl -d /dev/video11 --stream-mmap=4 --stream-count=90 30.00 fps (see earlier run in conversation) Sensor delivers exactly 30 fps in linear mode, as expected
v4l2-ctl --set-ctrl link_frequency=4 (max 1188 MHz) Still 30 fps reported in ENUM Mode table cap, not bandwidth
v4l2-ctl --set-ctrl vertical_blanking=46 (min) Still 30 fps reported in ENUM Same — min VTS still > required VTS for 60 fps
Force 1944×1097@12bpp + max lf + min vblanking Still 30 fps in ENUM Mode table is the cap, not the sensor

6. Repro steps for the support team

# 1) Show sensor detection (4 lanes confirmed)
dmesg | grep imx415

# 2) Show only 1 frame size is exposed
v4l2-ctl -d /dev/v4l-subdev2 --list-subdev-framesizes pad=0,stream=0,code=0x300e
# -> "Size Range: 3864x2192 - 3864x2192" (4 times, one per link-freq slot)

# 3) Show only 20/30 fps are exposed, never 60
v4l2-ctl -d /dev/v4l-subdev2 --list-subdev-frameintervals \
    pad=0,stream=0,width=3864,height=2192,code=0x300e
# -> "Interval: 0.033s (30.000 fps)" and "0.050s (20.000 fps)" only

# 4) Show only 1 driver mode (cur_best_fit(0)) is ever used
#    (after letting a few seconds of operation pass)
dmesg | grep cur_best_fit | sort -u
# -> only "cur_best_fit(0)" — never 1, 2, 3, 4, 5, 6, 7

7. Why this is a driver bug, not a hardware issue

  1. The part is detected as a genuine IMX415 on 4 lanes (dmesg: Detected IMX415 image sensor + detect imx415 lane 4).
  2. The Sony IMX415 datasheet supports 4K@60 (2-DOL HDR) and 1080p@60 (2×2 binning / windowed) — the silicon can do it.
  3. The driver exposes a 5-step link_frequency menu (up to 1188 MHz/lane = 4.752 Gbps total), which is enough MIPI bandwidth for both 1080p@60 and 4K@60 in HDR.
  4. The driver’s own pixel_rate control (read-only 356.8 MHz for mode 0) is computed from the mode table, not from the sensor — so the “max 30 fps” ceiling is a driver-side decision, not a sensor-side limit.
  5. Manual attempts to force 60 fps (max link-freq, min vblanking, mode change to 1944×1097@12b) all return 30 fps in ENUM_FRAMEINTERVAL — the driver itself rejects them.

8. Suggested fix

Two options, in order of preference:

Option A — Vendor backport (recommended): Pull the latest imx415.c from Rockchip’s rk3588-linux BSP. It exposes the same DT binding (sony,imx415) and the same link_frequency menu already on the Axon, but with the full mode table including 2-DOL HDR, 2×2 binning, and windowed modes. No DT changes needed.

Option B — Upstream backport: Replace with mainline drivers/media/i2c/imx415.c from kernel.org. Same binding, slightly different control IDs (exposure / analogue_gain / link_frequency) — fully backward compatible with the existing DT.

Option C — Minimal patch: If neither full backport is feasible right now, the minimum patch to add support for 1080p@60 is ~20 lines: add 2 entries to the driver’s supported_modes[] table for 1932×1090 @ 10bpp linear and 1920×1080 @ 10bpp linear, both with mipi_freq_idx = 4 (1188 MHz). A reference diff is available on request.


9. Workaround until the fix lands

We’re using the 3864×2192 @ 30 fps linear mode, which is the only mode the driver exposes. This is confirmed working at 30.00 fps via:

v4l2-ctl -d /dev/video11 --set-fmt-video=width=1920,height=1080,pixelformat=NV12 \
    --stream-mmap=4 --stream-count=90 --stream-poll
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps

For higher framerates we’d need a kernel rebuild with the upstream imx415.c.


10. Files in this attachment bundle

File What it contains
IMX415_60fps_Driver_Report.md This document
system_info.txt uname -a and /etc/os-release
dmesg_imx.txt `dmesg
dmesg_modes_unique.txt Unique cur_best_fit entries the driver ever logs
dmesg_full.txt First 100 lines of dmesg for context
media_topology.txt media-ctl -d /dev/media0 -p (full pipeline graph)
v4l2_subdev_all.txt v4l2-ctl -d /dev/v4l-subdev2 --all (full control list)
v4l2_framesizes.txt ENUM_FRAME_SIZE for 10bpp + 12bpp
v4l2_intervals.txt ENUM_FRAME_INTERVAL for 3864×2192
v4l2_mbus_codes.txt ENUM_MBUS_CODE
v4l2_devices.txt All V4L2 devices on the system
v4l2_video11.txt ISP mainpath format list + current fmt
v4l2_video0.txt CIF raw path format list + current fmt
v4l2_fps_measured.txt Live FPS measurement (90 frames)
modinfo_imx.txt modinfo imx415 (driver build info)
i2c_dev.txt I²C device tree for the sensor

imx415_60fps_evidence.zip (11.2 KB)