MIPI CSI2 camera: Bayer format support?

Hi jinangja

You can search tegra124-pm359-camera-a00.dtsi, you will find the focuser and flash keyword.
In my case, I just marked this part.

Hi jinangja,

although I can’t get a clear picture of your setup I will give you some information that might help you solve your problem. First of all when you do a modprobe tegra_camera you effectively load 2 kernel modules. The imx135 module (providing you have selected the module in the kernel) and the soc_camera module. The binding is done inside board-ardbeg-sensors.c If your setup matches the values in that file then /dev/video0 is created. If you only load the imx135 module but not the tegra_camera you will never get a /dev/videoX . The imx135 module should use CSI_A port, cam2. However, there is another module that you should remove. The process is described in Video_for_Linux_user_guide document. So make sure you have disabled CONFIG_SOC_CAMERA_PLATFORM. Make sure you also have the media controller API and v4l2 subdevice userspace API enabled in your kernel. Neither the stock kernel nor the grinch kernel have those 2 enabled by default. If you happen to have a usb camera connected, remove it. The bus_id is set to 0 for the imx135. But if you have a usb camera connected, this id is taken since you load the tegra_camera module manually at a later stage.
I few tests you can do:

  1. Remove the imx135 board and connect a usb camera (make sure the CONFIG_SOC_CAMERA_PLATFORM is disabled) . Run a very simple gstreamer pipeline until you get an image stream. Before running that pipeline make sure you got a /dev/video0.
  2. Remove the usb camera and connect your imx135 board and boot. Remove the nvhost_vi module and load the tegra_camera module. Do an lsmod and make sure tegra_camera and imx135_v4l2 modules are loaded. If the imx135 module is not loaded you are probably on the wrong i2c bus. Check the kernel log for verification. If these 2 modules are loaded you should get a /dev/video0
  3. Try the pipeline from step 1 or use an application like cheese. You should get video
  4. If you still have problems with your video the imx135 module can be loaded using a parameter that activates a test pattern. Check the document I mentioned earlier it explains how to do this. This is not the tegra pattern generator its imx135s own test pattern generator.
  5. If you want to see what is happening when you run a gstreamer pipeline you can activate a kernel trace on the smbus. This should give you a hint of the i2c traffic between the imx135 and your application.

I hope I helped

Hi piperak,

Can you give more detail about kernel configuration, because when I load the tegra_camera, it loads tegra_camera and ov5693_v4l2.ko not imx135_v4l2?