20240701在飞凌的OK3588-C开发板的Android12系统下使用i2cdetect确认I2C总线

发布于:2024-07-02 ⋅ 阅读:(13) ⋅ 点赞:(0)

console:/ # i2cdetect -y -r 0
console:/ # i2cdetect -l
console:/ # i2cdetect -F 0


20240701在飞凌的OK3588-C开发板的Android12系统下使用i2cdetect确认I2C总线
2024/7/1 11:30


在CAM1、CAM2挂载OV13850。
在CAM3、CAM4和CAM5挂载OV5645了。


console:/ # i2
i2cdetect  i2cdump    i2cget     i2cset

console:/ # i2cdetect --help
Toybox 0.8.4-android multicall binary: https://landley.net/toybox (see toybox --help)

usage: i2cdetect [-ary] BUS [FIRST LAST]
usage: i2cdetect -F BUS
usage: i2cdetect -l

Detect i2c devices.

-a    All addresses (0x00-0x7f rather than 0x03-0x77)
-F    Show functionality
-l    List all buses
-r    Probe with SMBus Read Byte
-y    Answer "yes" to confirmation prompts (for script use)
console:/ # 
console:/ # i2
i2cdetect  i2cdump    i2cget     i2cset

console:/ # i2cdetect -F 0
Functionalities implemented by /dev/i2c-0:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # i2cdetect -F 1
Functionalities implemented by /dev/i2c-1:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # i2cdetect -F 2
Functionalities implemented by /dev/i2c-2:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # i2cdetect -F 3
Functionalities implemented by /dev/i2c-3:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # i2cdetect -F 4
Functionalities implemented by /dev/i2c-4:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 

console:/ # 
console:/ # 
console:/ # i2cdetect -F 5
Functionalities implemented by /dev/i2c-5:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # i2cdetect -F 6
i2cdetect: /dev/i2c-6: No such file or directory
1|console:/ # 
1|console:/ # 
1|console:/ # i2cdetect -F 7
Functionalities implemented by /dev/i2c-7:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Write Block                yes
SMBus Read Block                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Write Block                  yes
I2C Read Block                   yes
console:/ # 
console:/ # 
console:/ # 
console:/ # i2cdetect -F 8
i2cdetect: /dev/i2c-8: No such file or directory
1|console:/ # 
1|console:/ # 
1|console:/ # i2c
i2cdetect  i2cdump    i2cget     i2cset

1|console:/ # 
1|console:/ # i2cdetect -r -y 0
i2cdetect: Unknown option 'r' (see "i2cdetect --help")
1|console:/ # 
1|console:/ # i2cdet
1|console:/ # i2cdetect --help
Toybox 0.8.4-android multicall binary: https://landley.net/toybox (see toybox --help)

usage: i2cdetect [-ary] BUS [FIRST LAST]
usage: i2cdetect -F BUS
usage: i2cdetect -l

Detect i2c devices.

-a    All addresses (0x00-0x7f rather than 0x03-0x77)
-F    Show functionality
-l    List all buses
-r    Probe with SMBus Read Byte
-y    Answer "yes" to confirmation prompts (for script use)
console:/ # 
console:/ # 
console:/ # i2
i2cdetect  i2cdump    i2cget     i2cset

console:/ #
1|console:/ # i2cdetect -y -a 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- UU UU -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- UU UU -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
10: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
10: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 

console:/ # 
console:/ # i2cdetect -y -a 45
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 6
i2cdetect: /dev/i2c-6: No such file or directory
1|console:/ # 
1|console:/ # 
1|console:/ # i2cdetect -y -a 7
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
console:/ # 
console:/ # 
console:/ # i2cdetect -y -a 8
i2cdetect: /dev/i2c-8: No such file or directory
1|console:/ # [  194.648562][  T454] healthd: battery l=50 v=3 t=2.6 h=2 st=3 c=-1600 fc=100 chg=au
[  254.648561][  T454] healthd: battery l=50 v=3 t=2.6 h=2 st=3 c=-1600 fc=100 chg=au

1|console:/ # 
1|console:/ # 


5个摄像头插满,CAM3和CAM4的OV5645组成前后摄像头。
CAM1 CAM2 OV13850
CAM3 CAM4 CAM5 OV5645

cam1
gst-launch-1.0 v4l2src device=/dev/video40 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink

cam2
gst-launch-1.0 v4l2src device=/dev/video49 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink


gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink
gst-launch-1.0 v4l2src device=/dev/video8 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink

cam3
gst-launch-1.0 v4l2src device=/dev/video16 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink

cam4
gst-launch-1.0 v4l2src device=/dev/video24 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink

cam5
gst-launch-1.0 v4l2src device=/dev/video32 ! video/x-raw, format=NV12, width=640, height=480, framerate=30/1 ! waylandsink


参考资料:
0312-3119192  2软件 4瑞芯微平台  2 RK3588


5.最后编译buildroot就行

i2c7下没设备
所以驱动没匹配  您驱动里的的i2c操作关闭仅仅是不写入东西了
现在您的摄像头没有在正常工作

随便接入一个i2c设备 设备树不描述 i2cdetect 都可以读到地址 
说明设备在正常工作  
变成UU状态说明驱动注册

您驱动里的修改和这个设备本身是否正常运行没有关系  肯定应该读到一个i2c设备的


https://www.elecfans.com/d/2195063.html
i2c detect扫描i2c总线上的设备


https://blog.csdn.net/weixin_42581177/article/details/131158404
Linux下的I2C工具:i2c_tools