I’m trying to add new camera sensor device driver to the kernel as following:
I wrote the sensor driver based on imx185.
I have compiled it as part of the kernel and not loadable.
I have built the new driver device tree in the following directories:
NXver32.7.1/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/galen/kernel-dts/common/
NXver32.7.1/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/
I have added the .dtsi as include in: tegra194-p2822-camera-modules.dtsi file
It passed compilation.
After burning the kernel .
I extracted the DTC tree by the command:
dtc -I fs /sys/firmware/devicetree/base
I cant see my sensor details in the target device tree and not other imx sensors beside the imx219 sensor.
when I tried to find the ‘imx219’ compiled device tree I find it under the build of:
/hardware/nvidia/platform/t19x/jakku/
and not under:
/hardware/nvidia/platform/t19x/galen/
Does it mean that the device tree of ‘jakku’ was burned for me and not the one of ‘galen’
If yes how do I choose what to burn?
If not? what am I doing wrong?
How should I had to know that the Jakku is the device tree for Xavier NX,
Because in documentation they talked about ‘galen’…
Just for next time to know where I should find this information…
I’m new in Linux & NVIDIA…
You don’t really need to memorize each of name here. But you just need to know what board config is in use to do the flash.sh.
That is the start point.
When you run flash.sh to flash board, there should be a string which indicates the board config.
If you don’t even know what is flash.sh, please let me know.
I have looked in “jetson-xavier-nx-devkit.conf” and it is not straight forward to understand which is the directory of the device tree and in your documentation it referenced to ‘galen’… It is recommended at list in the " How to build…" to mention that,
If you don’t see the info you need in “jetson-xavier-nx-devkit.conf”, it is because there are still code to trace.
source “${LDK_DIR}/p3668.conf.common”;
Which means you need to dig into another file. And that file shall give more info.
Or you can also just run “dmesg |grep dts” on your NX and it will tell you which dts file to modify.
But I think it will be better to learn what I taught. If you use other custom board someday, this method will still work. But documentation may not work. I mean the naming may not work if other vendors user different name.