Problem load module tegra_camera

When trying to load the modules and use the CSI Camera OV5640:

root@apalis-tk1:~# echo 250 > /sys/class/gpio/export
root@apalis-tk1:~# echo low > /sys/class/gpio/gpio250/direction
root@apalis-tk1:~#
root@apalis-tk1:~# echo 248 > /sys/class/gpio/export
root@apalis-tk1:~# echo low > /sys/class/gpio/gpio248/direction
root@apalis-tk1:~#
root@apalis-tk1:~# echo high > /sys/class/gpio/gpio250/direction
root@apalis-tk1:~#
root@apalis-tk1:~# modprobe videobuf2-dma-contig
root@apalis-tk1:~# modprobe ov5640
root@apalis-tk1:~# modprobe tegra_camera
[  106.602390] vi vi.0: initialized
[  106.608309] platform vi.1: Driver vi requests probe deferral
[  106.614049] soc-camera-pdrv soc-camera-pdrv.1: Probing soc-camera-pdrv.1
[  106.629560] imx135_v4l2 2-0010: Failed to get regulator vana
[  106.636767] i2c 2-0010: Driver imx135_v4l2 requests probe deferral
[  106.644256] soc-camera-pdrv soc-camera-pdrv.3: Probing soc-camera-pdrv.3
[  106.658372] [ar0330]: sensor driver loading
[  106.666767] [ar0330]: probing sensor.
[  106.670782] ar0330_v4l2 2-0018: ar0330_regulator_get vdig ERR: -517
[  106.677113] ar0330_v4l2 2-0018: ar0330_regulator_get vana ERR: -517
[  106.683418] ar0330_v4l2 2-0018: ar0330_regulator_get vif ERR: -517
[  106.689653] ------------[ cut here ]------------
[  106.694309] WARNING: at /media/cbueno/DATA/yocto/Toradex/oe-core/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/media/i2c/soc_camera/ar0330_v4l2.c:677 ar0330_power_on+0x38/0xd4 [ar0330_v4l2]()
[  106.712654] Modules linked in: ar0330_v4l2 imx135_v4l2 tegra_camera(+) ov5640 videobuf2_dma_contig joydev bluetooth gpio_apalis_tk1_k20 apalis_tk1_k20_can apalis_tk1_k20_adc apalis_tk1_k20_ts atmel_mxt_ts apalis_tk1_k20
[  106.732570] CPU: 3 PID: 809 Comm: modprobe Not tainted 3.10.40-2.8.4+gba29b06 #1
[  106.740017] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[  106.748679] [<c0012090>] (show_stack+0x18/0x1c) from [<c00584a0>] (warn_slowpath_common+0x54/0x74)
[  106.757672] [<c00584a0>] (warn_slowpath_common+0x54/0x74) from [<c0058568>] (warn_slowpath_null+0x20/0x28)
[  106.767357] [<c0058568>] (warn_slowpath_null+0x20/0x28) from [<bf0a636c>] (ar0330_power_on+0x38/0xd4 [ar0330_v4l2])
[  106.777837] [<bf0a636c>] (ar0330_power_on+0x38/0xd4 [ar0330_v4l2]) from [<bf0a6784>] (ar0330_probe+0x118/0x1ec [ar0330_v4l2])
[  106.789184] [<bf0a6784>] (ar0330_probe+0x118/0x1ec [ar0330_v4l2]) from [<c051f1e0>] (i2c_device_probe+0xac/0xf8)
[  106.799400] [<c051f1e0>] (i2c_device_probe+0xac/0xf8) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  106.809012] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  106.818614] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  106.827517] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  106.836422] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c040f12c>] (device_add+0x3a8/0x588)
[  106.845240] [<c040f12c>] (device_add+0x3a8/0x588) from [<c051d290>] (i2c_new_device+0x14c/0x1b4)
[  106.854071] [<c051d290>] (i2c_new_device+0x14c/0x1b4) from [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8)
[  106.864017] [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8) from [<c0537c24>] (soc_camera_host_register+0x384/0x7e8)
[  106.874839] [<c0537c24>] (soc_camera_host_register+0x384/0x7e8) from [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera])
[  106.886527] [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera]) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  106.897770] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c0411bd0>] (__driver_attach+0x54/0x94)
[  106.907278] [<c0411bd0>] (__driver_attach+0x54/0x94) from [<c040fd94>] (bus_for_each_dev+0x84/0x94)
[  106.916355] [<c040fd94>] (bus_for_each_dev+0x84/0x94) from [<c0410f24>] (bus_add_driver+0x16c/0x248)
[  106.925513] [<c0410f24>] (bus_add_driver+0x16c/0x248) from [<c0412418>] (driver_register+0xa8/0x124)
[  106.934690] [<c0412418>] (driver_register+0xa8/0x124) from [<c00087e8>] (do_one_initcall+0x138/0x168)
[  106.943943] [<c00087e8>] (do_one_initcall+0x138/0x168) from [<c00b317c>] (load_module+0xd48/0xf70)
[  106.952937] [<c00b317c>] (load_module+0xd48/0xf70) from [<c00b3784>] (SyS_finit_module+0x1d4/0x268)
[  106.962013] [<c00b3784>] (SyS_finit_module+0x1d4/0x268) from [<c000e5e0>] (ret_fast_syscall+0x0/0x30)
[  106.971255] ---[ end trace 493f33f26247f213 ]---
[  106.976021] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  106.983750] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  106.991262] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  106.997992] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.004662] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.011311] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.018016] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.024691] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.031336] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x18
[  107.037912] [ar0330]: chip version 0x0000
[  107.041951] [ar0330]: failed to read sensor id
[  107.046423] ------------[ cut here ]------------
[  107.051076] WARNING: at /media/cbueno/DATA/yocto/Toradex/oe-core/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/media/i2c/soc_camera/ar0330_v4l2.c:712 ar0330_power_off+0x38/0x88 [ar0330_v4l2]()
[  107.069527] Modules linked in: ar0330_v4l2 imx135_v4l2 tegra_camera(+) ov5640 videobuf2_dma_contig joydev bluetooth gpio_apalis_tk1_k20 apalis_tk1_k20_can apalis_tk1_k20_adc apalis_tk1_k20_ts atmel_mxt_ts apalis_tk1_k20
[  107.089445] CPU: 0 PID: 809 Comm: modprobe Tainted: G        W    3.10.40-2.8.4+gba29b06 #1
[  107.097835] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[  107.106483] [<c0012090>] (show_stack+0x18/0x1c) from [<c00584a0>] (warn_slowpath_common+0x54/0x74)
[  107.115515] [<c00584a0>] (warn_slowpath_common+0x54/0x74) from [<c0058568>] (warn_slowpath_null+0x20/0x28)
[  107.125205] [<c0058568>] (warn_slowpath_null+0x20/0x28) from [<bf0a6440>] (ar0330_power_off+0x38/0x88 [ar0330_v4l2])
[  107.135797] [<bf0a6440>] (ar0330_power_off+0x38/0x88 [ar0330_v4l2]) from [<bf0a67f4>] (ar0330_probe+0x188/0x1ec [ar0330_v4l2])
[  107.147219] [<bf0a67f4>] (ar0330_probe+0x188/0x1ec [ar0330_v4l2]) from [<c051f1e0>] (i2c_device_probe+0xac/0xf8)
[  107.157456] [<c051f1e0>] (i2c_device_probe+0xac/0xf8) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  107.167063] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  107.176658] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  107.185586] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  107.194493] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c040f12c>] (device_add+0x3a8/0x588)
[  107.203307] [<c040f12c>] (device_add+0x3a8/0x588) from [<c051d290>] (i2c_new_device+0x14c/0x1b4)
[  107.212154] [<c051d290>] (i2c_new_device+0x14c/0x1b4) from [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8)
[  107.222105] [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8) from [<c0537c24>] (soc_camera_host_register+0x384/0x7e8)
[  107.232960] [<c0537c24>] (soc_camera_host_register+0x384/0x7e8) from [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera])
[  107.244643] [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera]) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  107.255914] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c0411bd0>] (__driver_attach+0x54/0x94)
[  107.265430] [<c0411bd0>] (__driver_attach+0x54/0x94) from [<c040fd94>] (bus_for_each_dev+0x84/0x94)
[  107.274504] [<c040fd94>] (bus_for_each_dev+0x84/0x94) from [<c0410f24>] (bus_add_driver+0x16c/0x248)
[  107.283739] [<c0410f24>] (bus_add_driver+0x16c/0x248) from [<c0412418>] (driver_register+0xa8/0x124)
[  107.292900] [<c0412418>] (driver_register+0xa8/0x124) from [<c00087e8>] (do_one_initcall+0x138/0x168)
[  107.302158] [<c00087e8>] (do_one_initcall+0x138/0x168) from [<c00b317c>] (load_module+0xd48/0xf70)
[  107.311179] [<c00b317c>] (load_module+0xd48/0xf70) from [<c00b3784>] (SyS_finit_module+0x1d4/0x268)
[  107.320259] [<c00b3784>] (SyS_finit_module+0x1d4/0x268) from [<c000e5e0>] (ret_fast_syscall+0x0/0x30)
[  107.329495] ---[ end trace 493f33f26247f214 ]---
[  107.334179] [ar0330]: fail to read out sensor ID.
[  107.339461] soc-camera-pdrv soc-camera-pdrv.4: Probing soc-camera-pdrv.4
[  107.555827] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x3c
[  107.562420] AP1302 chip id = 0x0000
[  107.565983] ap1302: probe of 2-003c failed with error -1
[  107.571796] soc-camera-pdrv soc-camera-pdrv.5: Probing soc-camera-pdrv.5
[  107.583630] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x3c
[  107.590313] ov5640 2-003c: Failure to read Chip ID (high byte)
[  107.596199] ov5640: probe of 2-003c failed with error -22
[  107.602121] soc-camera-pdrv soc-camera-pdrv.6: Probing soc-camera-pdrv.6
[  107.613748] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x3d
[  107.620439] ov5640 2-003d: Failure to read Chip ID (high byte)
[  107.626364] ov5640: probe of 2-003d failed with error -22
[  107.632231] soc-camera-pdrv soc-camera-pdrv.7: Probing soc-camera-pdrv.7
[  107.646514] tegra-i2c tegra12-i2c.2: no acknowledge from address 0xf
[  107.653142] i2c_wr:write reg error:reg=4,val=0
[  107.657794] tegra-i2c tegra12-i2c.2: no acknowledge from address 0xf
[  107.664420] i2c_wr:write reg error:reg=8502,val=0
[  107.669316] tegra-i2c tegra12-i2c.2: no acknowledge from address 0xf
[  107.675790] tc358743_write_edid:write reg error:reg=8c00,val=8
[  107.681655] tc358743_probe: Fail to write EDID to tc35874!
[  107.687267] tegra-i2c tegra12-i2c.2: no acknowledge from address 0xf
[  107.693802] i2c_wr:write reg error:reg=8544,val=0
[  108.199097] tegra-i2c tegra12-i2c.2: no acknowledge from address 0xf
[  108.205609] i2c_wr:write reg error:reg=8544,val=10
[  108.210461] tc358743: probe of 2-000f failed with error -1
[  108.216491] soc-camera-pdrv soc-camera-pdrv.8: Probing soc-camera-pdrv.8
[  108.228129] tegra-i2c tegra12-i2c.0: no acknowledge from address 0xf
[  108.234715] i2c_wr:write reg error:reg=4,val=0
[  108.239441] tegra-i2c tegra12-i2c.0: no acknowledge from address 0xf
[  108.245926] i2c_wr:write reg error:reg=8502,val=0
[  108.250884] tegra-i2c tegra12-i2c.0: no acknowledge from address 0xf
[  108.257365] tc358743_write_edid:write reg error:reg=8c00,val=8
[  108.263256] tc358743_probe: Fail to write EDID to tc35874!
[  108.268959] tegra-i2c tegra12-i2c.0: no acknowledge from address 0xf
[  108.275487] i2c_wr:write reg error:reg=8544,val=0
[  108.780704] tegra-i2c tegra12-i2c.0: no acknowledge from address 0xf
[  108.787247] i2c_wr:write reg error:reg=8544,val=10
[  108.792102] tc358743: probe of 0-000f failed with error -1
[  108.798143] soc-camera-pdrv soc-camera-pdrv.9: Probing soc-camera-pdrv.9
[  108.812525] probe, id=adv7280
[  108.815601] adv7280 2-0020: chip found @ 0x40 (Tegra I2C adapter)
[  108.821927] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.828589] adv7280 2-0020: ident reg is 0x87
[  108.833182] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.850809] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.857469] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.864117] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.870820] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.877467] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.884114] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.890811] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.897458] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.904102] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.910833] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.917479] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.924123] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.930822] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.937469] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.944115] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.950849] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.957493] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x42
[  108.964140] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x42
[  108.970834] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x42
[  108.977481] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  108.984125] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  108.990823] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  108.997467] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  109.004110] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  109.010803] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  109.017449] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  109.024088] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x44
[  109.030852] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  109.037941] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (UYVY) packed
[  109.040359] vi vi.1: initialized
[  109.048819] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (VYUY) packed
[  109.056473] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YUYV) packed
[  109.064099] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YVYU) packed
[  109.071704] vi vi.0: Supporting mbus format code 0x2006 using YUV420 (YU12) planar
[  109.079296] vi vi.0: Supporting mbus format code 0x2006 using YVU420 (YV12) planar
[  109.087453] vi vi.0: Tegra camera driver loaded.
[  109.087481] soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
[  109.100507] vi vi.1: Supporting mbus format code 0x100e using RGBA 8-8-8-8
[  109.108045] soc-camera-pdrv soc-camera-pdrv.2: Probing soc-camera-pdrv.2
[  109.121182] [ar0261]: sensor driver loading
[  109.126327] [ar0261]: probing sensor.
[  109.130250] ar0261_v4l2 2-0036: ar0261_regulator_get vdig ERR: -517
[  109.136611] ar0261_v4l2 2-0036: ar0261_regulator_get vana ERR: -517
[  109.143009] ar0261_v4l2 2-0036: ar0261_regulator_get vif ERR: -517
[  109.149252] ar0261_v4l2 2-0036: ar0261_regulator_get avdd_af1_cam ERR: -517
[  109.156291] ------------[ cut here ]------------
[  109.160953] WARNING: at /media/cbueno/DATA/yocto/Toradex/oe-core/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/media/i2c/soc_camera/ar0261_v4l2.c:806 ar0261_power_on+0x44/0x11c [ar0261_v4l2]()
[  109.179404] Modules linked in: ar0261_v4l2 soc_camera_platform adv7280 tc358743 ap1302 ar0330_v4l2 imx135_v4l2 tegra_camera(+) ov5640 videobuf2_dma_contig joydev bluetooth gpio_apalis_tk1_k20 apalis_tk1_k20_can apalis_tk1_k20_adc apalis_tk1_k20_ts atmel_mxt_ts apalis_tk1_k20
[  109.204266] CPU: 1 PID: 101 Comm: kworker/u8:3 Tainted: G        W    3.10.40-2.8.4+gba29b06 #1
[  109.213044] Workqueue: deferwq deferred_probe_work_func
[  109.218339] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[  109.226989] [<c0012090>] (show_stack+0x18/0x1c) from [<c00584a0>] (warn_slowpath_common+0x54/0x74)
[  109.235976] [<c00584a0>] (warn_slowpath_common+0x54/0x74) from [<c0058568>] (warn_slowpath_null+0x20/0x28)
[  109.245656] [<c0058568>] (warn_slowpath_null+0x20/0x28) from [<bf0be344>] (ar0261_power_on+0x44/0x11c [ar0261_v4l2])
[  109.256218] [<bf0be344>] (ar0261_power_on+0x44/0x11c [ar0261_v4l2]) from [<bf0be7d0>] (ar0261_probe+0x128/0x1fc [ar0261_v4l2])
[  109.267638] [<bf0be7d0>] (ar0261_probe+0x128/0x1fc [ar0261_v4l2]) from [<c051f1e0>] (i2c_device_probe+0xac/0xf8)
[  109.277848] [<c051f1e0>] (i2c_device_probe+0xac/0xf8) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  109.287443] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  109.297033] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  109.305927] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  109.314821] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c040f12c>] (device_add+0x3a8/0x588)
[  109.323632] [<c040f12c>] (device_add+0x3a8/0x588) from [<c051d290>] (i2c_new_device+0x14c/0x1b4)
[  109.332442] [<c051d290>] (i2c_new_device+0x14c/0x1b4) from [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8)
[  109.342388] [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8) from [<c0537c24>] (soc_camera_host_register+0x384/0x7e8)
[  109.353199] [<c0537c24>] (soc_camera_host_register+0x384/0x7e8) from [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera])
[  109.364877] [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera]) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  109.376113] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  109.385700] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  109.394589] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  109.403484] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c04111a0>] (deferred_probe_work_func+0x94/0xb4)
[  109.413341] [<c04111a0>] (deferred_probe_work_func+0x94/0xb4) from [<c0075518>] (process_one_work+0x278/0x3ec)
[  109.423367] [<c0075518>] (process_one_work+0x278/0x3ec) from [<c00764cc>] (worker_thread+0x1b0/0x328)
[  109.432606] [<c00764cc>] (worker_thread+0x1b0/0x328) from [<c007c1a4>] (kthread+0xc0/0xcc)
[  109.440896] [<c007c1a4>] (kthread+0xc0/0xcc) from [<c000e678>] (ret_from_fork+0x14/0x20)
[  109.449000] ---[ end trace 493f33f26247f215 ]---
[  109.453773] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.460469] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.467112] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.473773] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.480441] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.487077] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.493714] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.500378] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.507012] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x36
[  109.513551] [ar0261]: chip version 0x0000
[  109.517585] [ar0261]: failed to read sensor id
[  109.522079] ------------[ cut here ]------------
[  109.526731] WARNING: at /media/cbueno/DATA/yocto/Toradex/oe-core/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/media/i2c/soc_camera/ar0261_v4l2.c:858 ar0261_power_off+0x50/0xb0 [ar0261_v4l2]()
[  109.545174] Modules linked in: ar0261_v4l2 soc_camera_platform adv7280 tc358743 ap1302 ar0330_v4l2 imx135_v4l2 tegra_camera(+) ov5640 videobuf2_dma_contig joydev bluetooth gpio_apalis_tk1_k20 apalis_tk1_k20_can apalis_tk1_k20_adc apalis_tk1_k20_ts atmel_mxt_ts apalis_tk1_k20
[  109.570053] CPU: 0 PID: 101 Comm: kworker/u8:3 Tainted: G        W    3.10.40-2.8.4+gba29b06 #1
[  109.578769] Workqueue: deferwq deferred_probe_work_func
[  109.584042] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[  109.592737] [<c0012090>] (show_stack+0x18/0x1c) from [<c00584a0>] (warn_slowpath_common+0x54/0x74)
[  109.601732] [<c00584a0>] (warn_slowpath_common+0x54/0x74) from [<c0058568>] (warn_slowpath_null+0x20/0x28)
[  109.611416] [<c0058568>] (warn_slowpath_null+0x20/0x28) from [<bf0be46c>] (ar0261_power_off+0x50/0xb0 [ar0261_v4l2])
[  109.621994] [<bf0be46c>] (ar0261_power_off+0x50/0xb0 [ar0261_v4l2]) from [<bf0be83c>] (ar0261_probe+0x194/0x1fc [ar0261_v4l2])
[  109.633413] [<bf0be83c>] (ar0261_probe+0x194/0x1fc [ar0261_v4l2]) from [<c051f1e0>] (i2c_device_probe+0xac/0xf8)
[  109.643639] [<c051f1e0>] (i2c_device_probe+0xac/0xf8) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  109.653235] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  109.662885] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  109.672121] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  109.681155] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c040f12c>] (device_add+0x3a8/0x588)
[  109.690078] [<c040f12c>] (device_add+0x3a8/0x588) from [<c051d290>] (i2c_new_device+0x14c/0x1b4)
[  109.699007] [<c051d290>] (i2c_new_device+0x14c/0x1b4) from [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8)
[  109.708987] [<c052f664>] (v4l2_i2c_new_subdev_board+0xe0/0xe8) from [<c0537c24>] (soc_camera_host_register+0x384/0x7e8)
[  109.719861] [<c0537c24>] (soc_camera_host_register+0x384/0x7e8) from [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera])
[  109.731676] [<bf094564>] (tegra_camera_probe+0x2d4/0x34c [tegra_camera]) from [<c04119d8>] (driver_probe_device+0x1d8/0x330)
[  109.743431] [<c04119d8>] (driver_probe_device+0x1d8/0x330) from [<c040fe4c>] (bus_for_each_drv+0x8c/0x94)
[  109.753060] [<c040fe4c>] (bus_for_each_drv+0x8c/0x94) from [<c0411790>] (device_attach+0x78/0x90)
[  109.761993] [<c0411790>] (device_attach+0x78/0x90) from [<c0410c2c>] (bus_probe_device+0x30/0xa0)
[  109.770970] [<c0410c2c>] (bus_probe_device+0x30/0xa0) from [<c04111a0>] (deferred_probe_work_func+0x94/0xb4)
[  109.781246] [<c04111a0>] (deferred_probe_work_func+0x94/0xb4) from [<c0075518>] (process_one_work+0x278/0x3ec)
[  109.791655] [<c0075518>] (process_one_work+0x278/0x3ec) from [<c00764cc>] (worker_thread+0x1b0/0x328)
[  109.800975] [<c00764cc>] (worker_thread+0x1b0/0x328) from [<c007c1a4>] (kthread+0xc0/0xcc)
[  109.809285] [<c007c1a4>] (kthread+0xc0/0xcc) from [<c000e678>] (ret_from_fork+0x14/0x20)
[  109.817394] ---[ end trace 493f33f26247f216 ]---
[  109.822046] [ar0261]: fail to read out sensor ID.
[  109.827903] vi vi.1: Tegra camera driver loaded.
[  109.829069] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20
[  109.829304] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x20

