How to grab pre-configured csi video stream without I2C?
Hello Forum! Is there an way to grab a pre-configured CSI-2 video stream? we are using a TX2 dev board with R27.1. The input video stream is generated by a SDI-to-CSI2 adapter, it's a 2-lane, 1920x1080@60, YV16 signal. And I connected the input MIPI-CSI data and clk lines directly to the CSI port of tx2. What should I do to grab the video stream through the /dev/video0 device? Should I need to update device tree or modify the csi-camera drivers to register a camera device? what is the correct procedure? We've tried to modify the /kernel/drivers/media/i2c/ov5693.c to ignore the i2c part and recompiled the kernel source. But still cannot get the /dev/video0, should I modify dts file? which dts or dtsi file should be used? because there are a few dts files and dtsi files, i am a little confused here. I've been stucked here by this problem for quite some time. Thanks a lot!
Hello Forum!


Is there an way to grab a pre-configured CSI-2 video stream?

we are using a TX2 dev board with R27.1.

The input video stream is generated by a SDI-to-CSI2 adapter, it's a 2-lane, 1920x1080@60, YV16 signal. And I connected the input MIPI-CSI data and clk lines directly to the CSI port of tx2.

What should I do to grab the video stream through the /dev/video0 device? Should I need to update device tree or modify the csi-camera drivers to register a camera device? what is the correct procedure?


We've tried to modify the /kernel/drivers/media/i2c/ov5693.c to ignore the i2c part and recompiled the kernel source. But still cannot get the /dev/video0, should I modify dts file? which dts or dtsi file should be used? because there are a few dts files and dtsi files, i am a little confused here.


I've been stucked here by this problem for quite some time.

Thanks a lot!

#1
Posted 11/01/2017 01:34 AM   
@DaLT Did you check the sensor programing guide? Please check it. There's tip you need to disable the plugin manager.
@DaLT
Did you check the sensor programing guide? Please check it. There's tip you need to disable the plugin manager.

#2
Posted 11/01/2017 03:18 AM   
[quote="ShaneCCC"]@DaLT Did you check the sensor programing guide? Please check it. There's tip you need to disable the plugin manager.[/quote] Thanks for your replay! I read the sensor programming guide, and found that " Because Tegra uses Plugin Manager by default, you must first unregister Plugin Manager support first and then add your device information to the main device tree DTSI file." So I need to modify "kernel/arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi" to disbale plugin manager and add a new device in "tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi", Is this right? And do I need to modify driver source "i2c/ov5693.c"?
ShaneCCC said:@DaLT
Did you check the sensor programing guide? Please check it. There's tip you need to disable the plugin manager.


Thanks for your replay!

I read the sensor programming guide, and found that
" Because Tegra uses Plugin Manager by default, you must first unregister Plugin Manager support first and then add your device information to the main device tree DTSI file."

So I need to modify "kernel/arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi" to disbale plugin manager and add a new device in "tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi", Is this right?

And do I need to modify driver source "i2c/ov5693.c"?

#3
Posted 11/01/2017 03:53 AM   
You can follow ov5693.c as template to implement your sensor driver.
You can follow ov5693.c as template to implement your sensor driver.

#4
Posted 11/01/2017 05:54 AM   
[quote="ShaneCCC"]You can follow ov5693.c as template to implement your sensor driver.[/quote] Thanks for your patience. I still have no clue to skip i2c config just directly grab frame data from csi port. could you please point me the direction I should focus on?
ShaneCCC said:You can follow ov5693.c as template to implement your sensor driver.


Thanks for your patience.

I still have no clue to skip i2c config just directly grab frame data from csi port.

could you please point me the direction I should focus on?

#5
Posted 11/01/2017 10:54 AM   
@DaLT You can just keep the i2c struct and just don't access the i2c bus.
@DaLT
You can just keep the i2c struct and just don't access the i2c bus.

#6
Posted 11/02/2017 05:51 AM   
@ShaneCCC Thanks. In the R28.1 user guide, there is a tip says: "Use tegra210-jetson-cv-camera-modules.dtsi or tegra18x-quill-cv-camera-modules.dtsi as a model for generating your DTSI. In your file, change status = disable to status = okay."  But I cannot find those dtsi files in R28.1 kernel source. Is there another model file we can use?
@ShaneCCC

Thanks.

In the R28.1 user guide, there is a tip says:
"Use tegra210-jetson-cv-camera-modules.dtsi or tegra18x-quill-cv-camera-modules.dtsi as a model for generating your DTSI. In your file, change status = disable to status = okay."

But I cannot find those dtsi files in R28.1 kernel source.

Is there another model file we can use?

#7
Posted 11/02/2017 07:01 AM   
@DaLT They move the ../hardware/nvidia/../..
@DaLT
They move the ../hardware/nvidia/../..

#8
Posted 11/02/2017 07:07 AM   
[quote="ShaneCCC"]@DaLT They move the ../hardware/nvidia/../..[/quote] @ShaneCCC, Yes, I look into the directory : hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/ , cannot find tegra18x-quill-cv-camera-modules.dtsi file.
ShaneCCC said:@DaLT
They move the ../hardware/nvidia/../..


@ShaneCCC, Yes, I look into the directory : hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/ , cannot find tegra18x-quill-cv-camera-modules.dtsi file.

