- 11 Oct 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Custom Configuration
- Updated on 11 Oct 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Device Tree Overlay Configuration
Technexion implement a device-tree overlay method using AVB 3.0.
Overlay Table
platform | overlay function | dt overlay |
EDM-G-IMX8M-PLUS | 10" LVDS panel VL10112880 | lvds-vl10112880 |
15.6" LVDS panel VL15613676 | lvds-vl15613676 | |
21" LVDS panel Vl215192108 | lvds-vl215192108 | |
TEVI-OV5640 | tevi-ov5640 | |
TEVI-AR series | tevi-ap1302 | |
VIZIONLINK with AR series | vizionlink-tevi-ap1302 | |
EDM-G-IMX8M-MINI | 10" LVDS panel VL10112880 | sn65dsi84-vl10112880 |
15.6" LVDS panel VL15613676 | sn65dsi84-vl15613676 | |
21" LVDS panel Vl215192108 | sn65dsi84-vl215192108 | |
TEVI-OV5640 | tevi-ov5640 | |
TEVI-AR series | tevi-ap1302 | |
VIZIONLINK with AR series | vizionlink-tevi-ap1302 |
Example
Runtime stage
Please boot up into u-boot prompt, and issue commands as follows example:
Overlay vl10112880 lvds panel
- EDM-G-IMX8M-PLUS
u-boot=> setenv dtoverlay lvds-vl10112880
- EDM-G-IMX8M-MINI
u-boot=> setenv dtoverlay sn65dsi84-vl10112880
- EDM-G-IMX8M-PLUS
Overlay vl215192108 lvds panel
- EDM-G-IMX8M-PLUS
u-boot=> setenv dtoverlay lvds-vl215192108
- EDM-G-IMX8M-MINI
u-boot=> setenv dtoverlay sn65dsi84-vl215192108
- EDM-G-IMX8M-PLUS
Overlay tevi-ov5640
- Setup dt overlay
u-boot=> setenv dtoverlay tevi-ov5640
- Setup dt overlay
Overlay tevi-ap1302
- Setup dt overlay
u-boot=> setenv dtoverlay tevi-ap1302
- NOTE!
For TEVI-AR serials camera, in addition to dt overlay, also need to set the camera configuration
Such as TEVI-AR0144- Set camera configuration by each camera module
add androidboot.camera.layout=ar0144 to bootargsu-boot=> env edit bootargs edit: stack_depot_disable=on kasan.stacktrace=off console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 init=/init firmware_class.path=/vendor/firmware loop.max_part=7 transparent_hugepage=never swiotlb=65536 pci=nomsi cma=800M@0x400M-0x1000M buildvariant=userdebug androidboot.hwrotation=0 androidboot.usb.debugging=1 bootconfig androidboot.camera.layout=ar0144
- Camera module and configuration mapping table
Camera Module Camera Configuration TEVI-AR0144 ar0144 TEVI-AR0234 ar0234 TEVI-AR0521 ar0521 TEVI-AR0522 ar0522 TEVI-AR0821 ar0821 TEVI-AR0822 ar0822 TEVI-AR1335 ar1335
- Set camera configuration by each camera module
- Setup dt overlay
Save your overlay configuration for every boot later.
If you just want to boot current setting once, you can ignore this step.u-boot=> saveenv
Boot into Android system
u-boot=> boot
Compile stage
You also can fixed your overlay setting in u-boot header file according your target board
For example, to enable TEVI-AR0144 of EDM-G-IMX8M-PLUS, add overlay and camera configuration to vendor/nxp-opensource/uboot-imx/include/configs/edm-g-imx8mp_android.h
#define CONFIG_EXTRA_ENV_SETTINGS \
......
"dtoverlay=tevi-ap1302\0"\
"bootargs="\
......
"androidboot.camera.layout=ar0144 "\
"bootconfig "\
"\0"
- Note the setting in bootargs without '\0'
Change Boot Arguments
According to your device, you might need to change properties let your system performance better, list common properties as follows:
About CMA size, it's up to your DRAM size for each platforms, please modify CMA size as follows table:
platform | DRAM size | recommend properties | default properties |
EDM-G-IMX8M-PLUS | 1GB | cma=320M@0x400M-0xb80M galcore.contiguousSize=33554432 androidboot.displaymode=720p | cma=800M@0x400M-0xb80M |
2GB and above | cma=800M@0x400M-0xb80M | ||
EDM-G-IMX8M-MINI | 1GB | cma=320M@0x400M-0xb80M galcore.contiguousSize=33554432 androidboot.displaymode=720p | cma=800M@0x400M-0xb80M |
2GB and above | cma=800M@0x400M-0xb80M |
Example
Runtime stage
EDM-G-IMX8M-PLUS
u-boot=> setenv bootargs stack_depot_disable=on kasan.stacktrace=off console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 init=/init firmware_class.path=/vendor/firmware loop.max_part=7 transparent_hugepage=never swiotlb=65536 pci=nomsi cma=800M@0x400M-0x1000M bootconfig buildvariant=userdebug loglevel=0
u-boot=> saveenv
u-boot=> boot
Compile stage
You also can fixed your overlay setting in u-boot header file according your target board
For example, set the default properties of EDM-G-IMX8M-PLUS
#define CONFIG_EXTRA_ENV_SETTINGS \
......
"bootargs="\
......
"cma=800M@0x400M-0x1000M "\
......
"\0"
LIBGPIOD JNI demo and APIs
Technexion provide a demo app about libgpiod JNI Test, specific source code as kotlin_gpiod_demo
- Users can implement own GUI using our Input/Output APIs
- Get total number of GPIO bank:
- Java
public native Int getGpioTotalBank();
- Kotlin
external fun getGpioTotalBank(): Int
- Java
- Setting GPIO as output with specific value:
- Java
public native String setGpioInfo(int bank,int line, int value);
- Kotlin
external fun setGpioInfo(bank: Int, line: Int, value: Int): String
- Java
- Setting GPIO as input and get a value:
- Java
public native String getGpioInfo(int bank,int line);
- Kotlin
external fun getGpioInfo(bank: Int, line: Int): String
- Java
- Get total number of GPIO bank:
- Users also can import JNI library to your own app using Androd Studio, detail instruction here