More information:

root@apalis-tk1:~# modinfo tegra_camera
filename:       /lib/modules/3.10.40-2.8.4+gba29b06/kernel/drivers/media/platform/soc_camera/tegra_camera/tegra_camera.ko
alias:          nvhost:vi
license:        GPL v2
author:         Bryan Wu <pengw@nvidia.com>
description:    TEGRA SoC Camera Host driver
srcversion:     070FB3127EC8C5DFB667DC7
depends:        videobuf2-dma-contig
intree:         Y
vermagic:       3.10.40-2.8.4+gba29b06 SMP preempt mod_unload modversions ARMv7 p2v8 
parm:           tpg_mode:int
root@apalis-tk1:~# modinfo ov5640
filename:       /lib/modules/3.10.40-2.8.4+gba29b06/kernel/drivers/media/i2c/soc_camera/ov5640.ko
license:        GPL v2
author:         Andrew Chew <achew@nvidia.com>
description:    SoC Camera driver for OmniVision OV5640
srcversion:     71EBC807674BA4246EA9C9E
alias:          i2c:ov5640
depends:        
intree:         Y
vermagic:       3.10.40-2.8.4+gba29b06 SMP preempt mod_unload modversions ARMv7 p2v8 
parm:           test_pattern:int
root@apalis-tk1:~# modinfo videobuf2-dma-contig
filename:       /lib/modules/3.10.40-2.8.4+gba29b06/kernel/drivers/media/v4l2-core/videobuf2-dma-contig.ko
license:        GPL
author:         Pawel Osciak <pawel@osciak.com>
description:    DMA-contig memory handling routines for videobuf2
srcversion:     5A363D7E70057C20615BE0B
depends:        
intree:         Y
vermagic:       3.10.40-2.8.4+gba29b06 SMP preempt mod_unload modversions ARMv7 p2v8 

