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来看出现了空指针,你跟一下驱动看看是什么原因导致的。

您好,我现在遇到一个问题,适配修改IMX307的驱动时,i2c一直通信失败,根据307的资料显示其i2c的slave addr是0x34,参考vim已经适配了的OS08A10的配置驱动修改后,307的启动一直是I2C的通信失败

307.dts如下:
/dts-v1/;
/plugin/;

/ {
fragment@0 {
target = <&sensor>;

	__overlay__ {
		status = "okay";
	};
};

fragment@1 {
	target = <&iq>;

	__overlay__ {
		status = "okay";
	};
};

fragment@2 {
	target = <&isp>;

	__overlay__ {
		status = "okay";
	};
};

fragment@3 {
	target = <&adapter>;

	__overlay__ {
		status = "okay";
	};
};

fragment@4 {
	target = <&i2c_AO>;

	__overlay__ {
		status = "okay";

		#address-cells = <1>;
		#size-cells = <0>;

		sensor-i2c@34 {
			compatible = "arm, i2c-sensor";
			reg = <0x34>;
			reg-names = "i2c-sensor";
			slave-addr = <0x34>;
			reg-type = <2>;
			reg-data-type = <1>;
			link-device = <&phycsi>;
			status = "okay";
		};
	};
};

};

板子上电启动后的错误日志:

