Custom overlay for ILI9881C + GT911 not applied — FDT_ERR_BADMAGIC in U-Boot

Hello!
I’m having trouble enabling the ILI9881C display and GT911 touchscreen on my Khadas VIM3L using a custom device tree overlay (.dtbo). U-Boot refuses to apply the overlay and throws FDT_ERR_BADMAGIC. Here are all the steps I’ve taken so far:


1. Hardware and Firmware:

  • Board: Khadas VIM3L (VIM3.V14, eMMC)
  • Display: 7" MIPI-DSI with ILI9881C controller, Touchscreen Goodix GT911 (I2C)
  • U-Boot: 2015.01 (Khadas stock, updated, kernel 5.15.137)
  • Image: Ubuntu 24.04.2 LTS (Noble Numbat), arm64
  • Boot: eMMC, rootfs ext4

2. Connection:

  • Working via UART serial console (TTL/USB adapter) — following official serial tool guide.
  • Have access to U-Boot and full Linux console.

3. Goal:

Enable the display and touchscreen using a custom .dtbo overlay that adds the required nodes for ILI9881C and GT911.


4. What I’ve done:

a) Overlay DTS file:

dts

КопироватьРедактировать

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>

&{/} {
    compatible = "khadas,vim3l", "amlogic,meson-g12b";

    fragment@0 {
        target-path = "/soc/mipi_dsi@ff600000";
        __overlay__ {
            status = "okay";
            panel@0 {
                compatible = "ilitek,ili9881c";
                reg = <0x00>;
                reset-gpios = <&gpio GPIOH_7 0>;
                dsi,flags = <1>;
                dsi,lanes = <4>;
                dsi,format = <2>;
                power-supply = <&vcc3v3>;
                backlight = <&backlight>;
                status = "okay";
            };
        };
    };

    fragment@1 {
        target-path = "/soc/i2c@ff805000";
        __overlay__ {
            gt911@5d {
                compatible = "goodix,gt911";
                reg = <0x5d>;
                interrupt-parent = <&gpio_intc>;
                interrupts = <32 2>;
                irq-gpios = <&gpio GPIOH_4 0>;
                reset-gpios = <&gpio GPIOH_7 1>;
                touchscreen-size-x = <1080>;
                touchscreen-size-y = <1920>;
                status = "okay";
            };
        };
    };
};

b) Compiling the .dtbo:

  • Found header file:

swift

КопироватьРедактировать

/usr/src/linux-headers-5.15.137/include/dt-bindings/gpio/meson-g12a-gpio.h
  • Compiled with cpp to resolve macros:

bash

КопироватьРедактировать

cpp -nostdinc -I. -I/usr/src/linux-headers-5.15.137/include -undef -x assembler-with-cpp -o - ~/ili9881c-gt911-overlay.dts | dtc -@ -I dts -O dtb -o ~/ili9881c-gt911.dtbo
  • The output file looks valid:

bash

КопироватьРедактировать

file ~/ili9881c-gt911.dtbo
# Device Tree Blob version 17, size=1218, boot CPU=0, string block size=198, DT structure block size=964

c) Copied the .dtbo to:

swift

КопироватьРедактировать

/boot/dtb/amlogic/overlays/ili9881c-gt911.dtbo

d) On boot, U-Boot detects the file but fails to apply:

bash

КопироватьРедактировать

Retrieving file: /dtb/amlogic/overlays/ili9881c-gt911.dtbo
1218 bytes read in 18 ms (65.4 KiB/s)
Failed to apply overlay /dtb/amlogic/overlays/ili9881c-gt911.dtbo, skipping
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
  • After this, extlinux loads, but overlay is skipped, the display and touchscreen do not work (no panel/sensor init).

5. What I tried:

  • Compiling with and without cpp, also tried /include/ instead of #include — no effect.
  • Different dtc versions (host has 1.7.0).
  • Verified dtbo content (hexdump, first bytes are d0 0d fe ed).
  • Tried adding overlay via extlinux.conf and uEnv.txt.
  • Made sure to use the -@ flag.

