Custom Configuration
  • 11 Oct 2023
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Custom Configuration

  • Dark
    Light
  • PDF

Article Summary

Device Tree Overlay Configuration

Technexion implement a device-tree overlay method using AVB 3.0.

Overlay Table

platformoverlay functiondt overlay
EDM-G-IMX8M-PLUS10" LVDS panel
VL10112880
lvds-vl10112880
15.6" LVDS panel
VL15613676
lvds-vl15613676
21" LVDS panel
Vl215192108
lvds-vl215192108
TEVI-OV5640tevi-ov5640
TEVI-AR seriestevi-ap1302
VIZIONLINK with AR seriesvizionlink-tevi-ap1302
EDM-G-IMX8M-MINI10" LVDS panel
VL10112880
sn65dsi84-vl10112880
15.6" LVDS panel
VL15613676
sn65dsi84-vl15613676
21" LVDS panel
Vl215192108
sn65dsi84-vl215192108
TEVI-OV5640tevi-ov5640
TEVI-AR seriestevi-ap1302
VIZIONLINK with AR seriesvizionlink-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
      
  • Overlay vl215192108 lvds panel

    • EDM-G-IMX8M-PLUS
      u-boot=> setenv dtoverlay lvds-vl215192108
      
    • EDM-G-IMX8M-MINI
      u-boot=> setenv dtoverlay sn65dsi84-vl215192108
      
  • Overlay tevi-ov5640

    • Setup dt overlay
      u-boot=> setenv dtoverlay tevi-ov5640
      
  • 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 bootargs
        u-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 ModuleCamera Configuration
        TEVI-AR0144ar0144
        TEVI-AR0234ar0234
        TEVI-AR0521ar0521
        TEVI-AR0522ar0522
        TEVI-AR0821ar0821
        TEVI-AR0822ar0822
        TEVI-AR1335ar1335
  • 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:

platformDRAM sizerecommend propertiesdefault properties
EDM-G-IMX8M-PLUS1GBcma=320M@0x400M-0xb80M galcore.contiguousSize=33554432 androidboot.displaymode=720pcma=800M@0x400M-0xb80M
2GB and abovecma=800M@0x400M-0xb80M
EDM-G-IMX8M-MINI1GBcma=320M@0x400M-0xb80M galcore.contiguousSize=33554432 androidboot.displaymode=720pcma=800M@0x400M-0xb80M
2GB and abovecma=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
        
    • 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
        
    • 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
        
  • Users also can import JNI library to your own app using Androd Studio, detail instruction here

Was this article helpful?

What's Next