Difference between revisions of "VEYE CS Camera on Forlinx i.MX8 board"
Line 44: | Line 44: | ||
==== Overview ==== | ==== Overview ==== | ||
− | This section describes how to update the | + | This section describes how to update the OKMX8MPQ-C system to support our camera module. To support our camera module, we need to update two parts of the system, '''Image''' and '''DTB'''. |
In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source when it is not necessary. | In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source when it is not necessary. | ||
Line 70: | Line 70: | ||
* dts source code | * dts source code | ||
+ | ==== Burn the Forlinx standard system ==== | ||
+ | Refer to : ''OKMX8MPQ-C_Linux5.4.70+Qt5.15.0Manual_V1.2_20230406.pdf'' | ||
+ | |||
+ | Burn the standard system provided by Forlinx to the board. | ||
+ | |||
+ | ==== 3.4 Using prebuilt Image and dtb file ==== | ||
+ | The Image and dtb files of the OKMX8MPQ-C board are saved in the FAT partition of emmc. After the system is started, it is automatically mounted to the ''/run/media/mmcblk2p1/'' directory. | ||
+ | |||
+ | On HOST PC: | ||
+ | |||
+ | <code>git clone <nowiki>https://github.com/veyeimaging/forlinx_nxp_i.mx.git</nowiki></code> | ||
+ | |||
+ | Extract the kernel Image, and copy the Image and dtb files to the OKMX8MPQ-C board. | ||
+ | |||
+ | <code>cp <your path>/Image /run/media/mmcblk2p1/</code> | ||
+ | |||
+ | <code>cp <your path>/OK8MP-C.dtb /run/media/mmcblk2p1/</code> | ||
+ | |||
+ | Reboot OKMX8MPQ-C board. | ||
+ | |||
+ | === Applications and Test === | ||
+ | |||
+ | ==== Check system status ==== | ||
+ | Run the following command to confirm whether the camera is probed. | ||
+ | |||
+ | * VEYE-MIPI-IMX327S,VEYE-MIPI-IMX462,VEYE-MIPI-IMX385 | ||
+ | |||
+ | <code>dmesg | grep veye</code> | ||
+ | |||
+ | The output message appears as shown below: | ||
+ | |||
+ | <code>[ 2.806555] veyecam2m 1-003b: camera id is veyecam2m</code> | ||
+ | |||
+ | <code>[ 2.816868] veyecam2m 1-003b: sensor is IMX327</code> | ||
+ | |||
+ | <code>[ 2.821323] veyecam2m 1-003b: board type is ONE board</code> | ||
+ | |||
+ | <code>[ 2.826981] veyecam2m 1-003b: veyecam2m camera probed</code> | ||
+ | |||
+ | <code>[ 6.055710] mx8-img-md: Registered sensor subdevice: veyecam2m 1-003b (1)</code> | ||
+ | |||
+ | <code>[ 6.150181] mx8-img-md: created link [veyecam2m 1-003b] => [mxc-mipi-csi2.1]</code> | ||
+ | |||
+ | As you can see, the VEYE-MIPI-IMX327S module has been successfully probed and mounted on i2c-1. | ||
<br /> | <br /> |
Revision as of 09:56, 20 July 2023
1 Overview
OKMX8MPQ-C board from Forlink embedded uses i.MX8M plus processor.
On the basis of Forlink 's official SDK(OKMX8MP-C_Linux5.4.70+Qt5.15.0 version), our camera module driver is added, and some application layer routines are provided.
In general, you only need to use the Image and dtb that we have compiled. Of course, you can also modify or recompile the driver according to our open source code.
1.1 Camera module list
Series | Model | Status | Adaptor board |
---|---|---|---|
VEYE series | VEYE-MIPI-IMX327S | Done | ADP-Forlinx |
VEYE series | VEYE-MIPI-IMX385 | Done | ADP-Forlinx |
VEYE series | VEYE-MIPI-IMX462 | Done | ADP-Forlinx |
VEYE and CS series camera modules are camera module with ISP functions build in. It output UYVY/YUYV data using MIPI-CSI2. We provide V4L2 interface for video streaming apps , and Video Control Toolkits (which is Shell Script) to control the camera module directly, which is called DRA(Directly Register Access).
Specifically, on this i.MX platform, the default driver configures the camera to YUYV format.
2 Hardware Setup
We use ADP-Forlinx to connnect the camera with OKMX8MPQ-C board.
The camera and ADP-Forlinx are connected using 1.0 mm pitch*15P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside.
3 Upgrade OKMX8MPQ-C system
3.1 Overview
This section describes how to update the OKMX8MPQ-C system to support our camera module. To support our camera module, we need to update two parts of the system, Image and DTB.
In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source when it is not necessary.
The released files were compiled based on the image of OKMX8MP-C_Linux5.4.70+Qt5.15.0 version.
3.2 BSP package introduction
3.2.1 i.MX platform bsp
https://github.com/veyeimaging/nxp_i.mx_veye_bsp
includes:
- driver source code
- i2c toolkits
- application demo
3.2.2 Folinx i.MX platform bsp
https://github.com/veyeimaging/forlinx_nxp_i.mx
includes:
- prebuild linux kernel:Image
- prebuild dtb for different boards
- dts source code
3.3 Burn the Forlinx standard system
Refer to : OKMX8MPQ-C_Linux5.4.70+Qt5.15.0Manual_V1.2_20230406.pdf
Burn the standard system provided by Forlinx to the board.
3.4 3.4 Using prebuilt Image and dtb file
The Image and dtb files of the OKMX8MPQ-C board are saved in the FAT partition of emmc. After the system is started, it is automatically mounted to the /run/media/mmcblk2p1/ directory.
On HOST PC:
git clone https://github.com/veyeimaging/forlinx_nxp_i.mx.git
Extract the kernel Image, and copy the Image and dtb files to the OKMX8MPQ-C board.
cp <your path>/Image /run/media/mmcblk2p1/
cp <your path>/OK8MP-C.dtb /run/media/mmcblk2p1/
Reboot OKMX8MPQ-C board.
4 Applications and Test
4.1 Check system status
Run the following command to confirm whether the camera is probed.
- VEYE-MIPI-IMX327S,VEYE-MIPI-IMX462,VEYE-MIPI-IMX385
dmesg | grep veye
The output message appears as shown below:
[ 2.806555] veyecam2m 1-003b: camera id is veyecam2m
[ 2.816868] veyecam2m 1-003b: sensor is IMX327
[ 2.821323] veyecam2m 1-003b: board type is ONE board
[ 2.826981] veyecam2m 1-003b: veyecam2m camera probed
[ 6.055710] mx8-img-md: Registered sensor subdevice: veyecam2m 1-003b (1)
[ 6.150181] mx8-img-md: created link [veyecam2m 1-003b] => [mxc-mipi-csi2.1]
As you can see, the VEYE-MIPI-IMX327S module has been successfully probed and mounted on i2c-1.