Difference between revisions of "I2c bus number and video node"

From wiki_veye
Jump to navigation Jump to search
Line 112: Line 112:
 
i2c bus number is 1.
 
i2c bus number is 1.
 
== Description of video nodes ==
 
== Description of video nodes ==
 +
In general, we have implemented v4l2 standard drivers for mipi modules on different platforms. The Linux kernel will find the corresponding driver and probe the camera according to the dts when booting. After success, the /dev/videoX device node is generated, where X is a number based on the order of the probe to.
 +
 +
This tends to cause a common misunderstanding, which is explained here.
 +
 +
For motherboards that support multiple mipi cameras, the i2c bus number of each camera is determined by the camera installation location, but the generated /dev/videoX node name cannot be determined in advance.
 +
 +
For example, if we install two cameras on the agx board, mounted to cam2 and cam4 positions, then:
 +
{| class="wikitable"
 +
|+xavier agx
 +
!camera number
 +
!location
 +
!i2c bus
 +
!/dev/video node
 +
|-
 +
|1
 +
|cam2
 +
|32
 +
|/dev/video0
 +
|-
 +
|2
 +
|cam4
 +
|34
 +
|/dev/video0
 +
|}
 +
<br />

Revision as of 13:34, 27 February 2022

查看中文

1 I2c bus number on different boards

For camera modules with MIPI CSI-2 interface, the i2c bus is commonly provided as the communication channel for parameter configuration. Users use the i2c protocol to access the camera registers. A series of shell scripts are provided to facilitate this operation, such as VEYE-MIPI-X I2C.sh,CS-MIPI-X I2C.sh,VEYE-MIPI-IMX335 i2c script.

Generally, there is a matching i2c bus for each MIPI CSI-2 interface on each motherboard. For all our scripts, we can use the -b [bus numer] option to indicate which i2c bus is targeted for this operation. Below, we have summarized the i2c bus serial numbers for commonly used motherboards.

1.1 Raspberry pi

1.1.1 General

For a Raspberry Pi with only one mipi csi-2 interface, the i2c bus is 10. If your piOS is very old, then maybe it is 0.

Special, for the Computer module series. Make the following description.

1.1.2 CM3

CM3 use I2C-1 to control 2 cameras,It is time-sharing multiplexing.

./camera_i2c_config [cameranum]

cameranum description
0 CAM0
1 CAM1

1.1.3 CM4

The CM4 module uses two I2C to communicate with two cameras respectively.

./camera_i2c_config

i2c bus num description
0 CAM0
10 CAM1

1.2 Nvidia Jetson

The following description is only for official Nvidia development boards, third party board need to be confirmed with the manufacturer.

1.2.1 AGX-Xavier, TX2 Devkit

ADP-N1-V2.0 has 6 MIPI CSI-2 interfaces, corresponding to the i2c bus numbers 30-35.

cam index i2c number
0 30
1 31
2 32
3 33
4 34
5 35

1.2.2 Xavier NX , TX2 NX

cam index i2c number
0 10
1 9

1.2.3 Nano A02, Nano 2GB

cam index i2c number
0 7
1 8

1.2.4 Nano A02, Nano 2GB

i2c bus number is 6.

1.3 NXP i.MX platform

1.3.1 AVNET Maaxboard(mini)

i2c bus number is 0.

1.3.2 MYIR i.MX8 board

cam index i2c number
0 0
1 1

1.3.3 google Coral board

i2c bus number is 1.

2 Description of video nodes

In general, we have implemented v4l2 standard drivers for mipi modules on different platforms. The Linux kernel will find the corresponding driver and probe the camera according to the dts when booting. After success, the /dev/videoX device node is generated, where X is a number based on the order of the probe to.

This tends to cause a common misunderstanding, which is explained here.

For motherboards that support multiple mipi cameras, the i2c bus number of each camera is determined by the camera installation location, but the generated /dev/videoX node name cannot be determined in advance.

For example, if we install two cameras on the agx board, mounted to cam2 and cam4 positions, then:

xavier agx
camera number location i2c bus /dev/video node
1 cam2 32 /dev/video0
2 cam4 34 /dev/video0