6. Boot logs:

  • Main error:

swift

КопироватьРедактировать

Failed to apply overlay /dtb/amlogic/overlays/ili9881c-gt911.dtbo, skipping
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
  • U-Boot loads the main dtb, sees the overlay, but rejects it as invalid. Afterwards:

arduino

КопироватьРедактировать

ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree

7. My questions:

  • How can I ensure the .dtbo is fully compatible with U-Boot on Khadas VIM3L?
  • Do I need a special dtc version or extra build steps for amlogic/Khadas?
  • Are there quirks in overlay support in this U-Boot (2015.01) or specific to Ubuntu 24.04?
  • What is the recommended way to build and apply overlays for display and touchscreen on this platform?

8. Additional info:

  • Ready to run any tests or share full logs, DTS, dtbo files if needed.
  • Please let me know if you need more information or output.

Hello @zlaya6elka

Here is the device tree overlays source code used on VIM3L, you can check how it works.

If there’s a uboot.env file in the boot partition, rename it (to delete/clear it) and see if that allows boot to continue?

1 Like

I followed your instructions but got this error in logs. Also, if I rename the boot partition’s uboot.env file, it shows similar logs.

SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0;

bl2_stage_init 0x01

bl2_stage_init 0x81

hw id: 0x0000 - pwm id 0x01

bl2_stage_init 0xc1

bl2_stage_init 0x02



L0:00000000

L1:00000703

L2:00008067

L3:15000000

S1:00000000

B2:20282000

B1:a0f83180



TE: 161874



BL2 Built : 05:41:56, Apr 29 2024. g12a amlogic-dev g1cebc752 - bl.autobuild@walle02-sh



Board ID = 10

Set cpu clk to 24M

Set clk81 to 24M

Use GP1_pll as DSU clk.

DSU clk: 1200 Mhz

CPU clk: 1200 MHz

Set clk81 to 166.6M

eMMC boot @ 0

sw8 s

storage init finish

board id: 10

Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0

fw parse done

PIEI prepare done

00000000

emmc switch 1 ok

ddr saved addr:00016000

Load ddr parameter from eMMC, src: 0x02c00000, des: 0xfffd0000, size: 0x00001000, part: 0

00000000

emmc switch 0 ok

fastboot data verify

result: 255

Cfg max: 12, cur: 1. Board id: 255. Force loop cfg

LPDDR4 probe



LPDDR4_PHY_V_0_1_22-Built : 15:49:20, May  9 2020. g12a ga361aa2 - zhiguang.ouyang@droid07-sz

ddr clk to 1608MHz



dmc_version 0001

Check phy result

INFO : ERROR : Training has failed!

Check phy result

INFO : ERROR : Training has failed!

Check phy result

INFO : End of initialization

INFO : ERROR : Training has failed!

1D training failed

Cfg max: 12, cur: 2. Board id: 255. Force loop cfg

LPDDR4 probe

ddr clk to 1608MHz



dmc_version 0001

Check phy result

INFO : End of CA training

INFO : End of initialization

INFO : Training has run successfully!

Check phy result

INFO : End of initialization

INFO : End of read enable training

INFO : End of fine write leveling

INFO : End of read dq deskew training

INFO : End of MPR read delay center optimization

INFO : End of Write leveling coarse delay

INFO : End of read delay center optimization

INFO : Training has run successfully!

Check phy result

INFO : End of initialization

INFO : End of MPR read delay center optimization

INFO : End of write delay center optimization

INFO : End of read delay center optimization

INFO : End of max read latency training

INFO : Training has run successfully!

1D training succeed

Check phy result

INFO : End of initialization

INFO : End of 2D read delay Voltage center optimization

INFO : End of 2D read delay Voltage center optimization

INFO : End of 2D write delay Voltage center optimization

INFO : End of 2D write delay Voltage center optimization

INFO : Training has run successfully!