Oct 14 17:36:13 localhost kernel: [ 19.361419@2] success to probe vpu device with video memory from cma
Oct 14 17:36:13 localhost kernel: [ 19.373951@2] npu_version: 2
Oct 14 17:36:13 localhost kernel: [ 19.374118@2] Galcore version 6.4.4.3.310723AAA
Oct 14 17:36:13 localhost kernel: [ 19.390086@2] iq name from dts config is ----> imx307
Oct 14 17:36:13 localhost kernel: [ 19.390116@2] get_cali_name_id@soc_iq.c:224 SUBDEV_IQ(ERR) :get_calibrations_imx307
Oct 14 17:36:13 localhost kernel: [ 19.390119@2]
Oct 14 17:36:13 localhost kernel: [ 19.390126@2] 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 14 17:36:13 localhost kernel: [ 19.390133@2] soc_iq_probe@soc_iq.c:276 SUBDEV_IQ(ERR) :register v4l2 IQ device. result 0, sd 0x2a58400 sd->dev 0x27665810
Oct 14 17:36:13 localhost kernel: [ 19.392770@4] acamera_soc_lens_init@soc_lens.c:221 GENERIC(INFO) :Lens subdevice init
Oct 14 17:36:13 localhost kernel: [ 19.393120@4] acamera_camera_async_bound@main_kernel_juno_v4l2.c:133 GENERIC(ERR) :bound called with sd 0x2aaa480, asd 0x22a4a90, sd->dev 0x248bc010, name SocLens
Oct 14 17:36:13 localhost kernel: [ 19.393133@4] soc_lens_probe@soc_lens.c:193 GENERIC(INFO) :register v4l2 lens device. result 0, sd 0x2aaa480 sd->dev 0x248bc010
Oct 14 17:36:13 localhost kernel: [ 19.399325@4] acamera_camera_sensor_init@soc_sensor.c:566 GENERIC(ERR) :Sensor subdevice init
Oct 14 17:36:13 localhost kernel: [ 19.399589@4] config sensor imx307 driver.
Oct 14 17:36:13 localhost kernel: [ 19.399635@4] ir_cut_get_named_gpio@soc_sensor.c:479 GENERIC(ERR) :ir cut gpio count = 1
Oct 14 17:36:13 localhost kernel: [ 19.399638@4]
Oct 14 17:36:13 localhost kernel: [ 19.399648@4] ir_cut_get_named_gpio@soc_sensor.c:484 GENERIC(ERR) :ir cut gpio name [0] = 404
Oct 14 17:36:13 localhost kernel: [ 19.399651@4]
Oct 14 17:36:13 localhost kernel: [ 19.399653@4] sensor bsp init
Oct 14 17:36:13 localhost kernel: [ 19.399659@4] 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 14 17:36:13 localhost kernel: [ 19.399667@4] acamera_camera_async_complete@main_kernel_juno_v4l2.c:187 GENERIC(ERR) :complete called
Oct 14 17:36:13 localhost kernel: [ 19.399672@4] acamera_camera_async_complete@main_kernel_juno_v4l2.c:189 GENERIC(ERR) :starting V4L2 firmware
Oct 14 17:36:13 localhost kernel: [ 19.400010@4] 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 14 17:36:13 localhost kernel: [ 19.400015@4]
Oct 14 17:36:13 localhost kernel: [ 19.400019@4] isp_fw_do_set_brightness@fw-interface.c:916 GENERIC(ERR) :ISP FW not inited yet
Oct 14 17:36:13 localhost kernel: [ 19.400545@4] acamera_init@acamera.c:299 GENERIC(ERR) :Success get product id: 0x00000a62
Oct 14 17:36:13 localhost kernel: [ 19.400549@4]
Oct 14 17:36:13 localhost kernel: [ 19.401869@4] 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 14 17:36:13 localhost kernel: [ 19.401876@4] acamera_camera_v4l2_get_subdev_by_name@main_kernel_juno_v4l2.c:111 GENERIC(ERR) :Return subdev pointer 0x2aeed98
Oct 14 17:36:13 localhost kernel: [ 19.401884@4] pwr_enable: get_named_gpio power-enable fail
Oct 14 17:36:13 localhost kernel: [ 19.403503@4] set power fail
Oct 14 17:36:13 localhost kernel: [ 19.412364@1] soc_lens_ioctl@soc_lens.c:100 GENERIC(ERR) :
Oct 14 17:36:13 localhost kernel: [ 19.412370@1] Failed to process lens_ioctl. Lens is not initialized yet. lens_init must be called before
Oct 14 17:36:13 localhost kernel: [ 19.414768@1] camera_ioctl@soc_sensor.c:252 GENERIC(ERR) :Failed to process camera_ioctl. Sensor is not initialized yet. camera_init must be called before
Oct 14 17:36:13 localhost kernel: [ 19.417381@4] isp init clock is 24 MHZ
Oct 14 17:36:13 localhost kernel: [ 19.417465@4] arm_sensor_i2c_probe: start to probe
Oct 14 17:36:13 localhost kernel: [ 19.417488@4] arm_sensor_i2c_probe:arm isp slave addr 0x34, rtn 0
Oct 14 17:36:13 localhost kernel: [ 19.417490@4] arm_sensor_i2c_probe:arm reg_addr_type 2, rtn 0
Oct 14 17:36:13 localhost kernel: [ 19.417492@4] arm_sensor_i2c_probe:arm reg_data_type 1, rtn 0
Oct 14 17:36:13 localhost kernel: [ 19.417537@4] arm_sensor_i2c_probe: success get link device:phy-csi
Oct 14 17:36:13 localhost kernel: [ 19.417547@4] AM_MIPI: am_mipi_parse_dt: rs idx 0 info: name: csi2_phy0
Oct 14 17:36:13 localhost kernel: [ 19.417575@4] AM_MIPI: am_mipi_parse_dt: rs idx 1 info: name: csi2_phy1
Oct 14 17:36:13 localhost kernel: [ 19.417580@4] AM_MIPI: am_mipi_parse_dt: rs idx 2 info: name: aphy_reg
Oct 14 17:36:13 localhost kernel: [ 19.417596@4] AM_MIPI: am_mipi_parse_dt: rs idx 3 info: name: csi0_host
Oct 14 17:36:13 localhost kernel: [ 19.417601@4] AM_MIPI: am_mipi_parse_dt: rs idx 4 info: name: csi1_host
Oct 14 17:36:13 localhost kernel: [ 19.417614@4] AM_MIPI: am_mipi_parse_dt: rs idx 0 info: irq 61
Oct 14 17:36:13 localhost kernel: [ 19.417620@4] AM_MIPI: am_mipi_parse_dt: rs idx 1 info: irq 62
Oct 14 17:36:13 localhost kernel: [ 19.417636@4] AM_MIPI: am_mipi_parse_dt:Success to get link device: isp-adapter
Oct 14 17:36:13 localhost kernel: [ 19.417641@4] AM_ADAP: am_adap_parse_dt: rs idx info: name: adapter
Oct 14 17:36:13 localhost kernel: [ 19.417649@4] AM_ADAP: am_adap_parse_dt:rs info: irq: 60
Oct 14 17:36:13 localhost kernel: [ 19.417697@4] platform ff650000.isp-adapter: assigned reserved memory node linux,adapt_cma
Oct 14 17:36:13 localhost kernel: [ 19.417700@4] AM_ADAP: adapter alloc 48M memory
Oct 14 17:36:13 localhost kernel: [ 19.417762@4] system_i2c_init:success to add i2c driver
Oct 14 17:36:13 localhost kernel: [ 19.422263@4] system_i2c_read:failed to read reg data: rc -6, saddr 0x1a
Oct 14 17:36:13 localhost kernel: [ 19.428497@4] i2c_io_read_sample@acamera_sbus_i2c.c:98 GENERIC(ERR) :I2C not ok
Oct 14 17:36:13 localhost kernel: [ 19.428909@4] system_i2c_read:failed to read reg data: rc -6, saddr 0x1a
Oct 14 17:36:13 localhost kernel: [ 19.435163@4] i2c_io_read_sample@acamera_sbus_i2c.c:98 GENERIC(ERR) :I2C not ok
Oct 14 17:36:13 localhost kernel: [ 19.435169@4] sensor_get_id@IMX307_drv.c:378 GENERIC(ERR) :sensor_get_id: Failed to read sensor id:0x0
Oct 14 17:36:13 localhost kernel: [ 19.435173@4]
Oct 14 17:36:13 localhost kernel: [ 19.437389@4] sensor_init_imx307@IMX307_drv.c:710 GENERIC(ERR) :sensor_init_imx307: Success subdev init
Oct 14 17:36:13 localhost kernel: [ 19.437393@4]
Oct 14 17:36:13 localhost kernel: [ 19.437395@4] camera_init@soc_sensor.c:216 GENERIC(INFO) :Sensor has been initialized for ctx:0
Oct 14 17:36:13 localhost kernel: [ 19.437398@4]
Oct 14 17:36:13 localhost kernel: [ 19.437404@4] camera_ioctl@soc_sensor.c:432 GENERIC(ERR) :get isp_seq_num = 0
Oct 14 17:36:13 localhost kernel: [ 19.437407@4]
Oct 14 17:36:13 localhost kernel: [ 19.437413@4] sensor_print_params@V4L2_drv.c:63 GENERIC(ERR) :SOC SENSOR PARAMETERS
Oct 14 17:36:13 localhost kernel: [ 19.437418@4] sensor_print_params@V4L2_drv.c:64 GENERIC(ERR) :pixels_per_line: 0
Oct 14 17:36:13 localhost kernel: [ 19.437422@4] sensor_print_params@V4L2_drv.c:65 GENERIC(ERR) :again_log2_max: 3014656
Oct 14 17:36:13 localhost kernel: [ 19.437427@4] sensor_print_params@V4L2_drv.c:66 GENERIC(ERR) :dgain_log2_max: 0
Oct 14 17:36:13 localhost kernel: [ 19.437431@4] sensor_print_params@V4L2_drv.c:67 GENERIC(ERR) :again_accuracy: 0
Oct 14 17:36:13 localhost kernel: [ 19.437436@4] sensor_print_params@V4L2_drv.c:68 GENERIC(ERR) :integration_time_min: 0
Oct 14 17:36:13 localhost kernel: [ 19.437440@4] sensor_print_params@V4L2_drv.c:69 GENERIC(ERR) :integration_time_max: 0
Oct 14 17:36:13 localhost kernel: [ 19.437445@4] sensor_print_params@V4L2_drv.c:70 GENERIC(ERR) :integration_time_long_max: 0
Oct 14 17:36:13 localhost kernel: [ 19.437450@4] sensor_print_params@V4L2_drv.c:71 GENERIC(ERR) :integration_time_limit: 0
Oct 14 17:36:13 localhost kernel: [ 19.437454@4] sensor_print_params@V4L2_drv.c:72 GENERIC(ERR) :day_light_integration_time_max: 0
Oct 14 17:36:13 localhost kernel: [ 19.437459@4] sensor_print_params@V4L2_drv.c:73 GENERIC(ERR) :integration_time_apply_delay: 2
Oct 14 17:36:13 localhost kernel: [ 19.437463@4] sensor_print_params@V4L2_drv.c:74 GENERIC(ERR) :isp_exposure_channel_delay: 0
Oct 14 17:36:13 localhost kernel: [ 19.437468@4] sensor_print_params@V4L2_drv.c:75 GENERIC(ERR) :xoffset: 0
Oct 14 17:36:13 localhost kernel: [ 19.437472@4] sensor_print_params@V4L2_drv.c:76 GENERIC(ERR) :yoffset: 0
Oct 14 17:36:13 localhost kernel: [ 19.437476@4] sensor_print_params@V4L2_drv.c:77 GENERIC(ERR) :lines_per_second: 0
Oct 14 17:36:13 localhost kernel: [ 19.437481@4] sensor_print_params@V4L2_drv.c:78 GENERIC(ERR) :sensor_exp_number: 1
Oct 14 17:36:13 localhost kernel: [ 19.437486@4] sensor_print_params@V4L2_drv.c:79 GENERIC(ERR) :modes_num: 4
Oct 14 17:36:13 localhost kernel: [ 19.437490@4] sensor_print_params@V4L2_drv.c:80 GENERIC(ERR) :mode: 0
Oct 14 17:36:13 localhost kernel: [ 19.437495@4] sensor_print_params@V4L2_drv.c:83 GENERIC(ERR) :preset 0
Oct 14 17:36:13 localhost kernel: [ 19.437499@4] sensor_print_params@V4L2_drv.c:84 GENERIC(ERR) : mode: 0
Oct 14 17:36:13 localhost kernel: [ 19.437503@4] sensor_print_params@V4L2_drv.c:85 GENERIC(ERR) : width: 1920
Oct 14 17:36:13 localhost kernel: [ 19.437508@4] sensor_print_params@V4L2_drv.c:86 GENERIC(ERR) : height: 1080
Oct 14 17:36:13 localhost kernel: [ 19.437512@4] sensor_print_params@V4L2_drv.c:87 GENERIC(ERR) : fps: 7680
Oct 14 17:36:13 localhost kernel: [ 19.437517@4] sensor_print_params@V4L2_drv.c:88 GENERIC(ERR) : exp: 1
Oct 14 17:36:13 localhost kernel: [ 19.437521@4] sensor_print_params@V4L2_drv.c:83 GENERIC(ERR) :preset 1
Oct 14 17:36:13 localhost kernel: [ 19.437526@4] sensor_print_params@V4L2_drv.c:84 GENERIC(ERR) : mode: 0
Oct 14 17:36:13 localhost kernel: [ 19.437530@4] sensor_print_params@V4L2_drv.c:85 GENERIC(ERR) : width: 1280
Oct 14 17:36:13 localhost kernel: [ 19.437534@4] sensor_print_params@V4L2_drv.c:86 GENERIC(ERR) : height: 720
Oct 14 17:36:13 localhost kernel: [ 19.437539@4] sensor_print_params@V4L2_drv.c:87 GENERIC(ERR) : fps: 7680
Oct 14 17:36:13 localhost kernel: [ 19.437543@4] sensor_print_params@V4L2_drv.c:88 GENERIC(ERR) : exp: 1
Oct 14 17:36:13 localhost kernel: [ 19.437548@4] sensor_print_params@V4L2_drv.c:83 GENERIC(ERR) :preset 2
Oct 14 17:36:13 localhost kernel: [ 19.437552@4] sensor_print_params@V4L2_drv.c:84 GENERIC(ERR) : mode: 2
Oct 14 17:36:13 localhost kernel: [ 19.437557@4] sensor_print_params@V4L2_drv.c:85 GENERIC(ERR) : width: 1920
Oct 14 17:36:13 localhost kernel: [ 19.437561@4] sensor_print_params@V4L2_drv.c:86 GENERIC(ERR) : height: 1080
Oct 14 17:36:13 localhost kernel: [ 19.437565@4] sensor_print_params@V4L2_drv.c:87 GENERIC(ERR) : fps: 7680
Oct 14 17:36:13 localhost kernel: [ 19.437570@4] sensor_print_params@V4L2_drv.c:88 GENERIC(ERR) : exp: 2
Oct 14 17:36:13 localhost kernel: [ 19.437574@4] sensor_print_params@V4L2_drv.c:83 GENERIC(ERR) :preset 3
Oct 14 17:36:13 localhost kernel: [ 19.437579@4] sensor_print_params@V4L2_drv.c:84 GENERIC(ERR) : mode: 2
Oct 14 17:36:13 localhost kernel: [ 19.437583@4] sensor_print_params@V4L2_drv.c:85 GENERIC(ERR) : width: 1280
Oct 14 17:36:13 localhost kernel: [ 19.437587@4] sensor_print_params@V4L2_drv.c:86 GENERIC(ERR) : height: 720
Oct 14 17:36:13 localhost kernel: [ 19.437592@4] sensor_print_params@V4L2_drv.c:87 GENERIC(ERR) : fps: 7680
Oct 14 17:36:13 localhost kernel: [ 19.437596@4] sensor_print_params@V4L2_drv.c:88 GENERIC(ERR) : exp: 2
Oct 14 17:36:13 localhost kernel: [ 19.458247@4] system_i2c_read:failed to read reg data: rc -6, saddr 0x34
Oct 14 17:36:13 localhost kernel: [ 19.459298@4] i2c_io_read_sample@acamera_sbus_i2c.c:98 GENERIC(ERR) :I2C not ok
Oct 14 17:36:13 localhost kernel: [ 19.459718@4] system_i2c_read:failed to read reg data: rc -6, saddr 0x34
Oct 14 17:36:13 localhost kernel: [ 19.465989@4] i2c_io_read_sample@acamera_sbus_i2c.c:98 GENERIC(ERR) :I2C not ok
Oct 14 17:36:13 localhost kernel: [ 19.465995@4] sensor_get_id@IMX307_drv.c:378 GENERIC(ERR) :sensor_get_id: Failed to read sensor id:0x0
Oct 14 17:36:13 localhost kernel: [ 19.465998@4]

@numbqq 麻烦帮忙分析下大概是什么原因导致失败的

你试试 把i2c 地址改成 0x1a 看看

参考下面

sensor-i2c@1a {
compatible = “arm, i2c-sensor”;
reg = <0x1a>; // 这个值是 7bit 从地址 (0x34 除以2)
reg-names = “i2c-sensor”;
slave-addr = <0x34>;
reg-type = <2>;
reg-data-type = <1>;
link-device = <&phycsi>;
status = “okay”;
}

@hugoleong 请问下,你这个问题解决了吗?
我在调试imx290 也遇到了同样的问题。