IMX327 image sensor interface


I am working on my custom build carrier board of Jetson Nano.
Where I am interfacing IMX327 image sensor with SOM.
In this board I basically use CAM I2C for sensor control interface and CSI 4 port with all four lane for data capture.
Please find the attached dtsi file for reference.

tegra210-camera-imx327.dtsi (10.0 KB)
I have modified drivers for IMX327 image sensor as follow.
driver.rar (8.5 KB)

 Currenlty I am getting issue that  as soon as I install driver for Image sensor probing start but after that I am getting code dump error.
Please check attached dmseg log.

cameradmesg.txt (3.8 KB)
It look like when it goes for v4l2 registration in probing that time it gives error.
Please guide me on this.

hello rusurya,

please refer to Sensor Software Driver Programming to implement your camera driver.
you may see-also Verifying the V4L2 Sensor Driver for sanity test.


Thanks a lot for reply.
Actually I refered Nvidia Jetson sensor adaptation guide only.
I prepared source as well as dtsi according to that only.
If I give i2cdetect -y -r 6 command Image sensor IMX327 is detected on 0x1a address.
I am trying dynamic kernel module preparation.
I have refered IMX185 default source and with reference to that I modified kernel driver source for IMX327.
That is get complied on Nvidia platform. kernel object get generated.
If you check dmesg log you will find that when we insert ko initially probing happends.

[ 358.401575] imx327: loading out-of-tree module taints kernel.
[ 358.408236] probing v4l2 sensor
[ 358.408289] camera_common_pdata *IMX327_parse_dt
[ 358.408376] IMX327_power_get
[ 358.408514] IMX327 6-001a: tegracam sensor driver:IMX327_v2.0.6
[ 358.408517] IMX327_board_setup
[ 358.408554] IMX327_power_on
[ 358.408700] IMX327_fuse_id_setup
[ 358.408702] IMX327_read_reg
[ 358.409680] IMX327_read_reg
[ 358.412308] IMX327_read_reg
[ 358.413163] IMX327_read_reg
[ 358.414016] IMX327_read_reg
[ 358.414791] IMX327_read_reg
[ 358.415560] IMX327_power_off
[ 358.415619] Internal error: Accessing user space memory outside uaccess.h routines: 96000005 [#1] PREEMPT SMP

In Nvidia source all the default sensor drivers code in probe function there is one function is called ie.
tegracam_v4l2subdev_register(tc_dev, true);

I think its for registering new device in v4l2 , It look like we are not getting this function and because of this core dump happens.
I think have included all the necessary file but still something is pending.
If you have any clue on this please let me know.

hello rusurya,

it looks the error triggered by do_page_fault(), please check you’ve given correct permission.
otherwise, you’ve given incorrect address as memory corruption.

please see-also developer guide, Loadable Kernel Module (LKM).


Thanks a lot for link.
I went through the link and with respect to that I did following steps

  1. In Linux for tegra folder I put …/kernel-dts/porg-platforms/tegra210-camera-imx327-a00.dtsi device tree.
  2. Also I have included this file in main tegra210-p3448-0002-p3449-0000-b00.dts file.
  3. Also on driver side I have put imx327.c, imx327.h, imx327_mode_tbls.h files in driver folder.
  4. In tegra_defconfig I have mentioned CONFIG_VIDEO_IMX327= m .
  5. Compiled whole source , I got imx327.ko kernel module and dtb changes , then I flash it to the som.
  6. But when I insert the module in som I am getting above mentioned error only.

Am I missing something?
Please guide me on this.

hello rusurya,

how you flash the target?
did you confirm the target is taking your dtb changes? you may disassembler the dtb file into text file for examination.
for example, $ dtc -I dtb -O dts -o output.txt tegra210.dtb


Yes I checked it.
After compilation and flashing I checked main dtb in SOM ie kernel_tegra210-p3448-0002-p3449-0000-b00.dtb. I convert it in dts format in that I found all the nodes related to camera such as vi, nvcsi, imx327@1a node in i2c@546c0000.
Its verified that all dtsi changes are included.

hello rusurya,

it’s generic camera driver to register camera device to linux kernel,
please dig into this driver, to check which paragraph cause the core dumps.
i.e. $public_soruces/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/tegracam_v4l2.c

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.