I have a camera sensor which connects to host by CSI-2 and I2C (CCI of CSI-2).
I’ve connected the sensor to Jetson CSI A clock and data lanes, to the GEN2 I2C bus and to some GPIO pins.
I’m already able to successfully power-up the sensor and communicate with it through I2C.
I also have a I2C driver for the sensor providing a V4L interface, but for another platform.
What must I do and which documentation can I study to put it working with the Tegra K1 CSI/VI module?
Actually it is a Raspberry Pi camera module (which features an OV5647 sensor) plus a simple pin adapter. At least two drivers are around in the internet, for other platforms though.
Googling for “ov5647.c” give a few results. However, having that is not the same has having a ready Jetson driver…
About connections, I used GPIO 57 (see eLinux.org) to turn sensor on and I2C Gen2 to comunicate.
About CSI-2 I’ve used CSI A lanes, but I don’t know if the connection is ok.
cdsousa,
I have created a interface board where I connect a OV5640 camera. I use CAM_I2C_SDA/SCL, CAM1_MCLK, CSI_A_CLK and CSI_A_D0/D1 to interface. I am also using +2.8_V_RUN_CAM and +1.8V_RUN_CAM power supply rails.
I so far didn’t have any success with the software implementation. At this time the power rails are not yet enabled. Thus I would first have to work on the power supply controller to enable the power. I can see that the kernel provides some driver for OV5640, but I don’t see any working V4L interface.
I was also reviewing the Raspery Pi Camera, but this camera runs at 3.3V (e.g. I2C), while the Tegra interface is prepared for 1.8V…
I2C Gen2 is 3.3v that’s why I used it. And I used a voltage regulators for the sensor Vin.
Luckly the RPi camera module doesn’t need external clock, it has some crystal in it. In fact, schematics for that module around the internet are wrong. Besides I2C and CSI pins, this module has only one GPIO for camera power and another to turn the LED on.
How do you plan to get clock for the ov5640 sensor? The last time I tried (as if time alone would fix anything) CAM1_MCLK had no signal. I think that Grinch kernel now enables PWM routing to external pins, so that may be a solution.
About driver, there seems to be one at /drivers/platform/tegra/ov5640.c and another at /drivers/media/i2c/soc_camera/ov5640.c.
The second has some kind of V4L interface, and as far as I understand is to be used in combination with a soc_camera host. In /drivers/media/platform/soc_camera/tegra_camera there seems to be such host.
Please keep us updated on your progresses. I’ll do the same.
Cdsoua,
Thank you! I will look into it, unfortunately I am traveling a lot right now…
I have my PCB prepared, such that I could also add a discrete oscillator in case I can’t make MCLK to work…
I will keep you informed on my progress.
Thank you for information about MIPI cameras.
Before I had the Samsung 5Mpixel K5ECG MIPI CSI sensor so I tried to use it on JETSON.
But kernel doesn’t support that camera module so I have found another modules for JETSON(One of the List, there is ov5640).
I also would try to find some solution to use MIPI camera on JETSON.
If I done, also should inform in here.
I am wondering, please, if you’ve got any further with your attempts to connect a Raspberry Pi camera to a Jetson board?
I have reached much the same conclusions as you, which is that the ov5640 driver seems to be installed and active, although I’m not sure whether it’s the one in i2c/soc_camera or the one in tegra/platform. I’m not even sure which one of those is supposed to be the real thing, whether one supersedes the other, or what. They seem to have much of the same code.
Anyway, while I know the RPi camera is a different module (ov5647) I was hoping to use the ov5640 driver as a starting point, but so far haven’t managed to make it do anything.
On the hardware side, my colleague who’s handy with a soldering iron made up a small adapter to interface the RPi camera ribbon cable to the 2x25 port on the Jetson, but he’s now concerned that his wiring won’t stand up to a 24MHz clock rate, so we might have to come up with something a little more electrically designed.
I am using the latest Grinch kernel (19.3.6). Does this have I2C enabled? You said in an earlier post that you’d managed to get the sensor powered up and the I2C lines to wiggle. Were you doing this with user-side code, or have you managed to get the ov5640 kernel module to say something?
My other concern is whether the CSI input is actually yet enabled or even configured in the firmware (the DTB). I don’t even know where to start with that.
I would like to get this working soon, but I’m also conscious that nVidia might release L4T 21.1 soon which might have all of this stuff working… not sure if there’s an ETA for that yet.
Anyway, anything you could share would be most welcome, please.
Unfortunately I have not been able to do any further progresses with that. It seems that L4T tegra_camera module is not yet complete. Vanilla L4T kernel already has I2C support.
I’m also waiting for and hoping the next L4T brings something new in this field…
I’m working on a similar project where I would like to connect a I2C/CSI camera to the Jetson board. So far I’ve been able to control and power it through I2C. Unfortunately I have no video device enumeration and I do not event know where to start on the CSI/MIPI side.
Has the new L4T/grinch kernel made any improvements concerning the CSI/MIPI interface? Do you have any hints on where I could look to make this working?
Has anyone made any progress here. We’re testing a yuv cam with two lanes connected to CSI-A. The camera seems to be outputting stuff, but all we’ve gotten is green images. The camera seems to be outputting data, the TPG works, but the whole chain does not.
regulator.10 toggles between enabled and disabled “by itself”. regulator.13 seems relevant from the name, but that is disabled, and if I turn it on, the images turns pink instead of green.
Is it necessary to do some pinmuxing or something in order for this connection to work?
If there is basic green image, the CSI lane should already work.
Is regulator.10 controlled by Tegra_GPIO? If so, need set it properly in the pinmux table. Take care of the POR status and power domain, and the IO voltage level.
Can you check the camera initial sequence for the sensor itself configuration?
You can also try to read the sensor status registers through I2C bus to confirm if it’s set as SPEC.
I have found a cool website with what appears to be what you are looking for. http://www.ics.com/blog/raspberry-pi-camera-module
It has info on the official pi cam v4l driver, as well as a user-space-hacked-together one.