I followed this article:

And I applied this change in device-tree.


Cleiton Bueno

Blog | Linkedin | B2Open

Is there any particular reason for you to set this question on private? With private questions, there is no way for the community to provide feedback or profit from any feedback.

What exact camera and hardware revision thereof have you connected?

What exactly is it that is not working for you?

What device-tree changes are you exactly talking about? I am not aware of any such being required.

Why exactly are you running the boot loader from BSP 2.8.5 and the Linux kernel from 2.8.4?

@marcel.tx

We can move to public viewing, no problem and agree with the return to the community.

  • Camera OV5640: V1.1A

  • When loading the module tegra_camera generates several “errors”, however, the device is created /dev/video0 and /dev/video1 but when running gst-launch-1.0:

    gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=640,height=480' ! ximagesink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.209078750  1033   0x195a30 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
    0:00:00.209285083  1033   0x195a30 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    ../../../../gstreamer-1.12.2/libs/gst/base/gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    

Does not open the gst-launch by streaming the camera.

  • This change in device-tree:
    CSI Camera Module 5MP OV5640 (Linux)

  • On bootloader 2.8.5 due to having tested with tk1-apalis-mainline, but I had problems with 2.8.4 earlier as well.

I’ve tested it now: U-Boot 2016.11-2.8.4+g07edca0 same problem, and about Device-tree, I’ve tested with and without changed.

