Hi
I’m trying to make camera sensor driver with jetson-tk1 board.
Kernel and modules were build well and flashed on board and I loaded modules like following commands
sudo rmmod nvhost_vi
sudo modprobe soc_camera
sudo modprobe mycamera_driver
sudo modprobe tegra_camera
After that, I checked kernel log message by ‘dmesg’. There are some errors about i2c transfer.
Kernel, modules and camera sensor were verified on another tk1 board.
If I run camera capture player, kernel becomes freeze.
Here’s log message.
[ 147.240789] vi vi.0: Tegra camera driver loaded.
[ 147.250562] vi vi.1: initialized
[ 147.250584] soc-camera-pdrv soc-camera-pdrv.1: Probing soc-camera-pdrv.1
[ 147.261486] vi vi.1: Supporting mbus format code 0x100e using RGBA 8-8-8-8
[ 147.266696] vi vi.1: Tegra camera driver loaded.
[ 147.270580] [mydebug] s_power : 1
[ 147.270598] [mydebug] power_on
[ 147.272032] [mydebug] try_fmt
[ 147.272038] [mydebug] s_fmt
[ 147.272042] [mydebug] try_fmt
[ 147.272172] [mydebug] s_power : 0
[ 148.271377] tegra-i2c tegra12-i2c.2: --- register dump for debugging ----
[ 148.278481] tegra-i2c tegra12-i2c.2: I2C_CNFG - 0x2c00
[ 148.283751] tegra-i2c tegra12-i2c.2: I2C_PACKET_TRANSFER_STATUS - 0xff0001
[ 148.290867] tegra-i2c tegra12-i2c.2: I2C_FIFO_CONTROL - 0xe0
[ 148.296640] tegra-i2c tegra12-i2c.2: I2C_FIFO_STATUS - 0x800070
[ 148.303129] tegra-i2c tegra12-i2c.2: I2C_INT_MASK - 0xec
[ 148.308662] tegra-i2c tegra12-i2c.2: I2C_INT_STATUS - 0x0
[ 148.314169] tegra-i2c tegra12-i2c.2: msg->len - 2
[ 148.318941] tegra-i2c tegra12-i2c.2: is_msg_write - 1
[ 148.324092] tegra-i2c tegra12-i2c.2: buf_remaining - 0
[ 148.329437] tegra-i2c tegra12-i2c.2: i2c transfer timed out, addr 0x000e, data 0x1b
[ 148.337216] write_reg_2:i2c write failed, 1b = 0
[ 149.342501] tegra-i2c tegra12-i2c.2: --- register dump for debugging ----
[ 149.349867] tegra-i2c tegra12-i2c.2: I2C_CNFG - 0x2c00
[ 149.355131] tegra-i2c tegra12-i2c.2: I2C_PACKET_TRANSFER_STATUS - 0xff0001
[ 149.362324] tegra-i2c tegra12-i2c.2: I2C_FIFO_CONTROL - 0xe0
[ 149.368198] tegra-i2c tegra12-i2c.2: I2C_FIFO_STATUS - 0x800070
[ 149.374394] tegra-i2c tegra12-i2c.2: I2C_INT_MASK - 0xec
[ 149.379925] tegra-i2c tegra12-i2c.2: I2C_INT_STATUS - 0x0
[ 149.385426] tegra-i2c tegra12-i2c.2: msg->len - 2
[ 149.390198] tegra-i2c tegra12-i2c.2: is_msg_write - 1
[ 149.395412] tegra-i2c tegra12-i2c.2: buf_remaining - 0
[ 149.400996] tegra-i2c tegra12-i2c.2: i2c transfer timed out, addr 0x000e, data 0x03
[ 149.408753] write_reg_2:i2c write failed, 3 = 3
[ 150.413489] tegra-i2c tegra12-i2c.2: --- register dump for debugging ----
[ 150.420922] tegra-i2c tegra12-i2c.2: I2C_CNFG - 0x2c00
[ 150.426283] tegra-i2c tegra12-i2c.2: I2C_PACKET_TRANSFER_STATUS - 0xff0001
[ 150.433347] tegra-i2c tegra12-i2c.2: I2C_FIFO_CONTROL - 0xe0
[ 150.439121] tegra-i2c tegra12-i2c.2: I2C_FIFO_STATUS - 0x800070
[ 150.445380] tegra-i2c tegra12-i2c.2: I2C_INT_MASK - 0xec
[ 150.451301] tegra-i2c tegra12-i2c.2: I2C_INT_STATUS - 0x0
[ 150.456830] tegra-i2c tegra12-i2c.2: msg->len - 2
[ 150.461651] tegra-i2c tegra12-i2c.2: is_msg_write - 1
[ 150.466866] tegra-i2c tegra12-i2c.2: buf_remaining - 0
[ 150.472101] tegra-i2c tegra12-i2c.2: i2c transfer timed out, addr 0x000e, data 0x04
[ 150.479913] write_reg_2:i2c write failed, 4 = ff
[ 150.485872] ------------[ cut here ]------------
[ 150.485883] WARNING: at arch/arm/mach-tegra/clock.c:303 clk_disable+0x44/0x8c()
[ 150.485886] Attempting to disable clock vib.vi.c4bus with refcnt 0
[ 150.485889] Modules linked in: tegra_camera videobuf2_dma_contig s5k4h5yc soc_camera_platform soc_camera soc_mediabus videobuf_core dm_crypt dm_mod rfcomm bnep bluetooth rfkill joydev [last unloaded: s5k4h5yc]
[ 150.485918] CPU: 0 PID: 3268 Comm: v4l_id Tainted: G W 3.10.40+ #6
[ 150.485930] [<c0016350>] (unwind_backtrace+0x0/0x13c) from [<c0012be4>] (show_stack+0x18/0x1c)
[ 150.485938] [<c0012be4>] (show_stack+0x18/0x1c) from [<c0062bd0>] (warn_slowpath_common+0x5c/0x74)
[ 150.485944] [<c0062bd0>] (warn_slowpath_common+0x5c/0x74) from [<c0062c20>] (warn_slowpath_fmt+0x38/0x48)
[ 150.485951] [<c0062c20>] (warn_slowpath_fmt+0x38/0x48) from [<c00256f4>] (clk_disable+0x44/0x8c)
[ 150.485960] [<c00256f4>] (clk_disable+0x44/0x8c) from [<bf0d4e64>] (vi2_clks_disable+0x40/0xa8 [tegra_camera])
[ 150.485974] [<bf0d4e64>] (vi2_clks_disable+0x40/0xa8 [tegra_camera]) from [<bf0d3394>] (tegra_camera_remove_device+0x48/0xa4 [tegra_camera])
[ 150.485982] [<bf0d3394>] (tegra_camera_remove_device+0x48/0xa4 [tegra_camera]) from [<bf0197b8>] (soc_camera_close+0xcc/0xe8 [soc_camera])
[ 150.485990] [<bf0197b8>] (soc_camera_close+0xcc/0xe8 [soc_camera]) from [<c051c170>] (v4l2_release+0x40/0x7c)
[ 150.485998] [<c051c170>] (v4l2_release+0x40/0x7c) from [<c01457dc>] (__fput+0x94/0x204)
[ 150.486006] [<c01457dc>] (__fput+0x94/0x204) from [<c008579c>] (task_work_run+0xbc/0xf4)
[ 150.486013] [<c008579c>] (task_work_run+0xbc/0xf4) from [<c001241c>] (do_work_pending+0x238/0x4ac)
[ 150.486019] [<c001241c>] (do_work_pending+0x238/0x4ac) from [<c000ed40>] (work_pending+0xc/0x20)
[ 150.486023] ---[ end trace fc68ba68b471dc56 ]---