Unable to flash TX2 while porting camera driver from linux kernel 28.2 to 32.2


I am trying to port a camera driver from 28.2 to 32.2. I am using the camera porting guide instructions as presented in the link: https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-321/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fcamera_sensor_prog.html.

I am using the tegracam_device_register() function for driver registration.

I use the following regmap values in my driver.

struct regmap_config sensor_regmap_config {
reg_bits = 16;
val_bits = 8;

If I do not add the sensor_regmap_config, the dmesg says “regmap init failed: -22”
“tegra camera driver registration failed”

On adding the sensor_regmap_config, the flashing fails.

Unable to handle kernel read from unreadable memory at virtual address 000000000.

Mem abort info:
Exception class = DABT (current EL)
IL = 32 bits
SET = 0
FnV = 0
EA = 0
S1PTW = 0

hello parmeet.singh262,

please also check Debugging Tips session to examine your sensor drivers.

you may also review your sensor driver and sensor device tree with reference drivers.
for example,

please share complete kernel failure if you still not able to enable sensor stream.
$ dmesg > klog.txt