Support OV5640 in i.MX95 Android

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Support OV5640 in i.MX95 Android

shaojun_wang
NXP Employee
NXP Employee
0 0 321

OV5640 can output YUV format and RAW RGB format. i.MX95 supports both formats. The following sections describe the required steps and patches for Android 16.0.0_1.2.0.

1. OV5640 YUV Output

YUV is the default format used on i.MX6 and i.MX8. To enable this format on i.MX95, follow the steps below.

1.1 Apply patch in android_build/vendor/nxp-opensource/kernel_imx

0001-linux-support-ov5640-in-mx95-android.patch

1.2 Apply patch in android_build/device/nxp

0001-device-nxp-add-ov5640-to-imx95-config.patch

1.3 Apply patch in android_build/vendor/nxp-opensource/libcamera

0001-neo-pipeline-init-fallback-to-yuv-mode-if-there-is-n.patch

Make sure there is no ov5640.yaml under /vendor/etc/configs/libcamera/nxp/neo/.
If the file exists, delete or rename it.

1.4 Build and flash the Android image onto the board

After booting, update the OV5640 dtbo image using fastboot:
fastboot flash dtbo dtbo-imx95-15x15-ov5640.img

1.5 In the U-Boot console, append the only-ov5640 layout

setenv append_bootargs androidboot.camera.layout=only-ov5640

After this, the camera app should be able to open the OV5640 in YUV mode.

2. OV5640 RAW RGB Output

Since the i.MX95 integrates an internal Image Signal Processor (ISP), the OV5640 RAW RGB output is supported in i.MX95 Android.
To enable RAW mode, apply all patches listed in Section 1, and additionally apply the following patch to kernel_imx:

0002-linux-support-ov5640-raw-mode-in-mx95-android.patch

Then push ov5640.yaml to the libcamera config folder:

adb push ov5640.yaml /vendor/etc/configs/libcamera/nxp/neo/

To switch back to YUV mode, remove or rename:

/vendor/etc/configs/libcamera/nxp/neo/ov5640.yaml

3. Camera Recording

If video recording does not work, check your app’s resolution or frame rate settings.
For example, in the opencamera app, set Video frame rate = 30 fps under “Video Settings”.
After adjusting this value, camera recording should work correctly.