Difficulty in loading in-tree module

Hello,
I am currently using L4T 32.5 BSP package for a Jetson Xavier NX . My goal is to load a driver (imx477) into this package and obtain output from /dev/video*. I have attempted to load the driver as per below procedures and also I have done exclusion procedure for imx219. Inspite of these procedures, the imx219 module only remains in the device tree. That means, imx477 is not loaded. Could you help me to load the imx477.
Procedures :-

  1. Placed the driver file (imx477.c file) in Kernel/nvidia/drivers/media/i2c/.
  2. Edited Makefile as well as Kconfig in the same directory.
  3. Placed the Device tree file (.dtsi file) in hardware/nvidia/platform/t19x/jakku/kernel-dts/common/.
  4. Commented out the header file of imx219 in tegra194-p3509-0000-a00.dtsi and included my in-tree module header file(imx477) in the same (.dtsi) file.
  5. In tegra_defconfig file, added my driver info in the form of static way(CONFIG = y).
  6. All of these procedures, have been followed to load in-tree module(imx477) in that package.
    That is, I tried to load the intree module of imx477, but the imx219 module persists in the device tree. Does imx219 resist loading of imx477 driver?. I am interested in understanding why the imx219 module is not being excluded from the tree. If any suggestions or recommendations on how to successfully load my driver, I would greatly appreciate the assistance.
    Thank you in advance for your help!

Remove all of the cameras device tree only include the imx477 could be more clear.

Remove all of other sensors include file to build new dtb for it.

Hi Shane,
In which directory, we have to remove those device tree ?
Actually, we did the modification in t19x platform.
Could you please explain this procedure in brief manner ?

Best Regards,
Pallavi

In the …/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-camera-modules.dtsi file remove all of others sensor dtsi

#include "tegra194-p2822-0000-camera-e3377-a00.dtsi"
#include "tegra194-p2822-0000-camera-e3326-a00.dtsi"
#include "tegra194-p2822-0000-camera-e3333-a00.dtsi"
#include "tegra194-p2822-0000-camera-e3331-a00.dtsi"
#include "tegra194-p2822-0000-camera-imx274-dual.dtsi"
#include "tegra194-p2822-0000-camera-imx274-a00.dtsi"
#include "tegra194-p2822-0000-camera-imx185-a00.dtsi"
#include "tegra194-p2822-0000-camera-imx390-a00.dtsi"
#include "tegra194-e2832-hdmi.dtsi"
#include "tegra194-p2822-0000-camera-vivid.dtsi"
#include "tegra194-p2822-camera-eCAM130A_CUXVR.dtsi"

#define CAM0_RST_L  TEGRA194_MAIN_GPIO(H, 3)

I have followed your instructions and still imx219 details persist in the device tree file.

If we convert the main dtb file(kernel_tegra194-p3668-all-p3509-0000.dtb)
to dts, we could see the imx219 details. I have attached the device tree details below.

I want your suggestion and wish to receive any other related documents from you.

kernel_tegra194-p3668-all-p3509-0000.dts (246.4 KB)

Best Regards,
Pallavi

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks