Hi,
I’m trying to interface a Waveshare IMX219-120 camera using a 28-pin Basler CSI connector available on the i.MX8M Plus SOM.
The CSI data lanes, clock, and I²C pins are already identified, so we do not need help with CSI signal mapping.
We would like to confirm only the following:
We are attaching an image of the SOM highlighting the CSI connector for reference.
Thanks in advance for your support.
That header only has i2c and csi lanes connected to it due to limited available pins. The expectation was that if additional GPIO’s were needed for a sensor that they could be exposed via an i2c to gpio expander on the camera module.
1 Like
Hi @jnettlet
Thank you for the update. I was able to manage the reset handling using an external GPIO.
However, I’m not able to capture images even though the camera is probed.
Below is the required information for the same.
Platform
- SoC: i.MX8MP
- BSP: NXP Linux 5.10.72
- Camera: Waveshare IMX219-120 (15-pin CSI, pinout verified correct)
- Interface: MIPI CSI-2, 2 data lanes
What is confirmed working
1. Sensor probe & control
- IMX219 probes successfully
- I²C communication works
- Sensor controls work (e.g.
test_pattern=1)
imx219_start_streaming is called
- Sensor reports streaming started
$ dmesg | grep -Ei "imx219|csi"
[ 0.119514] SCSI subsystem initialized
[ 0.183770] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[ 1.675417] mxc-mipi-csi2-sam 32e50000.csi: supply mipi-phy not found, using dummy regulator
[ 2.381920] mxc-mipi-csi2-sam 32e50000.csi: supply mipi-phy not found, using dummy regulator
[ 2.390778] mxc-mipi-csi2-sam 32e50000.csi: lanes: 2, hs_settle: 32, clk_settle: 2, wclk: 1, freq: 266000000
[ 8.175718] imx219 3-0010: clk freq 24000000
[ 17.358918] mx8-img-md: Registered sensor subdevice: imx219 3-0010 (1)
[ 17.358932] mx8-img-md: created link [mxc-mipi-csi2.1] => [mxc_isi.1]
[ 17.358938] mx8-img-md: created link [imx219 3-0010] => [mxc-mipi-csi2.1]
2. Media graph
- Media graph is complete and correct:
$ media-ctl -p
Media controller API version 5.10.72
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info
hw revision 0x0
driver version 5.10.72
Device topology
- entity 1: mxc_isi.1 (16 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
<- "mxc-mipi-csi2.1":4 [ENABLED]
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Sink
pad9: Sink
pad10: Sink
pad11: Sink
pad12: Source
-> "mxc_isi.1.capture":0 [ENABLED]
pad13: Source
pad14: Source
pad15: Sink
- entity 18: mxc_isi.1.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "mxc_isi.1":12 [ENABLED]
- entity 22: mxc-mipi-csi2.1 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx219 3-0010":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.1":4 [ENABLED]
pad5: Source
pad6: Source
pad7: Source
- entity 31: imx219 3-0010 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SRGGB10_1X10/3280x2464 field:none colorspace:raw]
-> "mxc-mipi-csi2.1":0 [ENABLED,IMMUTABLE]
3. Formats
- End-to-end formats negotiated correctly (after adding bayer10 in isi formats)
- Sensor:
SRGGB10
- ISI input/output:
RG10
4. Clocks
- MCLK (CLKO2) enabled and running:
$ sudo cat /sys/kernel/debug/clk/clk_summary | grep -iE "CLKO|csi|duty"
enable prepare protect duty
mipi_csi_aclk 0 0 0 24000000 0 0 50000
ipp_do_clko2 1 1 0 24000000 0 0 50000
ipp_do_clko1 0 0 0 24000000 0 0 50000
mipi_csi2_pclk 1 1 0 200000000 0 0 50000
mipi_csi_pclk 0 0 0 200000000 0 0 50000
mipi_csi2_aclk 1 1 0 266666666 0 0 50000
What is not working
No image data received
v4l2-ctl --stream-mmap hangs waiting for buffers
/proc/interrupts shows:
- CSI interrupts = 0
- ISI interrupts = 0
- This indicates no MIPI activity reaching the CSI receiver.
Am I missing something here?
Any guidance on bringing up a similar Raspberry Pi–style CSI sensor on i.MX8MP SoM would be appreciated.
There are a couple of avenues that you can go down in order to get this sensor working on the iMX8MPlus. NXP does have a meta-layer that integrates with the ISP and the imx219 sensor, GitHub - nxp-imx-support/meta-imx8mp-isp-imx219: enable imx219 camera sensor on i.MX8MP evk with ISP function
The other option would be using the imx8mplus support in libcamera using the integration with the rkisp1 code that is there, this requires using a mainline based kernel.
One thing that you do want to be careful with with the imx219 sensors is that you don’t drive the gain too hard. That sensor will blow pixels if you do this, as I was doing some testing with that sensor on some of our other SOMs.
Take a look at those options and get back to me and I will be happy to assist in finding a working solution.
Hi,
Thank you for the detailed response and the pointers.
We are aware of the meta-imx8mp-isp-imx219 layer, however at this stage we are not planning to use the NXP ISP pipeline. Our current goal is to bring up the IMX219 and validate basic CSI capture first with Raw Images coming from the sensor.
At the moment, we are using the i.MX8MP SOM along with a ToF sensor, which is already connected to CSI channel 1. This ToF sensor does not require ISP processing, and because of this dependency we are currently tied to the NXP linux-imx 5.10 kernel with required patches to enable Raw10/12 capture.
Because of the above, moving to a mainline-based kernel is not immediately feasible in our setup. That said, if bringing up IMX219 without the ISP on 5.10 is not realistically supported, we can evaluate switching to a newer kernel (e.g. 5.15 or 6.x) and explore the libcamera-based approach instead.
We also had a question regarding mixed usage of ISP and non-ISP pipelines:
-
Since the ToF sensor is connected to CSI1 and does not require ISP, would it be possible to bypass the ISP for CSI channel 1 and use the ISP only for CSI channel 2 (for IMX219)?
-
We understand that this may require enabling both ISPs, which is fine, but is a configuration where CSI1 → ISI (no ISP) and CSI2 → ISP supported or recommended on i.MX8MP SoM?
From your experience:
Any guidance on the most practical path forward given these constraints would be greatly appreciated.
Thanks again for the support.
thanks for the precise requirements that helps me understand the limitations. Please give me a day or so to review all these requirements and determine the best path forward. If I remember correctly (sorry it has been a couple years since I played with this) I was able to put the ISP in pass-through mode for testing another CSI device and just using ISI. I think that should accomplish what you want. I just don’t remember what the output format was to userspace via the V4L2 media-pipeline.