VIM3 配置IMX307摄像头的驱动后,在板子启动时有报错

错误日志如下:

Oct 13 19:17:28 localhost kernel: [   19.378592@4] iq name from dts config is ----> imx307
Oct 13 19:17:28 localhost kernel: [   19.378620@4] get_cali_name_id@soc_iq.c:224 SUBDEV_IQ(ERR) :get_calibrations_imx307
Oct 13 19:17:28 localhost kernel: [   19.378623@4] 
Oct 13 19:17:28 localhost kernel: [   19.378630@4] acamera_camera_async_bound@main_kernel_juno_v4l2.c:133 GENERIC(ERR) :bound called with sd 0x2a58400, asd 0x22a4a68, sd->dev 0x27665810, name SocCalibrations
Oct 13 19:17:28 localhost kernel: [   19.378638@4] soc_iq_probe@soc_iq.c:276 SUBDEV_IQ(ERR) :register v4l2 IQ device. result 0, sd 0x2a58400 sd->dev 0x27665810
Oct 13 19:17:28 localhost kernel: [   19.381323@5] acamera_soc_lens_init@soc_lens.c:221 GENERIC(INFO) :Lens subdevice init
Oct 13 19:17:28 localhost kernel: [   19.381656@5] acamera_camera_async_bound@main_kernel_juno_v4l2.c:133 GENERIC(ERR) :bound called with sd 0x2aaa480, asd 0x22a4a90, sd->dev 0x13e0e410, name SocLens
Oct 13 19:17:28 localhost kernel: [   19.381664@5] soc_lens_probe@soc_lens.c:193 GENERIC(INFO) :register v4l2 lens device. result 0, sd 0x2aaa480 sd->dev 0x13e0e410
Oct 13 19:17:28 localhost kernel: [   19.387773@5] acamera_camera_sensor_init@soc_sensor.c:564 GENERIC(ERR) :Sensor subdevice init
Oct 13 19:17:28 localhost kernel: [   19.388054@5] config sensor imx307 driver.
Oct 13 19:17:28 localhost kernel: [   19.388099@5] ir_cut_get_named_gpio@soc_sensor.c:477 GENERIC(ERR) :ir cut gpio count = 1
Oct 13 19:17:28 localhost kernel: [   19.388102@5] 
Oct 13 19:17:28 localhost kernel: [   19.388112@5] ir_cut_get_named_gpio@soc_sensor.c:482 GENERIC(ERR) :ir cut gpio name [0] = 404
Oct 13 19:17:28 localhost kernel: [   19.388115@5] 
Oct 13 19:17:28 localhost kernel: [   19.388117@5] sensor bsp init
Oct 13 19:17:28 localhost kernel: [   19.388123@5] acamera_camera_async_bound@main_kernel_juno_v4l2.c:133 GENERIC(ERR) :bound called with sd 0x2aeed98, asd 0x22a4ab8, sd->dev 0x27665410, name SocSensor
Oct 13 19:17:28 localhost kernel: [   19.388131@5] acamera_camera_async_complete@main_kernel_juno_v4l2.c:187 GENERIC(ERR) :complete called
Oct 13 19:17:28 localhost kernel: [   19.388136@5] acamera_camera_async_complete@main_kernel_juno_v4l2.c:189 GENERIC(ERR) :starting V4L2 firmware
Oct 13 19:17:28 localhost kernel: [   19.389067@5] isp_v4l2_ctrl_s_ctrl_standard@isp-v4l2-ctrl.c:43 GENERIC(ERR) :Control - id:0x980900, val:128, is_int:1, min:0, max:255.
Oct 13 19:17:28 localhost kernel: [   19.389072@5] 
Oct 13 19:17:28 localhost kernel: [   19.389075@5] isp_fw_do_set_brightness@fw-interface.c:916 GENERIC(ERR) :ISP FW not inited yet
Oct 13 19:17:28 localhost kernel: [   19.389557@5] acamera_init@acamera.c:299 GENERIC(ERR) :Success get product id: 0x00000a62
Oct 13 19:17:28 localhost kernel: [   19.389561@5] 
Oct 13 19:17:28 localhost kernel: [   19.391610@5] acamera_camera_v4l2_get_subdev_by_name@main_kernel_juno_v4l2.c:104 GENERIC(ERR) :Requested a pointer to the subdev with a name SocSensor
Oct 13 19:17:28 localhost kernel: [   19.391620@5] acamera_camera_v4l2_get_subdev_by_name@main_kernel_juno_v4l2.c:111 GENERIC(ERR) :Return subdev pointer 0x2aeed98
Oct 13 19:17:28 localhost kernel: [   19.391900@5] reset init
Oct 13 19:17:28 localhost kernel: [   19.391962@5] arm_sensor_i2c_probe: start to probe
Oct 13 19:17:28 localhost kernel: [   19.391988@5] arm_sensor_i2c_probe:arm isp slave addr 0x6c, rtn 0
Oct 13 19:17:28 localhost kernel: [   19.391990@5] arm_sensor_i2c_probe:arm reg_addr_type 2, rtn 0
Oct 13 19:17:28 localhost kernel: [   19.391993@5] arm_sensor_i2c_probe:arm reg_data_type 1, rtn 0
Oct 13 19:17:28 localhost kernel: [   19.392021@5] arm_sensor_i2c_probe: success get link device:phy-csi
Oct 13 19:17:28 localhost kernel: [   19.392032@5] AM_MIPI: am_mipi_parse_dt: rs idx 0 info: name: csi2_phy0
Oct 13 19:17:28 localhost kernel: [   19.392060@5] AM_MIPI: am_mipi_parse_dt: rs idx 1 info: name: csi2_phy1
Oct 13 19:17:28 localhost kernel: [   19.392066@5] AM_MIPI: am_mipi_parse_dt: rs idx 2 info: name: aphy_reg
Oct 13 19:17:28 localhost kernel: [   19.392076@5] AM_MIPI: am_mipi_parse_dt: rs idx 3 info: name: csi0_host
Oct 13 19:17:28 localhost kernel: [   19.392081@5] AM_MIPI: am_mipi_parse_dt: rs idx 4 info: name: csi1_host
Oct 13 19:17:28 localhost kernel: [   19.392093@5] AM_MIPI: am_mipi_parse_dt: rs idx 0 info: irq 61
Oct 13 19:17:28 localhost kernel: [   19.392099@5] AM_MIPI: am_mipi_parse_dt: rs idx 1 info: irq 62
Oct 13 19:17:28 localhost kernel: [   19.392111@5] AM_MIPI: am_mipi_parse_dt:Success to get link device: isp-adapter
Oct 13 19:17:28 localhost kernel: [   19.392117@5] AM_ADAP: am_adap_parse_dt: rs idx info: name: adapter
Oct 13 19:17:28 localhost kernel: [   19.392126@5] AM_ADAP: am_adap_parse_dt:rs info: irq: 60
Oct 13 19:17:28 localhost kernel: [   19.392174@5] platform ff650000.isp-adapter: assigned reserved memory node linux,adapt_cma
Oct 13 19:17:28 localhost kernel: [   19.392176@5] AM_ADAP: adapter alloc 48M memory
Oct 13 19:17:28 localhost kernel: [   19.392260@5] system_i2c_init:success to add i2c driver
Oct 13 19:17:28 localhost kernel: [   19.394377@1] soc_lens_ioctl@soc_lens.c:100 GENERIC(ERR) :Failed to process lens_ioctl. Lens is not initialized yet. lens_init must be called before
Oct 13 19:17:28 localhost kernel: [   19.397445@5] system_i2c_read:failed to read reg data: rc -6, saddr 0x36
Oct 13 19:17:28 localhost kernel: [   19.400080@0] Unable to handle kernel NULL pointer dereference at virtual address 00000000
Oct 13 19:17:28 localhost kernel: [   19.400084@0] pgd = ffffffc025605000
Oct 13 19:17:28 localhost kernel: [   19.400089@0] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400093@0] Internal error: Oops: 86000005 [#1] PREEMPT SMP
Oct 13 19:17:28 localhost kernel: [   19.400132@0] Modules linked in: iv009_isp_sensor(+) iv009_isp_lens iv009_isp_iq galcore vpu encoder amvdec_avs2 amvdec_vp9 amvdec_vc1 amvdec_real amvdec_mmpeg4 amvdec_mpeg4 amvdec_mmpeg12 amvdec_mpeg12 amvdec_mmjpeg amvdec_mjpeg amvdec_h265 amvdec_h264mvc amvdec_mh264 amvdec_h264 amvdec_avs stream_input decoder_common firmware media_clock zram mali_kbase iv009_isp videobuf2_vmalloc dhd btrfs xor raid6_pq
Oct 13 19:17:28 localhost kernel: [   19.400136@0] CPU: 0 PID: 2942 Comm: v4l_id Not tainted 4.9.241 #25
Oct 13 19:17:28 localhost kernel: [   19.400137@0] Hardware name: Khadas VIM3 (DT)
Oct 13 19:17:28 localhost kernel: [   19.400139@0] task: ffffffc02716e200 task.stack: ffffff8020288000
Oct 13 19:17:28 localhost kernel: [   19.400142@0] PC is at 0x0
Oct 13 19:17:28 localhost kernel: [   19.400189@0] LR is at camera_ioctl+0x74/0x7b0 [iv009_isp_sensor]
Oct 13 19:17:28 localhost kernel: [   19.400191@0] pc : [<0000000000000000>] lr : [<ffffff8002abbba4>] pstate: 80000145
Oct 13 19:17:28 localhost kernel: [   19.400192@0] sp : ffffff802028bc40
Oct 13 19:17:28 localhost kernel: [   19.400195@0] x29: ffffff802028bc40 x28: 0000000000000000 
Oct 13 19:17:28 localhost kernel: [   19.400198@0] x27: ffffff8009ef2000 x26: ffffff8009800960 
Oct 13 19:17:28 localhost kernel: [   19.400201@0] x25: ffffffc024a2d000 x24: 0000007fffc0a740 
Oct 13 19:17:28 localhost kernel: [   19.400203@0] x23: 0000000000000002 x22: ffffff8002aeed98 
Oct 13 19:17:28 localhost kernel: [   19.400206@0] x21: 0000000080685600 x20: ffffff8002aeed00 
Oct 13 19:17:28 localhost kernel: [   19.400209@0] x19: ffffff802028bd10 x18: 0000000000000003 
Oct 13 19:17:28 localhost kernel: [   19.400211@0] x17: 0000007fad892530 x16: ffffff8009255d60 
Oct 13 19:17:28 localhost kernel: [   19.400214@0] x15: 0000007fad960150 x14: 0000007fad9601f8 
Oct 13 19:17:28 localhost kernel: [   19.400217@0] x13: 0000007fad962048 x12: 0000000000000000 
Oct 13 19:17:28 localhost kernel: [   19.400220@0] x11: 0000000001004040 x10: 0000008000000000 
Oct 13 19:17:28 localhost kernel: [   19.400222@0] x9 : 0000000000000001 x8 : ffffff802028bd78 
Oct 13 19:17:28 localhost kernel: [   19.400225@0] x7 : 0000000000000000 x6 : 0000000000000000 
Oct 13 19:17:28 localhost kernel: [   19.400227@0] x5 : 0000000000000000 x4 : 0000000000000000 
Oct 13 19:17:28 localhost kernel: [   19.400230@0] x3 : ffffff8002abbb30 x2 : ffffff802028bd10 
Oct 13 19:17:28 localhost kernel: [   19.400232@0] x1 : 0000000000000000 x0 : ffffff8002aef310 
Oct 13 19:17:28 localhost kernel: [   19.400240@0] 
Oct 13 19:17:28 localhost kernel: [   19.400240@0] X25: 0xffffffc024a2cf80:
Oct 13 19:17:28 localhost kernel: [   19.400248@0] cf80  b9404822 d2918100 f2bfec60 b9000002 b9404421 d2918080 f2bfec60 b9000001
Oct 13 19:17:28 localhost kernel: [   19.400256@0] cfa0  52800140 97fff589 d2918000 32060ab6 f2bfec60 b9000016 52800c80 97fff583
Oct 13 19:17:28 localhost kernel: [   19.400263@0] cfc0  d2918000 32060ea1 f2bfec60 b9000001 52800c80 97fff57d d2918000 f2bfec60
Oct 13 19:17:28 localhost kernel: [   19.400270@0] cfe0  b9000016 52800c80 97fff578 f9405a60 79400400 34000120 d2918000 f2bfec60
Oct 13 19:17:28 localhost kernel: [   19.400278@0] d000  00000000 00000000 00000000 00000000 27cd8fe0 ffffffc0 144706c0 ffffffc0
Oct 13 19:17:28 localhost kernel: [   19.400285@0] d020  24b39de8 ffffffc0 09fa7fd8 ffffff80 00000000 00000000 00000001 00000000
Oct 13 19:17:28 localhost kernel: [   19.400292@0] d040  00020000 0002001d 00000001 00000000 24a2d050 ffffffc0 24a2d050 ffffffc0
Oct 13 19:17:28 localhost kernel: [   19.400299@0] d060  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Oct 13 19:17:28 localhost kernel: [   19.400301@0] 
Oct 13 19:17:28 localhost kernel: [   19.400303@0] Process v4l_id (pid: 2942, stack limit = 0xffffff8020288000)
Oct 13 19:17:28 localhost kernel: [   19.400305@0] Stack: (0xffffff802028bc40 to 0xffffff802028c000)
Oct 13 19:17:28 localhost kernel: [   19.400308@0] bc40: ffffff802028bc70 ffffff8009800a14 0000000080685600 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400311@0] bc60: ffffff802028bd10 ffffff80094634fc ffffff802028bca0 ffffff80097f5a1c
Oct 13 19:17:28 localhost kernel: [   19.400313@0] bc80: 0000000080685600 0000000000000068 0000000000000000 ffffff802028bd10
Oct 13 19:17:28 localhost kernel: [   19.400316@0] bca0: ffffff802028bd90 ffffff800980094c ffffffc024a2d000 0000000080685600
Oct 13 19:17:28 localhost kernel: [   19.400318@0] bcc0: 0000007fffc0a740 0000007fffc0a740 0000000000000000 0000007fffc0a740
Oct 13 19:17:28 localhost kernel: [   19.400321@0] bce0: 0000000000000123 000000000000001d ffffff8009ef2000 ffffffc02716e200
Oct 13 19:17:28 localhost kernel: [   19.400323@0] bd00: ffffffff2028bd10 0000000000000000 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400326@0] bd20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400328@0] bd40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400331@0] bd60: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
Oct 13 19:17:28 localhost kernel: [   19.400333@0] bd80: ffffffc024b39de8 ffffff800a2a4000 ffffff802028bdc0 ffffff80097efc68
Oct 13 19:17:28 localhost kernel: [   19.400336@0] bda0: ffffffc013e0dc00 ffffffc024a2d000 0000000080685600 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400339@0] bdc0: ffffff802028be00 ffffff8009255598 0000000080685600 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400341@0] bde0: 0000007fffc0a740 ffffffc024b39de8 0000000000000003 0000000080685600
Oct 13 19:17:28 localhost kernel: [   19.400344@0] be00: ffffff802028be80 ffffff8009255dec 0000000000000000 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400346@0] be20: ffffffc024a2d000 0000000000000003 0000000080685600 0000007fad89253c
Oct 13 19:17:28 localhost kernel: [   19.400349@0] be40: ffffff802028be80 ffffff8009255db0 0000000000000800 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400352@0] be60: ffffffc024a2d000 0000000000000003 0000000080685600 ffffff8009088d74
Oct 13 19:17:28 localhost kernel: [   19.400354@0] be80: 0000000000000000 ffffff8009083b9c 0000000000000800 0000004069942000
Oct 13 19:17:28 localhost kernel: [   19.400357@0] bea0: ffffffffffffffff 0000007fad89253c 0000000000000000 0000000000000015
Oct 13 19:17:28 localhost kernel: [   19.400359@0] bec0: 0000000000000003 0000000080685600 0000007fffc0a740 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400362@0] bee0: 0000000000000000 0000000000000001 ff53424451514e42 7f7f7f7f7f7f7f7f
Oct 13 19:17:28 localhost kernel: [   19.400364@0] bf00: 000000000000001d 0000000000000001 0000008000000000 0000000001004040
Oct 13 19:17:28 localhost kernel: [   19.400367@0] bf20: 0000000000000000 0000007fad962048 0000007fad9601f8 0000007fad960150
Oct 13 19:17:28 localhost kernel: [   19.400369@0] bf40: 0000005583907f98 0000007fad892530 0000000000000003 0000005583907000
Oct 13 19:17:28 localhost kernel: [   19.400372@0] bf60: 0000007fffc0a8e8 0000000000000003 0000007fffc0a740 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400374@0] bf80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400377@0] bfa0: 0000000000000000 0000007fffc0a710 00000055838f5f90 0000007fffc0a710
Oct 13 19:17:28 localhost kernel: [   19.400380@0] bfc0: 0000007fad89253c 0000000000000000 0000000000000003 000000000000001d
Oct 13 19:17:28 localhost kernel: [   19.400382@0] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400383@0] Call trace:
Oct 13 19:17:28 localhost kernel: [   19.400386@0] Exception stack(0xffffff802028baf0 to 0xffffff802028bc20)
Oct 13 19:17:28 localhost kernel: [   19.400388@0] bae0:                                   ffffff802028bd10 0000007fffffffff
Oct 13 19:17:28 localhost kernel: [   19.400390@0] bb00: ffffffc073f01b10 ffffff8002abbba4 ffffff8002aef310 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400393@0] bb20: ffffff802028bd10 ffffff8002abbb30 0000000000000000 0000000000000000
Oct 13 19:17:28 localhost kernel: [   19.400395@0] bb40: 0000000000000000 0000000000000000 ffffff802028bd78 0000000000000001
Oct 13 19:17:28 localhost kernel: [   19.400398@0] bb60: 0000008000000000 0000000001004040 0000000000000000 0000007fad962048
Oct 13 19:17:28 localhost kernel: [   19.400401@0] bb80: 0000007fad9601f8 0000007fad960150 ffffff8009255d60 0000007fad892530
Oct 13 19:17:28 localhost kernel: [   19.400403@0] bba0: 0000000000000003 ffffff802028bd10 ffffff8002aeed00 0000000080685600
Oct 13 19:17:28 localhost kernel: [   19.400406@0] bbc0: ffffff8002aeed98 0000000000000002 0000007fffc0a740 ffffffc024a2d000
Oct 13 19:17:28 localhost kernel: [   19.400408@0] bbe0: ffffff8009800960 ffffff8009ef2000 0000000000000000 ffffff802028bc40
Oct 13 19:17:28 localhost kernel: [   19.400411@0] bc00: ffffff8002abbba4 ffffff802028bc40 0000000000000000 0000000080000145
Oct 13 19:17:28 localhost kernel: [   19.400413@0] [ffffff802028bc40+  48][<          (null)>]           (null)
Oct 13 19:17:28 localhost kernel: [   19.400422@0] [ffffff802028bc70+  48][<ffffff8009800a14>] subdev_do_ioctl+0xb4/0x2b8
Oct 13 19:17:28 localhost kernel: [   19.400428@0] [ffffff802028bca0+ 240][<ffffff80097f5a1c>] video_usercopy+0x1e4/0x5e8
Oct 13 19:17:28 localhost kernel: [   19.400431@0] [ffffff802028bd90+  48][<ffffff800980094c>] subdev_ioctl+0x3c/0x50
Oct 13 19:17:28 localhost kernel: [   19.400435@0] [ffffff802028bdc0+  64][<ffffff80097efc68>] v4l2_ioctl+0xd0/0x118
Oct 13 19:17:28 localhost kernel: [   19.400440@0] [ffffff802028be00+ 128][<ffffff8009255598>] do_vfs_ioctl+0xb0/0x878
Oct 13 19:17:28 localhost kernel: [   19.400444@0] [ffffff802028be80+   0][<ffffff8009255dec>] SyS_ioctl+0x8c/0xa8
Oct 13 19:17:28 localhost kernel: [   19.400448@0] [0000000000000000+   0][<ffffff8009083b9c>] __sys_trace_return+0x0/0x4
Oct 13 19:17:28 localhost kernel: [   19.400454@0] Code: bad PC value

@numbqq 麻烦帮忙看看是什么问题吗?

我们没有调试过这个摄像头,从log来看出现了空指针,你跟一下驱动看看是什么原因导致的。