soc_vref_reg_value 0x 00000025 00000027 00000026 00000026 00000026 00000025 00000026 00000027 00000025 00000026 00000025 00000026 00000024 00000026 00000025 00000026 00000026 00000026 00000025 00000024 00000022 00000026 00000025 00000024 00000024 00000026 00000025 00000027 00000026 00000026 00000025 00000025 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004 

 dram_vref_reg_value 0x 00000014

2D training succeed

auto size-- 65535DDR cs0 size: 2048MB

DDR cs1 size: 0MB

DMC_DDR_CTRL: 00c0002cDDR size: 2048MB

cs0 DataBus test pass

cs0 AddrBus test pass



non-sec scramble use zero key

ddr scramble enabled



100bdlr_step_size ps== 425

result report

boot times 0Enable ddr reg access

00000000

emmc switch 3 ok

Authentication key not yet programmed

get rpmb counter error 0x00000007

00000000

emmc switch 0 ok

Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0

Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000f1600, part: 0

0.0;M3 CHK:0;cm4_sp_mode 0

OPS=0x40

ring efuse init

[Image: g12a_v1.1.3543-1dfebc9a60 2023-11-28 03:18:31 jenkins@walle02-sh]

2b 0b 40 00 01 18 21 00 00 17 39 34 36 42 4b 50 

[0.014076 Inits done]

secure task start!

high task start!

low task start!

boot bl31

NOTICE:  BL31: v1.3(release):ca3e01f67

NOTICE:  BL31: Built : 12:59:17, May 13 2024. g12a amlogic-dev-1.3 gca3e01f67 - bl.autobuild@walle02-sh

NOTICE:  BL31: G12A normal boot!

NOTICE:  BL31: BL33 decompress pass

ERROR:   Error initializing runtime service opteed_fast





U-Boot 2015.01 (Jun 11 2025 - 21:16:25)



DRAM:  2 GiB

Relocation Offset is: 76dce000

spi_post_bind(spifc): req_seq = 0

register usb cfg[0][1] = 0000000077f1fb30

aml_i2c_init_port init regs for 0

MCU version: 0x00 0x03

MCU version is to low! Doesn't support froce boot from SD card.

MMC:   aml_priv->desc_buf = 0x0000000071dcee60

aml_priv->desc_buf = 0x0000000071dd11b0

SDIO Port B: 0, SDIO Port C: 1

co-phase 0x3, tx-dly 0, clock 400000

co-phase 0x3, tx-dly 0, clock 400000

co-phase 0x3, tx-dly 0, clock 400000

emmc/sd response timeout, cmd8, cmd->cmdarg=0x1aa, status=0x3ff2800

emmc/sd response timeout, cmd55, cmd->cmdarg=0x0, status=0x3ff2800

co-phase 0x3, tx-dly 0, clock 400000

co-phase 0x3, tx-dly 0, clock 40000000

[set_emmc_calc_fixed_adj][860]find fixed adj_delay=20

init_part() 282: PART_TYPE_DOS

[mmc_init] mmc init success

start dts,buffer=0000000071dd4930,dt_addr=0000000071dd4930

get_partition_from_dts() 82: ret 0

parts: 1

00:    rootfs   ffffffffffffffff 4

_check_ptbl_mbr()-878: MBR is OK!

init_part() 282: PART_TYPE_DOS

eMMC/TSD partition table have been checked OK!

crc32_s:0x1577dad == storage crc_pattern:0x1577dad!!!

crc32_s:0xee152b83 == storage crc_pattern:0xee152b83!!!

crc32_s:0x79f50f07 == storage crc_pattern:0x79f50f07!!!

mmc env offset: 0x6c00000 

In:    serial

Out:   serial

Err:   serial

board common misc_init

board_set_boot_source, boot_source: emmc

aml log : internal sys error!

reboot_mode=cold_boot

[store]To run cmd[emmc dtb_read 0x1000000 0x40000]

_verify_dtb_checksum()-3524: calc 405c65d7, store 405c65d7

_verify_dtb_checksum()-3524: calc 405c65d7, store 405c65d7

dtb_read()-3739: total valid 2

