V4l2 camera focus controls

my camera focus controls are not visible for jetpack 6.2.2. i am using arducam imx477 b0273 camera module. i am working with jetson orin nx 16gb module . camera’s showing up on i2c port and i am also able to record from the camera .

hello garvitolaniya,

FYI, focuser is not supported by default. you may check with camera partner for the driver updates.

The last update from camera provider “arducam” for this particular camera b0273 was done 6years earlier, thereafter no support. It was done during jetpack 4.x.x.

If you could explain exactly what is changed from jetpack 4.x.x to 6.2.2 i could try to modify the driver by myself

Currently camera is visible on dev/video and; V4l2 --list-ctrl gives other camera controls except the focus control (VCM motor controls)

hello garvitolaniya,

that’s huge.. please refer to Archived Documentation For Jetson Software for the release notes.

I haven’t really written a driver before and for this support i really dont know if i can trust the code block provided from LLM models

Could you please guide me a walk through on how do i go through this

hello garvitolaniya,

normally, it’s separate driver to toggle the focuser via CID controls, V4L2_CID_FOCUS_ABSOLUTE.
you may see-also Arducam’s Focuser.py and Autofocus.py, which control VCM directly at i2c address, i.e. 0x0C.

Hi garvitolaniya,

Since you can record video, the IMX477 sensor is working. The focus motor is separate, which explains why video can work while v4l2-ctl shows no focus control.

I would first check whether the lens can move using Arducam’s IMX477 focus example:

  1. Run sudo media-ctl -p -d /dev/media0 and find the IMX477 entry. An entry such as imx477 9-001a identifies I²C bus 9. Please use the bus shown on your board. The example’s -i 7 is for a Jetson Nano.

  2. Download and run the example, replacing 9 with your bus number:

    git clone https://github.com/ArduCAM/MIPI_Camera.git
    cd MIPI_Camera/Jetson/IMX477/AF_LENS
    sudo python3 FocuserExample.py -i 9
    

    Use the up and down arrow keys to change focus, and check whether the image actually becomes sharper.

If the lens moves, you have a way to set manual focus now. Arducam’s example sends commands over I²C, it does not add focus_absolute to V4L2. If your application specifically requires that V4L2 control, the next step is to add support for the focus motor as a separate device in the driver and device tree, as described in NVIDIA’s camera driver guide.

If the example does not move the lens, please share the IMX477 line from media-ctl, the exact error from the example, uname -r, and the camera driver package you installed. That will help us distinguish a bus or setup issue from other potential issues.

Best regards,
Alejandro Godínez
Embedded Software Engineer, RidgeRun

Contact us: support@ridgerun.com
Developers Wiki: https://developer.ridgerun.com
Website: https://www.ridgerun.com

i am using jetson orin nx, there is disparity in some i2c addr and hence i am not able to find the i2c for focus. hence i am not able to trigger the focus by autofocus.py or by even manual arrow instructions. yup this pin is identified to be 9 and 10 (for 2 cams) . i will soon try this once again, and will share the logs along .

echo “===== I2C / CAMERA ERRORS =====”
sudo dmesg -T | grep -iE
‘i2c|imx477|mux|nack|timeout|arbitration|transfer failed|remote io’
| tail -100
===== I2C / CAMERA ERRORS =====
[Wed Oct 21 22:13:19 2026] i2c_dev: i2c /dev entries driver
[Wed Oct 21 22:13:22 2026] tegra-i2c 3160000.i2c: Adding to iommu group 1
[Wed Oct 21 22:13:22 2026] tegra-i2c 3180000.i2c: Adding to iommu group 1
[Wed Oct 21 22:13:22 2026] tegra-i2c 31b0000.i2c: Adding to iommu group 1
[Wed Oct 21 22:13:22 2026] tegra-i2c c240000.i2c: Adding to iommu group 1
[Wed Oct 21 22:13:22 2026] i2c 1-0025: Fixing up cyclic dependency with 3520000.padctl
[Wed Oct 21 22:13:22 2026] tegra-i2c c250000.i2c: Adding to iommu group 1
[Wed Oct 21 22:13:22 2026] i2c i2c-2: Added multiplexed i2c bus 9
[Wed Oct 21 22:13:22 2026] i2c i2c-2: Added multiplexed i2c bus 10
[Wed Oct 21 22:13:22 2026] i2c-mux-gpio bus@0:cam_i2cmux: 2 port mux on 3180000.i2c adapter
[Wed Oct 21 22:13:31 2026] imx477 9-001a: tegracam sensor driver:imx477_v2.0.6
[Wed Oct 21 22:13:31 2026] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 9-001a bound
[Wed Oct 21 22:13:31 2026] imx477 10-001a: tegracam sensor driver:imx477_v2.0.6
[Wed Oct 21 22:13:32 2026] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 10-001a bound
[Thu Oct 22 00:55:46 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
[Thu Oct 22 00:55:46 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
[Thu Oct 22 00:56:10 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
[Thu Oct 22 00:56:10 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
[Thu Oct 22 00:56:15 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
[Thu Oct 22 00:56:15 2026] tegra-i2c 3180000.i2c: I2C transfer timed out
jetson@garvit:~/MIPI_Camera/Jetson/IMX477/AF_LENS$ the camera logs

the problem i am sure is not about the focuser.py file ; i have rechecked and verfied it its clear but its for this specific i2c

jetson@garvit:~/MIPI_Camera/Jetson/IMX477/AF_LENS$ date
sudo i2ctransfer -y 9 w2@0x0c 0x00 0x00
echo “i2ctransfer exit code: $?”
sudo dmesg -T | tail -40
Thu Oct 22 01:12:26 AM CST 2026
i2ctransfer exit code: 0
jetson@garvit:~/MIPI_Camera/Jetson/IMX477/AF_LENS$ date
sudo i2ctransfer -y 10 w2@0x0c 0x00 0x00
echo “i2ctransfer exit code: $?”
sudo dmesg -T | tail -40
Thu Oct 22 01:12:35 AM CST 2026
i2ctransfer exit code: 0
jetson@garvit:~/MIPI_Camera/Jetson/IMX477/AF_LENS$