Boot issue when csi channel 0 is enabled in devicetree

I am trying to interface custom camera with Xavier AGX. Camera module doesn’t have EEPROM. So as per the documentation I commented plugin-manager .dtsi and included my own dtsi. In the camera-modules.dtsi I enabled csi channel0 by setting status = “okay” in devicetree. After flashing the image the system is not able to boot.

hello rahul.g.s,

you may review your device tree to check if there’s NULL pointers access.
please also refer to Debugging Tips session to examine your sensor driver.
thanks

Dear Jerry Chang,
Thanks for your reply, I checked my devicetree but I couldn’t find anything odd. Please help me out here, I am attaching my devicetree and driver file here. Thanks in advance tegra194-camera-omni.txt (11.5 KB) tegra194-p2822-camera-modules.txt (8.2 KB) oh02a10.txt (21.0 KB)

hello rahul.g.s,

you’re having incorrect device tree definition, you should also using port-index property to assign the CSI port binding for VI, NvCSI, and sensor modules; please also check Port Binding session for the reference.

since there will be sensor probing and device registration during kernel initialization stage, you may also refer to reference driver for power-on/off sequences and function of device tree parsing,
for example,
$L4T_Sources/r32.4.3/Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/i2c/imx185.c

you may also adding debug messages into your kernel sources to check which paragraph caused the kernel panic.
thanks

Hello Chang,
I modified the devicetree according to the reference devicetree, still I have the same issuetegra194-camera-omni.txt (11.5 KB) Please have a look at this and say whether this is right

Dear Chang,
Is it possible that the error is because overrides mentioned in plugin-managers are not applied (since I have commented the tegra194-camera-plugin-manager.dtsi)? If that is the case then how to write those in default tegra194-p2822-camera-modules.dtsi devicetree file? Is there any reference devicetree available which shows these settings such that it can work in absence of plugin-manager.dtsi file? Thanks in advance

hello rahul.g.s,

may I know which CSI port your oh02a10 camera actually using?

you have port definition of VI and NvCSI to enable sensors on port-index = <0>;, it’s as same as your sensor definition by using tegra_sinterface = "serial_a";
however,
your sensor output port were using port definition port-index = <2>;

please review your port bindings.
thanks

hello Chang,
The camera is connected to port 0. It was a mistake but I corrected it and flashed it again, still I couldn’t get it up and running. Here is my modified devicetree, please have a look at this tegra194-camera-omni.txt (11.6 KB) tegra194-p2822-camera-modules.txt (8.9 KB)

hello rahul.g.s,

may I know is there still kernel panic during sensor probing?

hello Chang,
Yes still the problem exists

hello rahul.g.s,

I would suggest you to add some debug messages into your kernel sources of probing function.
this should help you to narrow down which paragraph caused the kernel panic.
thanks

Hi Chang,
I am able to get only the messages shown in the picture, and I am not able to see any message from my driver. For example in the beginning of oh02a10_probe function we have
dev_info(dev,“probing v4l2 sensor\n”);
command, but I don’t have this message printed here. Is the driver not loaded at this stage or the message is not being printed here?

hello rahul.g.s,

those were bootloader messages, you may also refer to Xavier Developer Kit User Guide, to setup micro-usb on J501 to gather UART logs.
please also share the messages for reference,
thanks

Hi rahul.g.s,

Have your clarified the cause and resolved the problem?
Any result can be shared?

Thanks

Hi Jerry,
Currently we are working on another unexpected high priority work,so we parked this effort for sometime. Soon we will restart the effort and let you know. Thank you.