How to register a new sensor in kernel device tree with Jetson nano

Recently I was trying to connet a new camera sensor to jetson nano. I have read the Tegra Linux Driver Package Development Guide but there is not refence way of it with jetson nano just for tx1 and tx2. For example, I want to register my new sensor in kernel device tree, I have found the .dtsi file for p3448(jetson nano) in /nvidia/platform/t210/porg/kernel-dts/porg-platforms but I don’t know which file to edit to unregister Plugin Manager support and add my device information.

What’s more, there is pre-installed sensor IMX219, and there are several files about imx219: tegra210-camera-rbpcv2-imx219.dtsi tegra210-camera-rbpcv2-dual-imx219.dtsi tegra210-porg-camera-rbpcv2-imx219.dtsi tegra210-porg-camera-rbpcv2-dual-imx219.dtsi. My sensor is sc4210 , am I supposed to add similar four files about sc4210 to this directory?

The Nano is very similar to the TX1, so you should be able to use the information about the TX1 for the Nano.

Yes, you need to create an appropriate DTS file for the camera. (The DTSI files are include files for various IMX219 configurations.)

I have editted the .dts and .dtsi files. I don’t know what it means:

-On T210 (Nano and TX1) devices only, connect the Jetson device’s recovery USB port to your host. Enter this command at the U‑Boot command prompt:

$ums 0 mmc 1

-This connects eMMC (or the Jetson Nano SD Card) to the host as a set of USB mass storage devices (each partition as a device). You then can copy your custom kernel to /boot/Image directly.

which says in Development Guide. And I flashed Jetson nano with sdk manager, replacing the image files and dtb files with new building kernel files. But the jetson nano didn’t boot. I don’t know what to do.

I have very similar problem about how to append new .dtsi in original kernel.

BTW, the below url “Sensor Driver Programming Guide” which include a description section about device tree.
de

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-282/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fcamera_sensor_prog.html

So I’ve been working on developing a camera driver as well. There is something I don’t understand though.
The Sensor Driver Programming Guide tells us to place the DTSI in “kernel_src\hardware\nvidia\platform\t210\jetson\kernel-dts\jetson-platforms”.
But when I look at the IMX219 DTSI files, they’re located in a different place:
“kernel_src\hardware\nvidia\platform\t210\porg\kernel-dts\porg-platforms”.

What is the difference between the jetson and porg folder?
And why does one choose to use one or the other.

hi all,

you must modify kernel driver and also device tree for bring-up new bayer sensors to tegra platforms.
several documentation you might refer to for more details.
thanks

  1. please check Kernel Customization chapter for building drivers and device tree.
  2. all sensor driver necessary changes were included in Sensor Software Driver Programming Guide,
  3. you should also check Device Registration chapter for the details about plugin-manager.
  4. please also check the Tutorials page, you may expand the [Developer Tools] session and access the [V4L2 Sensor Driver Development Tutorial]

What is the difference between the jetson and porg folder?
you should check the porg folder for Jetson-Nano reference drivers.