How to activate a configuration for a device

I have a Verdin iMX8M Plus on Dahlia Carrier Board. I am trying to using a 7 inch LVDS touch panel through the Verdin DSI to LVDS adapter. I started from how it was done for the 10 inch panel and the display itself works but I am stuck at trying to make the touch controller function.

Here is my tcbuild.yaml:

input:
  easy-installer:
    toradex-feed:
      version: "6.2.0"
      release: monthly
      machine: verdin-imx8mp
      distro: torizon
      variant: torizon-core-docker
      build-number: "5"
      build-date: "202302"
      
customization:
  splash-screen: media/logo.png
  device-tree:
    include-dirs:
      - linux/include
    custom: linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-dahlia.dts
    overlays:
      add:
        - overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-7inch-lvds_overlay.dts
        - device-trees/overlays/verdin-imx8mp_spidev_overlay.dts
  
output:
  ostree:
    branch: app-image-branch
    commit-subject: "App image 0.1"
    commit-body: "TorizonCore OS Image"
  easy-installer:
    local: images/app-image
    name: "App image 0.1"
    description: "TorizonCore OS Image"
    accept-licence: true
    autoinstall: true
    autoreboot: true
    provisioning:
      mode: offline
      shared-data: shared-data.tar.gz

I have both device trees and linux as git submodules tracking toradex_5.15-2.1.x-imx.

This is overlays/verdin-imx8mp-dsi-to-lvds_panel-cap-touch-7inch-lvds_overlay.dts:

verdin-imx8mp-dsi-to-lvds_panel-cap-touch-7inch-lvds_overlay.dts
/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,verdin-imx8mp";
};

#include "verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi"
#include "display-mi0700csp_sn65dsi84_overlay.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

&i2c4 {
	// FocalTech FT5426 controller, multi-touch
	// Datasheet: https://somlabs.com/wp-content/uploads/FT5x26.pdf
	// App Note: https://www.lcd-module.de/fileadmin/eng/pdf/zubehoer/FT5426_5526Application%20Note%20Ver01.pdf
	focaltech_touch: focaltech@38 {
		compatible = "focaltech,fts";
		reg = <0x38>;

		// Replicated by focaltech,irq-gpio
		interrupt-parent = <&gpio4>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;

		// Reference Pin configuration for mux for GPIO5,IO00 and GPIO4,IO25
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>;

		// TOUCH_RESET is connected through the DSI Adapter to GPIO5,IO00 (aka i2s_2_bclk)
		// 0x01 (active low)
		focaltech,reset-gpio = <&gpio5 0 GPIO_ACTIVE_LOW>;

		// TOUCH_INT is connected through the DSI Adapter to GPIO4,IO25 (aka gpio_9_dsi)
		// 0x02 (falling edge)
		focaltech,irq-gpio = <&gpio4 25 IRQ_TYPE_EDGE_FALLING>;

		// The FT5426 support up to 10 fingers, our 7 inch panel is 1024x600 in landscape
		focaltech,num-max-touches = <5>;
		focaltech,display-coords =  <0 0 600 1024>;

		// Panel type as defined in focaltech_touch/focaltech_config.h (linux touch drivers)
		focaltech,panel-type = <0x54260002>;
		status = "okay";
	};
};

&backlight {
	status = "okay";
};

&gpu_2d {
	status = "okay";
};

&gpu_3d {
	status = "okay";
};

/* LCDIF to MIPI-DSI */
&lcdif1 {
	status = "okay";
};

&mix_gpu_ml {
	status = "okay";
};

&ml_vipsi {
	status = "okay";
};

&vpu_g1 {
	status = "okay";
};

&vpu_g2 {
	status = "okay";
};

&vpu_vc8000e {
	status = "okay";
};

&vpu_v4l2 {
	status = "okay";
};

I am not 100% sure if this dts entry for focaltech_touch is correct but, when I build the image and deploy it (display works, not touch), I then verified the CONFIG_TOUCHSCREEN_FTS:

cat /proc/config.gz | gunzip > running.config
cat running.config | grep CONFIG_TOUCHSCREEN_FTS

And I get:

# CONFIG_TOUCHSCREEN_FTS is not set

Is there a quick way to enable it? Or do you have to activate it on your side in a nightly build?

Thank you in advance for your time.

Others

display-mi0700csp_sn65dsi84_overlay.dtsi:

&lvds_ti_sn65dsi84 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@2 {
			reg = <2>;

			lvds_out_panel: endpoint {
				remote-endpoint = <&panel_in_lvds>;
			};
		};
	};
};

