Jestson Nano mipi cameras

When I press nvgstcapture or nvgstcapture-1.0, I get the following error messege:

*** Message: 04:23:45.869: main:4674 iterating capture loop …*
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:740 No cameras available
NvMMLiteOpen : Block : BlockType = 4

Seems it cannot detect the mipi camera. I have measure the camera power and it is ok.

The camera used is : Pcam 5C Reference Manual - Digilent Reference

I also test other mipi cameras on Jetson Nano and the result is the same. But all of them are verified ok!

Could anyone help?

anybody can help?

It looks like this is Jetson related, so I will move it over to the Jetson Nano forum, so the support team has visibility.

hello binminidsp,

the error logs show no cameras available.
could you please confirm which Jetpack release is this Pcam 5C verified?
here you apply all the kernel and device tree updates to enable this camera deivce?

Thank you very much for your reply.
The mipi camera Pcam 5C is verified ok.
I guest .config is incorrect and mipi drivers are not enabled.

So how to enable the mipi in .config?

The image I used is downloaded from https://developer.download.nvidia.com/embedded/L4T/r32_Release_v7.1/JP_4.6.1_b110_SD_Card/Jeston_Nano/jetson-nano-jp461-sd-card-image.zip?t=eyJscyI6ImdzZW8iLCJsc2QiOiJodHRwczovL3d3dy5nb29nbGUuY29tLyJ9 .

The version is r32.7.1, seems that the latest kernel source code is r35. And is there any latest sd image which is available?

hello AIdeveloper,

the linkage you point-out is Nano SD card image with Jetpack-4.6.1 release. this doesn’t include the driver of camera Pcam 5C.
so, you’ll need to port the drivers.

BTW,
you may see-also Jetson Nano Developer Kit SD Card Image, 4.6.1 is already the latest release of Nano SD card image.
please also check https://developer.nvidia.com/embedded/jetpack-archive, Jetpack-5.x release doesn’t support with Nano series.

Pcam 5C is the standard mipi camera, so I just need add mipi driver to the Linux kernel?
Thanks!

I found errors when compiling Linux kernel. The Linux kernel is downloaded from https://developer.nvidia.com/embedded/l4t/r32_release_v7.1/sources/t210/public_sources.tbz2

So I thansfer to GitHub - OE4T/linux-tegra-4.9: NVIDIA downstream Linux kernel source Jetson platforms in single-repo form, derived from the L4T R32.x series BSP and no compiling error.

And what to verify is GitHub - OE4T/linux-tegra-4.9: NVIDIA downstream Linux kernel source Jetson platforms in single-repo form, derived from the L4T R32.x series BSP also works for Jetson Nano?

Thanks!

hello AIdeveloper,

let’s focus on this… what did you meant a standard MIPI camera?
for example, what’s the image format received by CSI brick? is it a bayer Raw, or YUV contents?

Then you mean the Pcam 5C driver should be still added to the Linux kernel?

Another question, what is the i2c bus number on the two csi sockets?

I’d like to know if the camera is detected by the nano through i2c bus. I do not know the bus numner.

thanks!

it uses CAM_I2C interface, you may check Jetson Nano Product Design Guide for [11.1.1 I2C Design Guidelines].
please refer to developer guide, Sensor Software Driver Programming to implement sensor driver.

Could I know which i2c below is for CAM_I2C?

hello AIdeveloper,

you may dig into device tree.
here’s an example of IMX219 on Nano.
it’s based-on i2c7, and it’s using cam_i2cmux for sharing the same i2c address, 0x10.

/ {
        cam_i2cmux {
                compatible = "i2c-mux-gpio";
                i2c-parent = <&i2c7>;

and… you should also check below for the mappings of physical address of i2c nodes.
$public_sources/kernel_src/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi

i2c1: i2c@7000c000
i2c2: i2c@7000c400
...
i2c7: i2c@546c0000
1 Like

Can you give me the tegra210-p3448-0000-p3449-0000-b00.dts and the .config file, or the Image and ko files to support mipi camera IMX219 on Jetson Nano.

Or can I use flash.sh with the correct .conf file to flash the sd-card so that mipi camera IMX219 is supported.

My focus is not the device tree debug and should not spend too much time on it.

Thanks!

hello AIdeveloper,

Nano series by default support with Raspberry pi v2, imx219.

So the latest nano sd card image (https://developer.download.nvidia.com/embedded/L4T/r32_Release_v7.1/JP_4.6.1_b110_SD_Card/Jeston_Nano/jetson-nano-jp461-sd-card-image.zip?t=eyJscyI6ImdzZW8iLCJsc2QiOiJodHRwczovL3d3dy5nb29nbGUuY29tLyJ9 ) support IMX219 already?

But even I poll the i2c and cannot find IMX219 on i2c.

hello AIdeveloper,

is there camera node register to linux kernel? i.e. $ ls /dev/video*
you may also check kernel logs, $ dmesg | grep 219 for more details.

Hi Jerry, you are correct. When I insert a Raspberry Pi camera (based on IMX219 image sensor) to the either mipi socket of Jetson Nano. I can see video0 on /dev. And "nvgstcapture-1.0 " can open the camera and get the real time video.

Then I have a question, how to poll the registers of IMX219 by i2c tools? What is the i2c bus number?
I use the “i2cdetect -r -y <bus_number>” to poll all the i2c devices, but fail to get IMX219.
Attached is polling log.
i2c_polling_log.txt (3.8 KB)

hello AIdeveloper,

may I know what’s the real use-case, are you going to examine the register settings?

you’re able to dump NVCSI registers.
here’s an example (it’s based-on Xavier series), please also review TRM and update the address.
for example,

  1. check TRM for [3.1.2 System Address Map] for the base address for NVCSI,
    for example, NVCSI 0x15a00000 0x15a4ffff SYSTEM
  2. please also check the register offset, NVCSI_STREAM_0_PH_WC_0, Byte Offset= 0x101dc
  3. calculate the address of PH_WC, 0x15a00000+0x101dc = 0x15a101dc
  4. enable the camera stream and dump the PH_WC for its register values,
    for example, $ sudo ./busybox devmem 0x15a101dc
    you may install the utility by $ sudo apt-get install busybox