arm64: dts: mt8365-evk: Add goodix touchscreen support
authorLouis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Thu, 15 May 2025 10:04:11 +0000 (12:04 +0200)
committerAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 20 May 2025 11:25:02 +0000 (13:25 +0200)
The Mediatek Genio 350-EVK board has on the DSI0 connector a StarTek
KD070FHFID015 display panel that uses a Goodix GT9271 I2C capacitive
touch controller.

The mt8365-evk devicetree already have the display panel support but
lacks the touchscreen support, so add it.

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Link: https://lore.kernel.org/r/20250515-mt8365-evk-enable-touchscreen-v1-1-7ba3c87b2a71@collabora.com
[Angelo: Reordered regulator nodes and interurpts-extended property]
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
arch/arm64/boot/dts/mediatek/mt8365-evk.dts

index 1f8584bd66c33744c3a2f29ae9bb19c934588ce0..c8418888268d982875b3aa1aff5551f7c6b5e339 100644 (file)
                enable-active-high;
        };
 
+       reg_vsys: regulator-vsys {
+               compatible = "regulator-fixed";
+               regulator-name = "vsys";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       touch0_fixed_3v3: regulator-vio33tp {
+               compatible = "regulator-fixed";
+               regulator-name = "vio33_tp";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_vsys>;
+       };
+
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                        };
                };
        };
+
+       touchscreen@5d {
+               compatible = "goodix,gt9271";
+               reg = <0x5d>;
+               interrupts-extended = <&pio 78 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touch_pins>;
+               irq-gpios = <&pio 78 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&pio 79 GPIO_ACTIVE_LOW>;
+               AVDD28-supply = <&touch0_fixed_3v3>;
+               VDDIO-supply = <&mt6357_vrf12_reg>;
+       };
 };
 
 &mmc0 {
                };
        };
 
+       touch_pins: touch-pins {
+               ctp-int1-pins {
+                       pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
+                       input-enable;
+                       bias-disable;
+               };
+
+               rst-pins {
+                       pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
+                       output-low;
+               };
+       };
+
        uart0_pins: uart0-pins {
                pins {
                        pinmux = <MT8365_PIN_35_URXD0__FUNC_URXD0>,