At least stock BSP 2.8b5 works just fine with our OV5640 see the log file.

The /dev/video0 resp. /dev/video1 do not relate to the OV5640 driver in your case as may be seen from those lines:

 [  107.590313] ov5640 2-003c: Failure to read Chip ID (high byte)
 [  107.596199] ov5640: probe of 2-003c failed with error -22
 [  107.602121] soc-camera-pdrv soc-camera-pdrv.6: Probing soc-camera-pdrv.6
 [  107.613748] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x3d
 [  107.620439] ov5640 2-003d: Failure to read Chip ID (high byte)
 [  107.626364] ov5640: probe of 2-003d failed with error -22

Whereas in the good case that would read as follows:

[   73.851879] soc-camera-pdrv soc-camera-pdrv.5: Probing soc-camera-pdrv.5
[   73.866825] ov5640 2-003c: Chip ID 0x5640
[   73.875879] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (UYVY) packed
[   73.884779] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (VYUY) packed
[   73.893253] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YUYV) packed
[   73.902443] vi vi.1: initialized
[   73.907145] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YVYU) packed
[   73.919849] vi vi.0: Supporting mbus format code 0x2006 using YUV420 (YU12) planar
[   73.927968] vi vi.0: Supporting mbus format code 0x2006 using YVU420 (YV12) planar

