]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: imx8mp-var-som: Add support for TSC2046 touchscreen
authorStefano Radaelli <stefano.radaelli21@gmail.com>
Sun, 14 Dec 2025 21:52:53 +0000 (22:52 +0100)
committerShawn Guo <shawnguo@kernel.org>
Tue, 30 Dec 2025 08:03:51 +0000 (16:03 +0800)
The VAR-SOM-MX8MP integrates a TSC2046 resistive touchscreen controller.
The controller is physically located on the SOM, and its signals are
routed to the SOM pins, allowing carrier boards to make use of it.

This patch adds the TSC2046 node and the appropriate SPI controller.

Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi

index 6da5df11c44a1ba893ac57301e4d96a6b6fe32f4..49467b48d0b0bde9f729251f2e2133341af1e620 100644 (file)
        cpu-supply = <&buck2>;
 };
 
+&ecspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>;
+       cs-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
+       status = "okay";
+
+       /* Resistive touch controller */
+       tsc2046: touchscreen@0 {
+               compatible = "ti,tsc2046";
+               reg = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_restouch>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+               spi-max-frequency = <1500000>;
+               pendown-gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
+               ti,x-min = /bits/ 16 <125>;
+               ti,x-max = /bits/ 16 <4008>;
+               ti,y-min = /bits/ 16 <282>;
+               ti,y-max = /bits/ 16 <3864>;
+               ti,x-plate-ohms = /bits/ 16 <180>;
+               ti,pressure-max = /bits/ 16 <255>;
+               ti,debounce-max = /bits/ 16 <10>;
+               ti,debounce-tol = /bits/ 16 <3>;
+               ti,debounce-rep = /bits/ 16 <1>;
+               ti,settle-delay-usec = /bits/ 16 <150>;
+               ti,keep-vref-on;
+               wakeup-source;
+       };
+};
+
 &eqos {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_eqos>;
                >;
        };
 
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_I2C1_SCL__ECSPI1_SCLK                              0x12
+                       MX8MP_IOMUXC_I2C1_SDA__ECSPI1_MOSI                              0x12
+                       MX8MP_IOMUXC_I2C2_SCL__ECSPI1_MISO                              0x12
+                       MX8MP_IOMUXC_I2C2_SDA__GPIO5_IO17                               0x12
+               >;
+       };
+
        pinctrl_eqos: eqosgrp {
                fsl,pins = <
                        MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC                             0x2
                >;
        };
 
+       pinctrl_restouch: restouchgrp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12                             0xc0
+               >;
+       };
+
        pinctrl_sai3: sai3grp {
                fsl,pins = <
                        MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC                   0xd6