IMX214 bringup on TX1 / 28.2

I’m trying to get an IMX214 camera sensor to work on a custom carrier board. I’ve found what appears to be an old “imx214.c” in kernel/drivers/media/i2c, but it has no accompanying header or mode table files. I found an even older set of drivers from some Nvidia Shield Android code, and I’m trying to bring them up to speed with the latest camera changes.

The camera is attached to CSI0/1, using 4 lanes. I tried to start simple by only enabling one camera mode. I used the IMX185 sample for some of the DTS values, and tried to merge them with some working code I had for the IMX219 from before.

Does anyone have any ideas on how to test the individual pieces to figure out where the problem is? Does anyone have a more recent set of drivers for IMX214 than the ones from the Shield?

I am getting the same error another user posted here: https://devtalk.nvidia.com/default/topic/1024144/jetson-tx1/kernel-null-pointer-dereference-in-tegra_camera_open/

[  106.776327] Unable to handle kernel NULL pointer dereference at virtual address 00000050
[  106.784912] pgd = ffffffc0ed1e1000
[  106.788319] [00000050] *pgd=00000001721cd003, *pud=00000001721cd003, *pmd=0000000000000000
[  106.796809] Internal error: Oops: 96000046 [#1] PREEMPT SMP
[  106.802369] Modules linked in: bcmdhd spidev bluedroid_pm
[  106.807787] CPU: 2 PID: 2076 Comm: nvcamera-daemon Not tainted 4.4.38+ #9
[  106.814559] Hardware name: jetson_tx1 (DT)
[  106.818644] task: ffffffc069ec0000 ti: ffffffc05ab20000 task.ti: ffffffc05ab20000
[  106.826113] PC is at tegra_camera_open+0x24/0x60
[  106.830719] LR is at tegra_camera_open+0x24/0x60
[  106.835323] pc : [<ffffffc0004dd9b4>] lr : [<ffffffc0004dd9b4>] pstate: 20000145
[  106.842701] sp : ffffffc05ab23b20
[  106.846005] x29: ffffffc05ab23b20 x28: 0000000000000000
[  106.851317] x27: ffffffc05ab23d80 x26: ffffffc05ab23e98
[  106.856627] x25: ffffffc0cf1cfe00 x24: ffffffc000be8408
[  106.861937] x23: ffffffc0f9e02d48 x22: ffffffc0013f5000
[  106.867246] x21: ffffffc0cf1cfe00 x20: 000000000000003c
[  106.872556] x19: 0000000000000000 x18: 0000000000000011
[  106.877866] x17: 0000007f9bd0f250 x16: ffffffc0001d4cd8
[  106.883175] x15: 0000007f9c6f3cc0 x14: 0000000000000000
[  106.888485] x13: ffffffffffffffff x12: 0000000000000005
[  106.893796] x11: 000000000000000a x10: 0000000000000000
[  106.899105] x9 : 0000000000000000 x8 : ffffffc05ef6c2d0
[  106.904415] x7 : 0000000000000000 x6 : 0000000000000000
[  106.909724] x5 : 0000000000000000 x4 : 0000000000000000
[  106.915033] x3 : 0000000000000000 x2 : 0000000000000001
[  106.920342] x1 : ffffffc05ab20000 x0 : ffffffc001594f40

[  106.927136] Process nvcamera-daemon (pid: 2076, stack limit = 0xffffffc05ab20020)
[  106.934601] Call trace:
[  106.937039] [<ffffffc0004dd9b4>] tegra_camera_open+0x24/0x60
[  106.942687] [<ffffffc000574748>] misc_open+0x108/0x190
[  106.947813] [<ffffffc0001d9d3c>] chrdev_open+0x104/0x198
[  106.953113] [<ffffffc0001d35f4>] do_dentry_open+0x1fc/0x310
[  106.958672] [<ffffffc0001d4868>] vfs_open+0x68/0x78
[  106.963537] [<ffffffc0001e386c>] do_last+0x91c/0xcc8
[  106.968487] [<ffffffc0001e3e30>] path_openat+0x218/0x2b0
[  106.973785] [<ffffffc0001e4fd0>] do_filp_open+0x68/0xc0
[  106.978997] [<ffffffc0001d4c10>] do_sys_open+0x160/0x200
[  106.984296] [<ffffffc0001d4ce8>] SyS_openat+0x10/0x18
[  106.989335] [<ffffffc0000847f0>] el0_svc_naked+0x24/0x28
[  106.994803] ---[ end trace 4a82c2655cd0e885 ]---

tegra210-jetson-imx214.dts.txt (2.82 KB)

hello Undertow10,

you should trace the code to check which variable is a NULL pointer in the tegra_camera_open() function.
in general, we take v4l2-ctl utils to access camera sensor for very beginning verification.
you could not only refer to imx185 but also imx274 for reference drivers.
thanks

Ok, I think I solved that problem. I had some items missing from my tegra-camera-platform DTS node. Now when I try to run gst-launch-1.0 with nvcamerasrc, nvcamera-daemon throws this error:

SCF: Error ResourceError: Unable to open BW Ioctl FD (in src/services/power/PowerServiceCore.cpp,unction initialize(), line 148)
SCF: Error ResourceError:  (propagating from src/services/power/PowerService.cpp, function startSvice(), line 52)
SCF: Error ResourceError:  (propagating from src/components/ServiceHost.cpp, function startServic(), line 138)
SCF: Error ResourceError:  (propagating from src/api/CameraDriver.cpp, function initialize(), lin153)
SCF: Error ResourceError:  (propagating from src/api/CameraDriver.cpp, function getCameraDriver()line 100)
Segmentation fault

What is BW Ioctl FD referring to?

hello Undertow10,

BW Ioctl FD is access the sysnode of /dev/tegra_camera_ctrl for emc bandwidth,
thanks

Undertow10,

I have a working setup for the IMX214. The camera driver still needs a little tweaking but it does work with the TX2 (I haven’t tested with the TX1 yet). Have you had any luck getting yours up? I’d be happy to share if you’re interested.

Andrew

Hello,

I am also in the process of porting the imx214 driver for the TX1

Is it possible to share your driver so I can test with TX1 ?

Thank you in advance.

Pavlos