&panel_lvds {
	compatible = "panel-lvds";
	backlight = <&backlight>;
	data-mapping = "vesa-24";
	height-mm = <86>;
	width-mm = <154>;
	status = "okay";

	panel-timing {
		clock-frequency = <68900000 71100000 73400000>;
		de-active = <1>;
		hactive = <1024 1024 1024>;
		hback-porch = <23 60 71>;
		hfront-porch = <23 60 71>;
		hsync-len = <15 40 47>;
		pixelclk-active = <1>; /* positive edge */
		vactive = <600 600 600>;
		vback-porch = <5 7 10>;
		vfront-porch = <5 7 10>;
		vsync-len = <6 9 12>;
	};

	port {
		panel_in_lvds: endpoint {
			remote-endpoint = <&lvds_out_panel>;
		};
	};
};

Hi @mnano ,

Is there a quick way to enable it? Or do you have to activate it on your side in a nightly build?

I searched for the CONFIG_TOUCHSCREEN_FTS option and apparently it isn’t present upstream, only on the downstream kernel from NXP. In this case you’d have to add the driver manually as an external kernel module.

To do this you can use TorizonCore Builder: In your tcbuild.yaml file, add the kernel and modules sections to your existing customization section like specified here: TorizonCore Builder Tool “build” command | Toradex Developer Center .

Follow this article Building External Kernel Modules With Torizon | Toradex Developer Center for more information about compiling external kernel modules with TorizonCore Builder.

Hope this helps you.

Best regards,
Lucas Akira

Thank you for the quick answer.

We are also evaluating the ILI2511 touchscreen controller, which is pmost certainly going to be the one we are going to use. I think this one is upstream with the CONFIG_TOUCHSCREEN_ILITEK configuration. Would it then be possible to activate it on your side?

Hi @mnano ,

I can make a request to the TorizonCore team to add the TOUCHSCREEN_ILITEK config in the next TorizonCore 6 releases, starting on the nightly builds.

Just to confirm, do you want to request any other config to be added or just CONFIG_TOUCHSCREEN_ILITEK?

Best regards,
Lucas Akira

1 Like

Thank you for the quick feedback.

Yes, just adding CONFIG_TOUCHSCREEN_ILITEK is what we need.

Hi @mnano ,

I made the request to the team and I’ll reply here if I receive any updates from them. It shouldn’t take more than a few days for it to be analyzed by the team.

Best regards,
Lucas Akira

1 Like

Hi @mnano ,

I can confirm that your requested config had been added in our latest TorizonCore 6 nightly builds:

torizon@verdin-imx8mp-14777535:~$ sudo tdx-info
Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.77-6.2.0-devel+git.aa0ff7e3554e #1-TorizonCore SMP PREEMPT Wed Mar 29 15:33:40 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/c1a1ffe6cd2c8bfe9c0db9a025e559adfe37acd3158fd8dd997cff9e6b014234/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.2.0-devel-20230402-build.228
Hostname:                 verdin-imx8mp-14777535
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            14777535
Processor arch:           aarch64
------------------------------------------------------------
torizon@verdin-imx8mp-14777535:~$ zcat /proc/config.gz | grep TOUCHSCREEN_ILITEK
CONFIG_TOUCHSCREEN_ILITEK=m

Best regards,
Lucas Akira

1 Like

Hello,

I made a mistake, we actually need the CONFIG_TOUCHSCREEN_ILI210X activated. My bad, both ILITEK configuration were very confusing for me.
Would it be possible for you to activate it in a future nightly release?

Best regards,

Hi @mnano ,

Sure, I’ll make the request for the new config to the TorizonCore team. If I got this right, you don’t need TOUCHSCREEN_ILITEK then, is that right?

Best regards,
Lucas Akira

That is right, I only need CONFIG_TOUCHSCREEN_ILI210X.
I apologize for the trouble, it was confusing for me.

Hi @mnano ,

No problem, I made a new request to the team and CONFIG_TOUCHSCREEN_ILI20X is now included in our latest TorizonCore 6 nightly builds:

torizon@verdin-imx8mp-14777535:~$ sudo tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.77-6.2.0-devel+git.2276f375f152 #1-TorizonCore SMP PREEMPT Mon Apr 3 13:46:31 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/252cb58bfa88d6c8080778c17534e59fed400f60353132df71a16f6402b59d56/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.2.0-devel-20230412-build.241
Hostname:                 verdin-imx8mp-14777535
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            14777535
Processor arch:           aarch64
------------------------------------------------------------
torizon@verdin-imx8mp-14777535:~$ zcat /proc/config.gz | grep TOUCHSCREEN_ILI210X
CONFIG_TOUCHSCREEN_ILI210X=m

Just informing: the team is still debating whether or not to keep TOUCHSCREEN_ILITEK, but it looks like it won’t be removed in future builds.

Best regards,
Lucas Akira

2 Likes

Thank you once again for the quick resolution.

2 Likes