在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121)
-
我在照着教程向自己的Image中添加驱动过程中遇到了如下问题:
[ 6.615226] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=44 x 10ms
[ 6.635227] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=45 x 10ms
[ 6.655226] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=46 x 10ms
[ 6.675227] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=47 x 10ms
[ 6.695227] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=48 x 10ms
[ 6.715227] i2c-ds90ub954 8-0030: ds90ub954_init: DEVICE STS: 0xd3, id=49 x 10ms
[ 6.715232] i2c-ds90ub954 8-0030: ds90ub954_init: Backchannel setup failed!
[ 6.722211] i2c-ds90ub954 8-0030: ds90ub954_init: init deserializer rx_port 0 failed
[ 6.729963] i2c-ds90ub954 8-0030: ds90ub954_init: deserializer rx_port 0 is deactivated
[ 6.740320] i2c-ds90ub954 8-0030: ds90ub954_probe: init ds90ub954_done
[ 7.771194] tegra-wdt 60005100.watchdog: Tegra WDT enabled on probe. Timeout = 120 seconds.
[ 7.790343] platform snd-soc-dummy: No iommus property found in DT node, got swgids from fixup(101004000)
root@mr123-emmc3:/home/huanglielie# ls /proc/device-tree/cam_i2cmux/i2c@*
/proc/device-tree/cam_i2cmux/i2c@0:
'#address-cells' ds90ub954_a@30 linux,phandle name phandle rbpcv2_csimx307_a@3b rbpcv2_cssc132_a@3b rbpcv2_imx219_a@10 rbpcv2_veye327_a@3b reg '#size-cells' status/proc/device-tree/cam_i2cmux/i2c@1:
'#address-cells' ds90ub954_b@30 linux,phandle name phandle rbpcv2_csimx307_e@3b rbpcv2_cssc132_e@3b rbpcv2_imx219_e@10 rbpcv2_veye327_e@3b reg '#size-cells' status
root@mr123-emmc3:/home/huanglielie# ls /sys/bus/i2c/drivers/
bq27xxx-battery cssc132 dummy imx219 imx318 ina219x ina3221x lp855x max9295 nct1008_nct72 ov23850 pca953x pca9570 rt5659 sgtl5000 tas2552 tegra_edid tps65132 usb3503
cs53l30 csx307 i2c-ds90ub954 imx268 imx390 ina230x lc898212 max77620 max9296 ov10823 ov9281 pca954x rt5640 rtc-rx8025 stepper_pca tc358840 tmpm32xi2c ucsi_ccg veye327
root@mr123-emmc3:/home/huanglielie# dmesg|grep cssc
[ 1.720292] cssc132 7-003b: probing v4l2 sensor
[ 1.720667] cssc132 7-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.720896] cssc132 7-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.720900] cssc132 7-003b: board setup failed
[ 1.720960] cssc132: probe of 7-003b failed with error -121
[ 1.721009] cssc132 8-003b: probing v4l2 sensor
[ 1.721371] cssc132 8-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.721575] cssc132 8-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.721578] cssc132 8-003b: board setup failed
[ 1.721629] cssc132: probe of 8-003b failed with error -121
目前能确定的是我将Image替换回官方提供的预编译版本,摄像头就可以完美识别到。
请问我需要怎么解决这个问题? -
@robot
驱动应该不用动。 关键是dts要符合你的硬件设计,我认为你要尤其关注一下你的板子的i2c总线使用与开发板的i2c总线使用的异同,然后把这个差异提现到dts中去。 -
@veye_xumm
您好,我反复确认过了,开发板与我们的板子原理上是一样的。
现在的问题是我改后的dtb可以完美的搭配预编译的Image使用,那么我是不是可以就此确认我的dtb和我的硬件已经没有问题了?
另一方面,从dmesg来看ds90ub954的驱动正常运行,我也已经从i2c-7读出了0x30 0x19 0x3b三个地址,那么是不是有可能我需要对cssc132的驱动做出一定的修改才能正常使用?如果是我需要改什么? -
@robot said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
现在的问题是我改后的dtb可以完美的搭配预编译的Image使用,那么我是不是可以就此确认我的dtb和我的硬件已经没有问题了?
应该是的。你怀疑你自己编译的Image不行吗?
@robot said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
另一方面,从dmesg来看ds90ub954的驱动正常运行,我也已经从i2c-7读出了0x30 0x19 0x3b三个地址,那么是不是有可能我需要对cssc132的驱动做出一定的修改才能正常使用?如果是我需要改什么?
已经有了0x3b,说明整个fpdlink的初始化通路都成功了,而且跟摄像头的i2c已经通了。
这种情况,按理说应该正常识别到摄像头了啊。你确认实际摄像头型号跟dtb中的型号一致吗? -
@veye_xumm said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
这种情况,按理说应该正常识别到摄像头了啊。你确认实际摄像头型号跟dtb中的型号一致吗?
mr123@mr123-emmc3:~$
mr123@mr123-emmc3:~$ dmesg |grep cssc
[ 7.762902] cssc132 7-003b: probing v4l2 sensor
[ 7.763294] cssc132 7-003b: tegracam sensor driver:cssc132_v2.0.6
[ 7.764842] cssc132 7-003b: read sensor id 0132
[ 7.769477] cssc132 7-003b: camera id is cs-mipi-sc132
[ 7.774748] cssc132 7-003b: Detected CS_MIPI_SC132 camera
[ 7.774797] cssc132 8-003b: probing v4l2 sensor
[ 7.775142] cssc132 8-003b: tegracam sensor driver:cssc132_v2.0.6
[ 7.775348] cssc132 8-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 7.783103] cssc132 8-003b: board setup failed
[ 7.787616] cssc132: probe of 8-003b failed with error -121
[ 7.940285] vi 54080000.vi: subdev cssc132 7-003b bound
mr123@mr123-emmc3:~$
是的,这个是我使用预编译的Image的dmesg,dtb都是同一个 -
@robot
这个dmesg看,已经成功了,一切正常。 -
@veye_xumm
是的,但是这个Image是从github上下载的,我自己的一直都不行:
mr123@mr123-emmc3:~$ dmesg |grep cssc
[ 1.711145] cssc132 7-003b: probing v4l2 sensor
[ 1.711521] cssc132 7-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.712203] cssc132 7-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.712206] cssc132 7-003b: board setup failed
[ 1.712267] cssc132: probe of 7-003b failed with error -121
[ 1.712310] cssc132 8-003b: probing v4l2 sensor
[ 1.712663] cssc132 8-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.712861] cssc132 8-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.712864] cssc132 8-003b: board setup failed
[ 1.712914] cssc132: probe of 8-003b failed with error -121mr123@mr123-emmc3:~$ i2cdetect -y -r 7
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: UU -- -- -- -- -- -- -- -- -- -- 3b -- -- -- --
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --所以就现在来说我比较怀疑cssc132驱动的问题。
或者说还有其他原因会导致这个现象吗?
在此过程中我只改变的Image。 -
@robot
看一下你的dmes全部内容,954这颗芯片的初始化,难不成跑到了132模组初始化后面去了?
或者你吧整个dmesg的输出保存成文件,post上来我看看。 -
@veye_xumm said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
954这颗芯片的初始化,难不成跑到了132模组初始化后面去了?
或者你吧整个dmesg的输出保存成文件,post上来我看看。您好,
是这样的,确实是先初始化的cssc132然后再初始化的ds90ub954:
[ 1.910350] i2c /dev entries driver
[ 1.912132] i2c i2c-6: Added multiplexed i2c bus 7
[ 1.912675] i2c i2c-6: Added multiplexed i2c bus 8
[ 1.912681] i2c-mux-gpio cam_i2cmux: 2 port mux on Tegra I2C adapter adapter
[ 1.913916] cssc132 7-003b: probing v4l2 sensor
[ 1.914301] cssc132 7-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.914460] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x3b
[ 1.914533] cssc132 7-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.922319] cssc132 7-003b: board setup failed
[ 1.926835] cssc132: probe of 7-003b failed with error -121
[ 1.926881] cssc132 8-003b: probing v4l2 sensor
[ 1.927229] cssc132 8-003b: tegracam sensor driver:cssc132_v2.0.6
[ 1.927366] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x3b
[ 1.927439] cssc132 8-003b: cs_sc132_board_setup: error during i2c read probe (-121)
[ 1.935199] cssc132 8-003b: board setup failed
[ 1.939703] cssc132: probe of 8-003b failed with error -121
[ 1.939793] i2c-ds90ub954 7-0030: ds90ub954_probe: start
[ 1.939798] i2c-ds90ub954 7-0030: ds90ub954_parse_dt: deserializer:
[ 1.939804] i2c-ds90ub954 7-0030: pass-gpio not found, ignoring
[ 1.939808] i2c-ds90ub954 7-0030: lock-gpio not found, ignoring
[ 1.939813] i2c-ds90ub954 7-0030: pdb-gpio not found, ignoring
[ 1.939818] i2c-ds90ub954 7-0030: ds90ub954_parse_dt: - csi-lane-count 2
[ 1.939824] i2c-ds90ub954 7-0030: ds90ub954_parse_dt: - csi-lane-speed 800
[ 1.939828] i2c-ds90ub954 7-0030: ds90ub954_parse_dt: - test-pattern disabled
[ 1.939833] i2c-ds90ub954 7-0030: ds90ub954_parse_dt: - discontinuous clock used
[ 1.939860] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: parsing serializers device tree:
[ 1.939867] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - serializer rx-channel: 0
[ 1.939872] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: -test-pattern disabled
[ 1.939877] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - csi-lane-count 2
[ 1.939882] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio0-output-enable property not found
[ 1.939886] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio0-output-enable to default val: 0
[ 1.939891] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio1-output-enable property not found
[ 1.939895] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio1-output-enable to default val: 0
[ 1.939900] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio2-output-enable property not found
[ 1.939904] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio2-output-enable to default val: 0
[ 1.939908] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio3-output-enable property not found
[ 1.939912] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio3-output-enable to default val: 0
[ 1.939916] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio0-control property not found
[ 1.939920] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio0-control to default val: 0b1000
[ 1.939924] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio1-control property not found
[ 1.939928] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio1-control to default val: 0b1000
[ 1.939932] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio2-control property not found
[ 1.939936] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio2-control to default val: 0b1000
[ 1.939940] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - gpio3-control property not found
[ 1.939943] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: gpio3-control to default val: 0b1000
[ 1.939947] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - hs-clk-div property not found
[ 1.939951] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - hs-clk-div set to default val: 0x2 (div by 4)
[ 1.939955] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - div-m-val property not found
[ 1.939959] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - div-m-val set to default val: 1
[ 1.939963] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - div-n-val property not found
[ 1.939967] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - div-n-val set to default val: 0x28
[ 1.939972] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - i2c-address: 0x19
[ 1.940064] i2c-ds90ub954 7-0030: ds90ub953_i2c_client init client done
[ 1.940096] i2c-ds90ub954 7-0030: ds90ub953_regmap_init init regmap done
[ 1.940216] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - num of slave alias pairs: 1
[ 1.940221] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - slave addr: 0x3B, alias addr: 0x3B
[ 1.940225] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - discontinuous clock used
[ 1.940230] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - i2c-pass-through-all disabled
[ 1.940234] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - virtual-channel-map property not found
[ 1.940238] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: - virtual-channel-map set to default val: 0xE4
[ 1.940242] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: serializer 0 successfully parsed
[ 1.940247] i2c-ds90ub954 7-0030: ds90ub953_parse_dt: done
[ 1.954771] i2c-ds90ub954 7-0030: ds90ub954_init starting
[ 1.956670] i2c-ds90ub954 7-0030: ds90ub954_init: device ID: 0x60, code:_UB954, revision: 0x20 -
@robot said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
您好,
是这样的,确实是先初始化的cssc132然后再初始化的ds90ub954:你看一下你合并我们的代码部分,注意makefile和kconfig中954和132两个驱动的先后顺序。 这个影响调用顺序。
-
@veye_xumm said in 在向自己的Image中添加驱动的过程中遇到了error during i2c read probe (-121):
注意makefile和kconfig中954和132两个驱动的先后顺序。 这个影响调用顺序。
好的,谢谢您了。
另外我今天新到四个cssc132相机,如果想要全部识别到的话,我是否需要对其进行硬件上的修改? -
@robot
不客气。 我不太清楚你买的订单的硬件信息。 可以看我们这页文章:
http://wiki.veye.cc/index.php/CS-FPD-XAVIER-nCAM_Series -
@veye_xumm
好的,谢谢您,Image的问题解决了。
关于四路相机的问题,我希望在新帖中向您提问。 -
@robot ok
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login