update_old_dtb()-3720: do nothing

aml_i2c_init_port init regs for 0

fusb302_init: Device ID: 0x91

CC connected in 1 as UFP

charge ic max_vol = 12000mv max_cur = 6000ma

chip->pos_power = 3, chip->pd_output_vol=12000  chip->pd_output_cur=1670

fusb302 detect chip.port_num = 0

gpio: pin GPIOA_13 (gpio 77) value is 1

gpio: pin GPIOA_13 (gpio 77) value is 0

gpio: pin GPIOA_8 (gpio 72) value is 0



amlkey_init() enter!

calc 5d07a41f28, store 5d07a41f28

calc 5d07a41f28, store 5d07a41f28

do nothing

[EFUSE_MSG]keynum is 4

vpu: error: clk_level in dts is out of support, set to default

vpu: clk_level in dts: 7

vpu: vpu_power_on

vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)

vpu: vpu_module_init_config

vpp: vpp_init

vpp: vpp osd2 matrix rgb2yuv..............

hdr_func 4, hdr_process_select 0x20000001

hdr_func 1, hdr_process_select 0x1

hdr_func 2, hdr_process_select 0x1

cvbs: cpuid:0x2b

vdac_gsw_init: 0x0

cvbs: find clk_path: 0x0

cvbs: find performance_pal config

LCD_RESET PIN: 1

lcd: lcd_debug_print flag: 0

lcd: detect mode: tablet, key_valid: 0

lcd: detect lcd_clk_path: 1

lcd: load config from dts

lcd_phy_probe

lcd: pinctrl_version: 2

lcd: use panel_type=mipi_2

lcd: no range_setting

lcd: config init pixel_clk: 120000000

lcd: TS101, mipi, 8bit, 1920x1200

lcd: bl: pinctrl_version: 2

lcd: bl: name: backlight_pwm, method: 1

lcd: bl: aml_bl_power_ctrl: 0

buff: 504b4236343917211801

Net:   sysnopsys gmac3.7

dwmac.ff3f0000

amlkey_init() enter!

amlkey_init() 59: already init!

[EFUSE_MSG]keynum is 4

MACADDR:02:00:00:21:18:01(from chipid)



ramdump_init, add:0, size:0

upgrade_step=2

aml log : internal sys error!

reboot_mode:::: cold_boot

s_version: 01.01.250611.211625

U-Boot 2015.01 (Jun 11 2025 - 21:16:25)



amlkey_init() enter!

amlkey_init() 59: already init!

[EFUSE_MSG]keynum is 4

[KM]Error:f[key_manage_query_size]L528:key[usid] not programed yet



mac address: c8:63:14:73:ce:fb

[KM]Error:f[key_manage_query_size]L528:key[deviceid] not programed yet

HDMI HPD low, no need parse EDID

dolby_status 0 1

dolby_vision_process: no tv and dv disabled

osd: hpd_state=0

[OSD]using fb_for_4k2k 0

[OSD]fb_addr: 0x3d800000

[OSD]dtb_mem_addr: 16777216

[OSD]load fb addr from dts:/meson-fb

[OSD]load fb addr from dts:/fb

[OSD]status disabled

[OSD]load fb addr from dts:/drm-vpu

[OSD]set initrd_high: 0x3e800000

[OSD]fb_addr for logo: 0x3e800000

[OSD]fb_addr: 0x3d800000

[OSD]dtb_mem_addr: 16777216

[OSD]load fb addr from dts:/meson-fb

[OSD]load fb addr from dts:/fb

[OSD]status disabled

[OSD]load fb addr from dts:/drm-vpu

[OSD]fb_addr for logo: 0x3e800000

[OSD]fb_width: 1920

[OSD]fb_height: 1200

[OSD]display_bpp: 24

[OSD]display_width: 1920

[OSD]display_height: 1200

[OSD]display_color_fg: 65535

[OSD]display_color_bg: 0

[OSD]display_color_index: 24

[OSD]VPP_OFIFO_SIZE:0xfff01fff

