Alternative EVK Hardware Configurations

Each Genio EVK provides different hardware configurations, for example,

  • Genio 1200 and Genio 700 EVK provide various display output interface combinations.

  • All Genio EVKs have optional camera daughterboards.

In most cases, these hardware configurations are mutually exclusive to each other. For example, the Ethernet port and the HDMI port on Genio 350 EVK cannot be enabled at the same time, because they occupy the same hardware pins.

As a result, we need to use different device trees to represent different hardware configurations. Instead of duplicating the device tree source files, we could use device tree overlays to modify the board device tree to provide different configurations.

The Genio boot firmwares provide several hardware configurations for you to apply. This section shows you how to apply different device tree overlays, and provides a list of pre-installed DTBO files in each boot firmware.

Apply Device Tree Overlays

The device tree overlays are binary files organized in the FIRMWARE partition as described in the Partition Layout section. The directory structure looks like this:

FIRMWARE
└── mediatek
    ├── genio-1200-evk
    │   ├── apusys.dtbo
    │   ├── camera-ar0430-ap1302-csi0.dtbo
    │   ├── display-dp.dtbo
    │   ├── display-hdmi.dtbo
    │   ├── ...
    │   ├── genio-1200-evk.dtb
    │   ├── gpu-mali.dtbo
    │   └── video.dtbo
    ├── genio-350-evk
    │   ├── ...
    └── genio-700-evk
        └── ...

To apply a dtbo, simply add its filename to the list_dtbo U-Boot environment variable. There are several approaches to set a U-boot environment variable, including:

  • Modify the u-boot-initial-env configuration file in boot firmwares and flash the mmc0boot1 partition.

  • Use setenv and saveenv commands in U-Boot interactive console

The following sections show the steps to do so:

Modify U-Boot Environment Variables with Flash Tool

To modify the list_dtbo variable using the genio-flash tool, follow these steps:

  1. Open then u-boot-initial-env text file in the image directory, and locate the line list_dtbo=:

    dtb_path=/FIRMWARE/mediatek/genio-1200-evk/
    efi_dtb_prefixes=${dtb_path} / /dtb/ /dtb/current/
    check_fastboot_entry=setenv fastboot_entry 0
    boot_conf=#conf-mediatek_genio-1200-evk.dtb#conf-gpu-mali.dtbo#conf-video.dtbo
    list_dtbo= gpu-mali.dtbo video.dtbo apusys.dtbo
    storage=mmc
    storage_dev=0
    boot_scripts=fitImage
    

    Append the dtbo file name you want to apply at the end of the line, for example, display-hdmi.dtbo

    list_dtbo= gpu-mali.dtbo video.dtbo apusys.dtbo display-hdmi.dtbo
    

    Save and close the file.

  2. You can then simply flash the Ubuntu image and the list_dtbo variable will be updated. If your EVK board is already flashed an Ubuntu image and you only want to modify the U-Boot environment variables, use the following command:

    genio-flash mmc0boot1
    

    This only modifies the boot partition that stores U-Boot environment variables.

Modify U-Boot Environment Variables with Interactive Console

Alternatively you could modify U-Boot environment through the interactive console.

  1. During U-Boot boot process, when you see the line Hit any key to stop autoboot, press any key in the UART console to gain access to the interactive console:

    Hit any key to stop autoboot:  0
    =>
    
  2. In the console, use the command printenv to list existing variable values:

    => printenv list_dtbo
    list_dtbo= gpu-mali.dtbo video.dtbo apusys.dtbo
    
  3. Use the command setenv to set variables. In the example below, we append the dtbo file display-hdmi.dtbo to existing values, and use saveenv to write the result to persistent storage.

    => setenv list_dtbo "gpu-mali.dtbo video.dtbo apusys.dtbo display-hdmi.dtbo"
    => saveenv
    Saving Environment to MMC... Writing to MMC(0)... OK
    
  4. You can then reboot the board, or use the following command to continue the boot flow:

    => run distro_bootcmd
    

U-Boot Log for Device Tree Overlay

After you updated the environment variable, reboot the board.

U-Boot would apply the overlay and you should see the following U-Boot log in the UART console:

