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>;
};
};
};