[CANVAS]canvas init

[CANVAS]addr=0x3e800000 width=5760, height=2400

[OSD]osd[0] canvas.idx =0x40

[OSD]osd[0] canvas.addr=0x3e800000

[OSD]osd[0] canvas.width=5760

[OSD]osd[0] canvas.height=2400

1573942 bytes read in 71 ms (21.1 MiB/s)

[OSD]Display-bmp: 1024 x 1536  with 256 colors

[OSD]fb=0x000000003ee96180; bmap=0x0000000000020436, width=1024, height= 1200, lcd_line_length=5760, bmp_line_bytes=1024, fb_gdev.fb_width=1920, fb_gdev.fb_height=1200 

[OSD]video_scale_bitmap src w=1920, h=1200, dst w=1920, dst h=1200

[OSD]osd_hw.free_dst_data: 0,1919,0,1199

[OSD]osd1_update_disp_freescale_enable

[OSD]osd[0] enable: 1

[OSD]video_scale_bitmap src w=1920, h=1200, dst w=1920, dst h=1200

[OSD]osd_hw.free_dst_data: 0,1919,0,1199

[OSD]osd1_update_disp_freescale_enable

[OSD]osd[0] enable: 1

cvbs: outputmode[panel] is invalid

hdmitx: outputmode[panel] is invalid

vpp: vpp_matrix_update: 0

vpp: g12a/b post2(bit12) matrix: YUV limit -> RGB ..............

lcd: enable: TS101, mipi, 1920x1200@47.26Hz

lcd: tablet driver init(ver 20240307): mipi

lcd: lcd_pll_wait_lock_g12a: path=1, pll_lock=1, wait_loop=1

vpp: vpp_init_lcd_gamma_table

lcd: pixel_clk = 120000000Hz, bit_rate = 720000000Hz, lanebyteclk = 90000000Hz

lcd:  Waiting STOP STATE LANE

lcd: dsi init on

lcd: bl: set level: 255, last level: 0

lcd: bl: aml_bl_power_ctrl: 1

lcd: disable: TS101

lcd: bl: aml_bl_power_ctrl: 0

lcd: disable driver

lcd: dsi init off

lcd: lcd_clk_disable

lcd: enable: TS101, mipi, 1920x1200@47.26Hz

lcd: tablet driver init(ver 20240307): mipi

lcd: lcd_pll_wait_lock_g12a: path=1, pll_lock=1, wait_loop=1

vpp: vpp_init_lcd_gamma_table

lcd:  Waiting STOP STATE LANE

lcd: dsi init on

lcd: bl: set level: 255, last level: 255

lcd: bl: aml_bl_power_ctrl: 1

dolby_status 0 1

dolby_status 0 1

hdr_packet

vpp: hdr_policy = 0

vpp: Rx hdr_info.hdr_sup_eotf_smpte_st_2084 = 0

s_version: 01.01.250611.211625

U-Boot 2015.01 (Jun 11 2025 - 21:16:25)



amlkey_init() enter!

amlkey_init() 59: already init!

[EFUSE_MSG]keynum is 4

[KM]Error:f[key_manage_query_size]L528:key[usid] not programed yet



mac address: c8:63:14:73:ce:fb

[KM]Error:f[key_manage_query_size]L528:key[deviceid] not programed yet

gpio: pin GPIOAO_7 (gpio 7) value is 1

saradc: 0x34c, hw_ver: 0x34 (VIM3.V14)

Hardware version: VIM3.V14

normal power on

boot wol: disable

port_mode_change::::fdt addr 0x1000000

port mode is usb3.0

libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND

Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 

SARADC channel(2) is 0x3ff.

SARADC closed.

storeboot::: reboot_mode: cold_boot

pll tsensor avg: 0x1e0d, u_efuse: 0x48

temp1: 24

ddr tsensor avg: 0x1df8, u_efuse: 0x8d

temp2: 24

device cool done

cfgload: start ...

cfgload: reading /boot.ini from mmc 0:1 ...

card in