Hit any key to stop autoboot:  0
base: /FIRMWARE/mediatek/genio-1200-evk/
fdtfile: genio-1200-evk.dtb
fdtaddr: 0x44000000
Probing mmc 0:3 for device tree...
Loading dtb '/FIRMWARE/mediatek/genio-1200-evk//genio-1200-evk.dtb'
107888 bytes read in 5 ms (20.6 MiB/s)
Loading overlay '/FIRMWARE/mediatek/genio-1200-evk//gpu-mali.dtbo'
3505 bytes read in 3 ms (1.1 MiB/s)
Loading overlay '/FIRMWARE/mediatek/genio-1200-evk//video.dtbo'
9139 bytes read in 3 ms (2.9 MiB/s)
Loading overlay '/FIRMWARE/mediatek/genio-1200-evk//apusys.dtbo'
12434 bytes read in 2 ms (5.9 MiB/s)
Loading overlay '/FIRMWARE/mediatek/genio-1200-evk//display-hdmi.dtbo'
609 bytes read in 3 ms (198.2 KiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

In the example above we appended display-hdmi.dtbo and it disables the built-in DSI panel, leaving only the HDMI porting enabled.

Please refer to the tables below for the effect of each overlay file.

List of Overlay Files for Each Genio EVK

Genio 1200 EVK Overlays

DTBO name

Usage

Camera overlays are mutually exclusive:

camera-imx214-csi0.dtbo

Enables MIPI-CSI0 port for DTB-D1V1-D2 (RAW sensor).

camera-imx214-csi1.dtbo

Enables MIPI-CSI1 port for DTB-D1V1-D2 (RAW sensor).

camera-imx214-csi2.dtbo

Enables MIPI-CSI2 port for DTB-D1V1-D2 (RAW sensor).

camera-ar0430-ap1302-csi0.dtbo

Enables MIPI-CSI0 for DTB-D1V1-D6 (YUV sensor).

camera-ar0430-ap1302-csi1.dtbo

Enables MIPI-CSI1 for DTB-D1V1-D6 (YUV sensor).

camera-ar0430-ap1302-csi2.dtbo

Enables MIPI-CSI2 for DTB-D1V1-D6 (YUV sensor).

Display overlays are mutually exclusive:

display-dp.dtbo

Enables DPoC(Display Port over Type-C) external display and disables all other display interfaces.

display-dsiedp.dtbo

Enables both DSI and eDP panels. Disables both DPoC and HDMI output.

display-dsiedpdp.dtbo

Enables DSI panel, eDP panel, and DPoC port. This is a triple display setup and the maximum resolution is reduced.

display-dsiedphdmi.dtbo

Enables DSI panel, eDP panel, and HDMI port. This is a triple display setup and the maximum resolution is reduced.

display-dsihdmidp.dtbo

Enables DSI panel, DPoC port, and HDMI port. This is a triple display setup and the maximum resolution is reduced.

display-edp.dtbo

Enables the eDP panel only.

display-hdmidp.dtbo

Enables the HDMI and DPoC ports only. All built-in panels are disabled.

display-headless.dtbo

All display interfaces are disabled.

Genio 700 EVK Overlays

DTBO name

Usage

Display overlays are mutually exclusive:

display-dp.dtbo

Enables DPoC(Display Port over Type-C) external display, and disables all other display interfaces.

display-dsi.dtbo

Enables DSI panel only.

display-dsidp.dtbo

Enables DSI panel and DPoC port.

display-dsiedp.dtbo

Enables both DSI and eDP panels. Disables both DPoC and HDMI output.

display-edp.dtbo

Enables eDP output. This disables the default DSI panel output.

display-hdmi.dtbo

Enables HDMI port and displays all other display interfaces.

display-hdmidp.dtbo

Disables DSI panel and enables both HDMI and DPoC output.

Genio 510 EVK Overlays

DTBO name

Usage

Display overlays are mutually exclusive:

display-dp.dtbo

Enables DPoC(Display Port over Type-C) external display, and disables all other display interfaces.

display-dsi.dtbo

Enables DSI panel only.

display-dsidp.dtbo

Enables DSI panel and DPoC port.

display-dsiedp.dtbo

Enables both DSI and eDP panels. Disables both DPoC and HDMI output.

display-edp.dtbo

Enables eDP output. This disables the default DSI panel output.

display-hdmi.dtbo

Enables HDMI port and displays all other display interfaces.

display-hdmidp.dtbo

Disables DSI panel and enables both HDMI and DPoC output.

Genio 350 EVK Overlays

DTBO name

Usage

net-ethernet.dtbo

Enables on-board ethernet port and disables HDMI port. The on-board switch SW2101 must be set to Off-LAN when using this dtbo.

Camera overlays are mutually exclusive:

camera-ap1302-ar0430-single-csi0.dtbo

Single camera on MIPI-CSI0.

camera-ap1302-ar0430-single-csi1.dtbo

Single camera on MIPI-CSI1.

camera-ap1302-ar0430-dual.dtbo

Dual camera on MIPI-CSI0 and MIPICSI1.

Display overlays are mutually exclusive:

display-hdmi.dtbo

Enables HDMI port but disables DSI panel and the Ethernet port.

display-headless.dtbo

Enables all display interfaces.

Source Code of Overlay Files

All Genio EVK overlay files are maintained in the kernel tree, along with the device tree file of each Genio EVK.

Please visit the kernel repository and navigate to path arch/arm64/boot/dts/mediatek:

https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-mtk/+git/jammy/tree/arch/arm64/boot/dts/mediatek

For example,

Note

Please make sure the kernel version tag matches the actual kernel images you are currently using.