#9
Posted 11/02/2017 07:42 AM   
Do you reference to the l4t-documentation-28.1 ?? The file should be "tegra186-quill-camera-modules.dtsi" not tegra18x-quill-cv-camera-modules.dtsi [code] Using Main Platform Device Tree File Register your new device by updating main platform DTSI file to include your new device DTSI file. Because Tegra uses Plugin Manager by default, you must first unregister Plugin Manager support, then add your device information to the main device tree DTSI file. Prerequisites • You have obtained the kernel source files. For more information, see Synchronizing the Kernel in the Development Guide for the release. To register a device using main-platform device tree files 1. Locate and edit the following file: • TX1: hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p25970-2180-a00.dts • TX2: hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dtsi 2. In the DTSI, remove the following line: • TX1: #include "jetson-plugin-manager/tegra210-jetson-cv-camera-plugin-manager.dtsi" • TX2: #include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi" 3. Locate and edit the following file: TX1: hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts TX2: hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts 4. In the DTS file, replace the following line: • TX1: #include "jetson-platforms/tegra210-jetson-cv-camera-modules.dtsi" • TX2: #include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi> With an #include statement specifying the DTSI file for your new device.[/code]
Do you reference to the l4t-documentation-28.1 ??
The file should be "tegra186-quill-camera-modules.dtsi" not tegra18x-quill-cv-camera-modules.dtsi

Using Main Platform Device Tree File
Register your new device by updating main platform DTSI file to include your new device DTSI file. Because Tegra uses Plugin Manager by default, you must first unregister Plugin Manager support, then add your device information to the main device tree DTSI file.
Prerequisites
• You have obtained the kernel source files. For more information, see Synchronizing the Kernel in the Development Guide for the release.
To register a device using main-platform device tree files
1. Locate and edit the following file:
• TX1:
hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p25970-2180-a00.dts
• TX2:
hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dtsi
2. In the DTSI, remove the following line:
• TX1:
#include "jetson-plugin-manager/tegra210-jetson-cv-camera-plugin-manager.dtsi"
• TX2:
#include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi"
3. Locate and edit the following file:
TX1:
hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
TX2:
hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
4. In the DTS file, replace the following line:
• TX1:
#include "jetson-platforms/tegra210-jetson-cv-camera-modules.dtsi"
• TX2:
#include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi>
With an #include statement specifying the DTSI file for your new device.

#10
Posted 11/02/2017 08:23 AM   
@ShaneCCC Yes, I reference to the l4t-documentation-28.1. But after the lines above, there is a "Note": [code] Note: Use tegra210-jetson-cv-camera-modules.dtsi or tegra18x-quill-cv-camera-modules.dtsi as a model for generating your DTSI. In your file, change status = disable to status = okay. [/code] But I cannot find this model file.
@ShaneCCC

Yes, I reference to the l4t-documentation-28.1.

But after the lines above, there is a "Note":

Note:
Use tegra210-jetson-cv-camera-modules.dtsi or tegra18x-quill-cv-camera-modules.dtsi as a model for generating your DTSI. In your file, change status = disable to status = okay.


But I cannot find this model file.

#11
Posted 11/02/2017 09:29 AM   
@ShaneCCC I reference to jetsonHacks' build kernel scripts: https://github.com/jetsonhacks/buildJetsonTX2Kernel and find that the scripts does not make dtbs. So do I need to add "make dtbs" in the makeKernel.sh and after compiling, copy arch/arm64/boot/dtb/tegra18xxxxx.dtb to /boot/? And I also find that in /boot/extlinux/extlinux/extlinux.conf, no "FDT xxxxx.dtb" line. So if I want to modify device tree, should I need to add this line and which dtb should be used? Quite confused. Thanks for your reply.
@ShaneCCC

I reference to jetsonHacks' build kernel scripts:


https://github.com/jetsonhacks/buildJetsonTX2Kernel


and find that the scripts does not make dtbs.
So do I need to add "make dtbs" in the makeKernel.sh and after compiling, copy arch/arm64/boot/dtb/tegra18xxxxx.dtb to /boot/?

And I also find that in /boot/extlinux/extlinux/extlinux.conf, no "FDT xxxxx.dtb" line. So if I want to modify device tree, should I need to add this line and which dtb should be used?

Quite confused. Thanks for your reply.

#12
Posted 11/02/2017 09:43 AM   
I'm following you guys discussion. If I understand correctly, the references to the discussion are in "NVIDIA Tegra Linux Driver Package, Development Guide, 28.1 Release". The documentation can be downloaded by: 1. Go to "Linux For Tegra R28.1" site. https://developer.nvidia.com/embedded/linux-tegra 2. Under the section "28.1 Driver Package", click on "Documentation" and download the tar file. 3. Untar the package, check out Start_L4T_Docs.html 4. The topics are in the section "Camera Development, Sensor Driver Programming Guide" Hope it helps for those who are interested in the discussion.
I'm following you guys discussion. If I understand correctly, the references to the discussion are in "NVIDIA Tegra Linux Driver Package, Development Guide, 28.1 Release". The documentation can be downloaded by:

1. Go to "Linux For Tegra R28.1" site. https://developer.nvidia.com/embedded/linux-tegra

2. Under the section "28.1 Driver Package", click on "Documentation" and download the tar file.
3. Untar the package, check out Start_L4T_Docs.html
4. The topics are in the section "Camera Development, Sensor Driver Programming Guide"

Hope it helps for those who are interested in the discussion.

#13
Posted 11/02/2017 04:25 PM   
@ytmx3, Thanks for your supplementary information. Your reply makes this discussion much clearer.
@ytmx3, Thanks for your supplementary information. Your reply makes this discussion much clearer.

#14
Posted 11/03/2017 01:30 AM   
@ShaneCCC, and I just found that R28.1 no longer use /boot/extlinux/extlinux.conf to FDT .dtb. So cross-compilation and flashing from host to device is the only way to modify and update the device tree, am I right?
@ShaneCCC, and I just found that R28.1 no longer use /boot/extlinux/extlinux.conf to FDT .dtb. So cross-compilation and flashing from host to device is the only way to modify and update the device tree, am I right?

#15
Posted 11/03/2017 02:30 AM   
Scroll To Top

Add Reply