co-phase 0x2, tx-dly 0, clock 400000

co-phase 0x2, tx-dly 0, clock 400000

co-phase 0x2, tx-dly 0, clock 400000

co-phase 0x2, tx-dly 0, clock 400000

co-phase 0x2, tx-dly 0, clock 40000000

init_part() 282: PART_TYPE_DOS

[mmc_init] mmc init success

10471 bytes read in 3 ms (3.3 MiB/s)

cfgload: applying boot.ini...

[#] Script a:71e59ed0 l:10451 c:0 s:0 - run

Starting boot.ini...

saradc: 0x34c, hw_ver: 0x34 (VIM3.V14)



mac address: c8:63:14:73:ce:fb

uboot type: vendor

Scanning mmc 0:1...

10024570 bytes read in 535 ms (17.9 MiB/s)

24494088 bytes read in 1306 ms (17.9 MiB/s)

79423 bytes read in 7 ms (10.8 MiB/s)

** Reading file would overwrite reserved memory **

4362 bytes read in 2 ms (2.1 MiB/s)

Import env.txt

Booting mainline kernel...

Apply dtbo uart3

345 bytes read in 6 ms (55.7 KiB/s)

Apply dtbo pwm_f

** Reading file would overwrite reserved memory **

Apply dtbo i2c3

223 bytes read in 7 ms (30.3 KiB/s)

Apply dtbo i2s

520 bytes read in 6 ms (84 KiB/s)

Apply dtbo watchdog

** Reading file would overwrite reserved memory **

HDMI: Autodetect: 1080p60hz

libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND

[rsvmem] fdt get prop fail.

## Loading init Ramdisk from Legacy Image at 13000000 ...

   Image Name:   uInitrd

   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)

   Data Size:    10024506 Bytes = 9.6 MiB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

load dtb from 0x1000000 ......

## Flattened Device Tree blob at 04080000

   Booting using the fdt blob at 0x4080000

libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND

[rsvmem] fdt get prop fail.

Can't find bootargs property in chosen

   reserving fdt memory region: addr=4080000 size=14000

   Loading Ramdisk to 3de70000, end 3e7ff63a ... OK

   Loading Device Tree to 000000001ffe9000, end 000000001fffffff ... OK

fdt_fixup_memory_banks, reg:000000001fff5a44

DTS already have 'reg' property

Can't find kaslr-seed property in chosen



Starting kernel ...



uboot time: 6618360 us

[    0.639173] meson-drm ff900000.vpu: DSI transceiver device is disabled

[    1.239752] rtc-hym8563 4-0051: hctosys: unable to read the hardware clock

e2fsck 1.46.5 (30-Dec-2021)

ROOTFS: clean, 34749/86944 files, 285937/347136 blocks

[  242.658265] INFO: task kworker/1:3:1170 blocked for more than 120 seconds.

[  242.659510]       Not tainted 6.11.2+ #1.7.4

[  242.663790] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  242.671749] INFO: task fsck.ext4:1215 blocked for more than 120 seconds.

[  242.678240]       Not tainted 6.11.2+ #1.7.4

[  242.682484] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  363.490278] INFO: task kworker/1:3:1170 blocked for more than 241 seconds.

[  363.491528]       Not tainted 6.11.2+ #1.7.4

[  363.495788] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  363.503772] INFO: task fsck.ext4:1215 blocked for more than 241 seconds.

[  363.510259]       Not tainted 6.11.2+ #1.7.4

[  363.514502] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  484.322263] INFO: task kworker/1:3:1170 blocked for more than 362 seconds.

[  484.323501]       Not tainted 6.11.2+ #1.7.4

[  484.327779] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  484.335734] INFO: task fsck.ext4:1215 blocked for more than 362 seconds.

[  484.342235]       Not tainted 6.11.2+ #1.7.4

[  484.346477] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  605.154265] INFO: task kworker/1:3:1170 blocked for more than 483 seconds.

[  605.155502]       Not tainted 6.11.2+ #1.7.4