So it looks that at least the I2C connection resp. power to your OV5640 module seems broken.

If you want to decrease the amount of bogus errors being reported during camera probing just remove the Linux kernel modules you are not interested in e.g.:

root@apalis-tk1:~# mv /lib/modules/3.10.40-2.8.5+gccecdb3d6b3b/kernel/drivers/media/i2c/soc_camera/a* ~/
root@apalis-tk1:~# mv /lib/modules/3.10.40-2.8.5+gccecdb3d6b3b/kernel/drivers/media/i2c/soc_camera/imx135_v4l2.ko ~/
root@apalis-tk1:~# mv /lib/modules/3.10.40-2.8.5+gccecdb3d6b3b/kernel/drivers/media/i2c/soc_camera/tc358743.ko ~/

Which should result in a much leaner and easier to debug situation:

root@apalis-tk1:~# echo 250 > /sys/class/gpio/export
root@apalis-tk1:~# echo low > /sys/class/gpio/gpio250/direction
root@apalis-tk1:~# echo 248 > /sys/class/gpio/export
root@apalis-tk1:~# echo low > /sys/class/gpio/gpio248/direction
root@apalis-tk1:~# echo high > /sys/class/gpio/gpio250/direction
root@apalis-tk1:~# modprobe videobuf2-dma-contig
root@apalis-tk1:~# modprobe ov5640
root@apalis-tk1:~# modprobe tegra_camera
[  187.808478] vi vi.0: initialized
[  187.827603] platform vi.1: Driver vi requests probe deferral
[  187.840267] soc-camera-pdrv soc-camera-pdrv.1: Probing soc-camera-pdrv.1
[  187.853718] soc-camera-pdrv soc-camera-pdrv.3: Probing soc-camera-pdrv.3
[  187.870929] soc-camera-pdrv soc-camera-pdrv.4: Probing soc-camera-pdrv.4
[  187.882140] soc-camera-pdrv soc-camera-pdrv.5: Probing soc-camera-pdrv.5
[  187.893353] ov5640 2-003c: Chip ID 0x5640
[  187.898462] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (UYVY) packed
[  187.906696] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (VYUY) packed
[  187.914502] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YUYV) packed
[  187.922108] vi vi.0: Supporting mbus format code 0x2006 using YUV422 (YVYU) packed
[  187.929782] vi vi.0: Supporting mbus format code 0x2006 using YUV420 (YU12) planar
[  187.938105] vi vi.0: Supporting mbus format code 0x2006 using YVU420 (YV12) planar
[  187.946394] vi vi.1: initialized
[  187.950702] soc-camera-pdrv soc-camera-pdrv.6: Probing soc-camera-pdrv.6
[  187.961178] tegra-i2c tegra12-i2c.2: no acknowledge from address 0x3d
[  187.968334] ov5640 2-003d: Failure to read Chip ID (high byte)
[  187.974708] ov5640: probe of 2-003d failed with error -22
[  187.980741] soc-camera-pdrv soc-camera-pdrv.7: Probing soc-camera-pdrv.7
[  187.990886] soc-camera-pdrv soc-camera-pdrv.8: Probing soc-camera-pdrv.8
[  188.000653] soc-camera-pdrv soc-camera-pdrv.9: Probing soc-camera-pdrv.9
[  188.010242] vi vi.0: Tegra camera driver loaded.
[  188.011790] soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
[  188.024144] vi vi.1: Supporting mbus format code 0x100e using RGBA 8-8-8-8
[  188.033358] soc-camera-pdrv soc-camera-pdrv.2: Probing soc-camera-pdrv.2
[  188.043162] vi vi.1: Tegra camera driver loaded.
root@apalis-tk1:~# 
root@apalis-tk1:~# gst-launch-0.10 v4l2src queue-size=1 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=640,height=480' ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not get parameters on device '/dev/video0'
Additional debug info:
../../../gst-plugins-good-0.10.31/sys/v4l2/v4l2src_calls.c(235): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Inappropriate ioctl for device
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...

(gst-launch-0.10:811): GLib-CRITICAL **: Source ID 22 was not found when attempting to remove it   
Execution ended after 3757132523 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I would recommend double-checking your connection both on the Ixora as well as the OV5640 camera side. Make sure it is as per datasheet (e.g. with the blue stripes of the FFC cables facing to the top when plugged in).

We make the connection as oriented in the manual as the attached image, disconnect and connect several times but without success!

I ended up publishing here, because it exhausted my alternatives.

1444-connectionov5640ixora.png

That looks correct. I assume you did plug that FFC in all the way. Let me post a picture of my board just to make this clear.
[upload|wE9JLVh3WQnuUwTyn2jT15CN2Mg=]
[upload|o7Gp7DymVFkPXbGuH9+HTWEdmXs=]