Camera Driver Porting TX1 to TX2

I’m attempting to get my working r28.1 TX1 camera driver ported over to my TX2

My driver compiles, probes, and passes all v4l2-compliance tests. But when used with nvcamerasrc or similar the camera-daemon crashes:

NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
PCLHW_DTParser
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/daxc02_master_mt9m021.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 8/16---- imager: No override file found. ----
(NvOdmDevice) Error ModuleNotPresent: V4L2Device not available (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findDevice(), line 231)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function initialize(), line 54)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 97)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 596)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 781)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 276)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 439)

The “NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor” line makes me think it’s an issue with my tegra-camera-platform node.

source is here: https://github.com/DaxBot/daxc02/blob/master/tegra186-daxc02.dtsi#L494

Has anyone done something similar?

The position should be different for each module.

modules {
            module0 {
                badge = "daxc02_master_mt9m021";
                position = "front";
                orientation = "1";
                status = "okay";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "daxc02 2-0010";
                    proc-device-tree = "/proc/device-tree/i2c@3180000/daxc02_a@10";
                    status = "okay";
                };
            };
            module1 {
                badge = "daxc02_slave_mt9m021";
                position = "front";
                orientation = "1";
                status = "okay";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "daxc02 1-0010";
                    proc-device-tree = "/proc/device-tree/i2c@c240000/daxc02_c@10";
                    status = "okay";
                };

That did it, thanks Shane!