[  605.159762] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[  605.167722] INFO: task fsck.ext4:1215 blocked for more than 483 seconds.

[  605.174235]       Not tainted 6.11.2+ #1.7.4

[  605.178478] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

I am working on integrating custom hardware (an ILI9881C MIPI-DSI display and a GT911 touchscreen) with the Khadas VIM3L board using the Fenix build system and Linux kernel 5.15. I’m creating a custom device tree overlay but encountered a problem during its compilation.

Issue:

The dtc compiler throws an error because it cannot find the labels &mipi_dsi and &touch_pins that I reference in my overlay.

Analysis:

I decompiled the base kvim3l.dtb and analyzed its __symbols__. I can see that labels for nodes such as &i2c3, &gpio, and &pinctrl_periphs are present, but there is no label for the MIPI-DSI controller node.

Overlay Code (Fragments):

Here are relevant parts of my .dts overlay:

/dts-v1/;
/plugin/;

fragment@0 {
    target = <&i2c3>;
    __overlay__ {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        ts_ft5x06: touchscreen@38 {
            status = "disabled";
        };

        gt911: touchscreen@5d {
            compatible = "goodix,gt911";
            reg = <0x5d>;
            pinctrl-names = "default";
            pinctrl-0 = <&touch_pins>;
            reset-gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
            interrupt-parent = <&gpio_intc>;
            interrupts = <GPIOH_7 IRQ_TYPE_EDGE_FALLING>;
            touchscreen-size-x = <800>;
            touchscreen-size-y = <1280>;
            touchscreen-inverted-x;
            touchscreen-swapped-y-x;
            goodix,config-data = /bits/ 8 < ... >;
        };
    };
};

fragment@1 {
    target = <&mipi_dsi>;
    __overlay__ {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        panel: panel@0 {
            compatible = "ilitek,ili9881c";
            reg = <0>;
            pinctrl-names = "default";
            pinctrl-0 = <&lcd_en_pins>;
            power-supply = <&vcc_3v3>;
            backlight = <&backlight_lcd>;
            dsi-lanes = <4>;
            status = "okay";

            panel-timing {
                clock-frequency = <72000000>;
                hactive = <800>;
                hfront-porch = <40>;
                hback-porch = <40>;
                hsync-len = <10>;
                vactive = <1280>;
                vfront-porch = <12>;
                vback-porch = <12>;
                vsync-len = <2>;
            };

            init-sequence = /bits/ 8 < ... >;

            port {
                panel_in: endpoint {
                    remote-endpoint = <&dsi_out>;
                };
            };
        };
    };
};

fragment@2 {
    target = <&pinctrl_periphs>;
    __overlay__ {
        lcd_en_pins: lcd-pins {
            mux {
                groups = "GPIOH_5", "GPIOH_6";
                function = "gpio_periphs";
                output-high;
            };
        };

        touch_pins: touch-pins {
            mux {
                groups = "GPIOH_7";
                function = "gpio_periphs";
            };
        };
    };
};

Questions:

  1. Could you advise the correct way to solve this issue?
  2. Which node in the base kvim3l.dts corresponds to the MIPI-DSI controller, and how should I correctly add a label such as mipi_dsi: for it?
  3. Why doesn’t the reference to the &touch_pins label — which is defined within the same overlay — work? Am I referring incorrectly to a node declared in a different fragment?

Any help or a working overlay example for the VIM3L would be greatly appreciated.

khadas@khadasvim3l:~/project/khadas/fenix/config/dtb_overlay$ ./build_overlay.sh
Error: my-custom-dts.pp:3.1-11 syntax error
FATAL ERROR: Unable to parse input tree

KHADAS_BOARD=VIM3L
LINUX=5.15
UBOOT=2015.01-5.15
DISTRIBUTION=Ubuntu
DISTRIB_RELEASE=jammy
DISTRIB_TYPE=minimal
DISTRIB_ARCH=arm64
INSTALL_TYPE=SD-USB
KHADAS_DTB_OVERLAYS=“my-custom-dts”

Thank you!