Hey everyone, I’m having two issues with my Arducam IMX519 PDAF&CDAF Autofocus Camera Module on a Jetson board.
First, the lens on the module is physically loose, which is causing really blurry images no matter what I try. But the bigger headache I’m hoping someone can help with is around the driver setup.
Every time I install the IMX519 driver using the official script, it completely wipes out my custom pinout configuration. I’ve got SPI, PWM, and a handful of GPIO pins set up for other peripherals, and the camera install just steamrolls over all of it.
Also, once the camera is actually working, I need access to exposure time and ISP gain controls. Are those exposed through the driver? I couldn’t find clear docs on that.
Has anyone dealt with getting the IMX519 to coexist with a custom pinout? Any pointers appreciated.
Welcome to the forum! That’s a couple of different things to untangle here.
For the loose lens — that sounds like a hardware defect. You might want to reach out to the vendor about a replacement, as that’s not really fixable through software.
Regarding the pinout conflict — can you share exactly which installation method you used and what your custom pinout looks like? That’ll help narrow down what’s clashing. The IMX519 driver install modifies the device tree / expansion header configuration, so knowing what pins you’ve assigned to SPI, PWM, and GPIO will tell us where the overlap is.
After that, the camera works fine — I get video, autofocus responds, everything. But my SPI, PWM, and GPIO pins that I’d previously configured through the Jetson pinmux / device tree are completely gone. All reverted back to defaults.
My custom config had SPI1 on pins 19/21/23/24, PWM on pin 32, and a few GPIO outputs on pins 11, 13, and 15. After the camera install script finishes and I reboot, none of those work anymore.
Okay, that makes sense. The install_full.sh script regenerates the device tree and flashes a new pin configuration that’s optimized for the camera — it doesn’t preserve your existing pinmux settings.
One thing you can try: after the camera install completes, have you attempted to re-apply your pin configuration using the NVIDIA Jetson pin configuration tool? The theory is you’d install the camera first, then layer your custom pinout on top. That way the camera device tree nodes should still be present while you override the non-camera pins.
If I run the Jetson pin config tool after the camera driver is installed, it overwrites the camera-related pinmux entries and the camera stops working — I get /dev/video0 errors and the IMX519 isn’t detected anymore.
Then if I re-run the camera install script to fix the camera, it blows away my SPI/PWM/GPIO again.
I’ve gone back and forth three times now and I can’t get both working at the same time. It’s like each tool has its own complete header configuration and has no awareness of what the other one needs. Am I missing some way to merge them, or is there a manual device tree approach I should be looking at?
You’ve hit the nail on the head — that’s exactly the root cause. Both tools operate on the full expansion header configuration independently. The install_full.sh script flashes a complete pinmux that’s camera-optimized, and the NVIDIA Jetson pin configuration tool does the same for your custom setup. Neither one knows about the other’s requirements, so whichever you run last wins and the other’s configuration gets wiped.
There is a way around this, but it requires using a different tool in the right order. Arducam actually ships a Jetson-IO utility that’s designed specifically for this coexistence scenario.
Here’s the approach:
First, run the camera install script as usual:
cd ~
./install_full.sh -m imx519
On the very first boot after installation completes, instead of using the standard NVIDIA pin config tool, use Arducam’s Jetson-IO tool:
sudo /opt/arducam/jetson-io/jetson-io.py
In the Jetson Expansion Header Tool that opens, look for and select “Camera IMX519 Dual”. Then navigate back and configure your custom pinout for SPI, PWM, and GPIO within the same session. This tool is designed to handle both the camera and custom pin assignments in a single pass, so they don’t clobber each other.
That makes a lot of sense. I didn’t realize there was an Arducam-specific Jetson-IO tool — I’d been using the stock NVIDIA one the whole time. The single-pass configuration approach sounds like exactly what I need.
I’m going to have to wait a bit before I can test this though. My replacement camera module hasn’t arrived yet (the one with the loose lens issue), so I don’t have working hardware to validate against at the moment. As soon as it shows up I’ll run through these steps and report back.
Appreciate the detailed instructions — especially the v4l2-ctl tip for exposure and gain. That’s going to save me a lot of digging.
No problem, happy to help! The Jetson-IO tool from Arducam is honestly easy to miss if you’re used to the standard NVIDIA workflow — it’s not heavily advertised.
A couple of things to keep in mind when you do get to testing:
Make sure it’s really the first boot after install_full.sh when you run jetson-io.py. The timing matters because it’s working with the freshly-generated device tree.
When you run v4l2-ctl -d 0 -l, pay attention to the control IDs and ranges. The IMX519 driver may expose exposure as an absolute value or in microseconds depending on the driver version, so check the min/max before setting values.
If you don’t see the controls you expect, you might have the older driver variant — the -l output will tell us what’s available and we can go from there.
Definitely post back once you’ve got the replacement hardware in hand and run through the steps. Curious to hear if the SPI/PWM/GPIO pins all come up correctly alongside the camera.