1. Article purpose[edit | edit source]
The purpose of this article is to:
- list the touchscreen hardware components that might be integrated in the different boards
 - link these components to the corresponding software framework(s)
 - point to the datasheet(s) of these components
 - explain, when necessary, how to configure these components
 
2. Software frameworks[edit | edit source]
| Domain | Peripheral | Software components | Comment | ||
|---|---|---|---|---|---|
| OP-TEE | Linux | STM32Cube | |||
| Visual and Inputs | Goodix GT9147 | Inputs framework[1] | Touchscreen input driver | ||
| Visual and Inputs | Goodix GT911 | Inputs framework[1] | Touchscreen input driver | ||
| Visual and Inputs | FocalTech FT6236 | Inputs framework[1] | Touchscreen input driver | ||
| Visual and Inputs | Ilitek ILI251x | Inputs framework[1] | Touchscreen input driver | ||
3. Goodix GT9147[edit | edit source]
The Goodix GT9147 is a single-layer multi-touch capacitive touch controller driver.
For details and the datasheet please contact the GT9147 driver provider.
| This touchscreen controller driver can be found on some STM32MP15 Evaluation boards. | 
3.1. Linux driver[edit | edit source]
Bindings: Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
Sources: drivers/input/touchscreen/goodix.c
Devicetree example: arch/arm/boot/dts/st/stm32mp157d-ev1.dts
...
&dsi {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <0>;
			dsi_in: endpoint {
				remote-endpoint = <<dc_ep0_out>;
			};
		};
		port@1 {
			reg = <1>;
			dsi_out: endpoint {
				remote-endpoint = <&dsi_panel_in>;
			};
		};
	};
	panel_dsi: panel-dsi@0 {
		compatible = "raydium,rm68200";
		reg = <0>;
		reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
		backlight = <&panel_backlight>;
		power-supply = <&v3v3>;
		status = "okay";
		port {
			dsi_panel_in: endpoint {
				remote-endpoint = <&dsi_out>;
			};
		};
	};
};
&i2c2 {
...
	stmfx: stmfx@42 {
		compatible = "st,stmfx-0300";
		reg = <0x42>;
		interrupts = <8 IRQ_TYPE_EDGE_RISING>;
		interrupt-parent = <&gpioi>;
		vdd-supply = <&v3v3>;
		stmfx_pinctrl: pinctrl {
			compatible = "st,stmfx-0300-pinctrl";
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
			gpio-ranges = <&stmfx_pinctrl 0 0 24>;
			goodix_pins: goodix {
				pins = "gpio14";
				bias-pull-down;
			};
			joystick_pins: joystick-pins {
				pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
				bias-pull-down;
			};
		};
	};
	gt9147: goodix-ts@5d {
		compatible = "goodix,gt9147";
		reg = <0x5d>;
		panel = <&panel_dsi>;
		pinctrl-0 = <&goodix_pins>;
		pinctrl-names = "default";
		AVDD28-supply = <&v3v3>;
		VDDIO-supply = <&v3v3>;
		status = "okay";
		interrupts = <14 IRQ_TYPE_EDGE_RISING>;
		interrupt-parent = <&stmfx_pinctrl>;
	};
};
4. Goodix GT911[edit | edit source]
The Goodix GT911 is a single-layer multi-touch capacitive touch controller driver.
For details and the datasheet please contact the GT911 driver provider.
| This touchscreen driver can be found in the Rocktech "RK043FN78H-CT661C" module found in: | 
4.1. Linux driver[edit | edit source]
Bindings: Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
Sources: drivers/input/touchscreen/goodix.c
Devicetree examples:
/ {
...
	panel_backlight: panel-backlight {
		compatible = "gpio-backlight";
		gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
		default-on;
		default-brightness-level = <0>;
		status = "okay";
	};
	panel_rgb: panel-rgb {
		compatible = "rocktech,rk043fn48h", "panel-dpi";
		enable-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
		backlight = <&panel_backlight>;
		power-supply = <&scmi_v3v3_sw>;
		status = "okay";
		width-mm = <105>;
		height-mm = <67>;
		port {
			panel_in_rgb: endpoint {
				remote-endpoint = <<dc_out_rgb>;
			};
		};
		panel-timing {
			clock-frequency = <10000000>;
			hactive = <480>;
			vactive = <272>;
			hsync-len = <52>;
			hfront-porch = <10>;
			hback-porch = <10>;
			vsync-len = <10>;
			vfront-porch = <10>;
			vback-porch = <10>;
		};
	};
...
};
&i2c5 {
...
	goodix: goodix_ts@5d {
		compatible = "goodix,gt911";
		reg = <0x5d>;
		pinctrl-names = "default";
		pinctrl-0 = <&goodix_pins_a>;
		interrupt-parent = <&gpiof>;
		interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
	        reset-gpios = <&gpioh 2 GPIO_ACTIVE_LOW>;
	        AVDD28-supply = <&scmi_v3v3_sw>;
	        VDDIO-supply = <&scmi_v3v3_sw>;
		touchscreen-size-x = <480>;
		touchscreen-size-y = <272>;
		status = "okay" ;
	};
};
<dc {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <<dc_pins_a>;
	pinctrl-1 = <<dc_sleep_pins_a>;
	status = "okay";
	port {
		#address-cells = <1>;
		#size-cells = <0>;
		ltdc_out_rgb: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&panel_in_rgb>;
		};
	};
};
/ {
...
	panel_backlight: panel-backlight {
		compatible = "gpio-backlight";
		gpios = <&gpiof 9 GPIO_ACTIVE_HIGH>;
		default-on;
		default-brightness-level = <1>;
		status = "okay";
	};
	panel_rgb: panel-rgb {
		compatible = "panel-dpi";
		enable-gpios = <&gpiog 4 GPIO_ACTIVE_HIGH>;
		backlight = <&panel_backlight>;
		power-supply = <&scmi_v3v3>;
		data-mapping = "bgr666";
		default-on;
		status = "okay";
		width-mm = <105>;
		height-mm = <67>;
		port {
			panel_in_rgb: endpoint {
				remote-endpoint = <<dc_out_rgb>;
			};
		};
		panel-timing {
			clock-frequency = <10000000>;
			hactive = <480>;
			vactive = <272>;
			hsync-len = <52>;
			hfront-porch = <10>;
			hback-porch = <10>;
			vsync-len = <10>;
			vfront-porch = <10>;
			vback-porch = <10>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <1>;
		};
	};
...
};
...
&i2c2 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c2_pins_a>;
	pinctrl-1 = <&i2c2_sleep_pins_a>;
	i2c-scl-rising-time-ns = <34>;
	i2c-scl-falling-time-ns = <2>;
	status = "okay";
	goodix: goodix-ts@5d {
		compatible = "goodix,gt911";
		reg = <0x5d>;
		pinctrl-names = "default";
		pinctrl-0 = <&goodix_pins_a>;
		interrupt-parent = <&gpiof>;
		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
		AVDD28-supply = <&scmi_v3v3>;
		VDDIO-supply = <&scmi_v3v3>;
		touchscreen-size-x = <480>;
		touchscreen-size-y = <272>;
		status = "okay" ;
	};
...
};
<dc {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <<dc_pins_a>;
	pinctrl-1 = <<dc_sleep_pins_a>;
	default-on;
	status = "okay";
	port {
		ltdc_out_rgb: endpoint {
			remote-endpoint = <&panel_in_rgb>;
		};
	};
};
5. FocalTech FT6236[edit | edit source]
The FocalTech FT6236 is a self-capacitive touch panel controller driver.
For details and the datasheet please contact the FT6236 driver provider.
| This touchscreen controller driver can be found on some STM32MP15 Discovery kits. | 
5.1. Linux driver[edit | edit source]
Bindings: Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
Sources: drivers/input/touchscreen/edt-ft5x06.c
Devicetree example: arch/arm/boot/dts/st/stm32mp157f-dk2.dts
&dsi {
	status = "okay";
	ports {
		port@0 {
			reg = <0>;
			dsi_in: endpoint {
				remote-endpoint = <<dc_ep1_out>;
			};
		};
		port@1 {
			reg = <1>;
			dsi_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
	panel_otm8009a: panel-otm8009a@0 {
		compatible = "orisetech,otm8009a";
		reg = <0>;
		reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
		power-supply = <&v3v3>;
		status = "okay";
		port {
			panel_in: endpoint {
				remote-endpoint = <&dsi_out>;
			};
		};
	};
};
&i2c1 {
	touchscreen@2a {
		compatible = "focaltech,ft6236";
		reg = <0x2a>;
		interrupts = <2 2>;
		interrupt-parent = <&gpiof>;
		interrupt-controller;
		touchscreen-size-x = <480>;
		touchscreen-size-y = <800>;
		panel = <&panel_otm8009a>;
		vcc-supply = <&v3v3>;
		iovcc-supply = <&v3v3>;
		status = "okay";
	};
	touchscreen@38 {
		compatible = "focaltech,ft6236";
		reg = <0x38>;
		interrupts = <2 2>;
		interrupt-parent = <&gpiof>;
		interrupt-controller;
		touchscreen-size-x = <480>;
		touchscreen-size-y = <800>;
		panel = <&panel_otm8009a>;
		vcc-supply = <&v3v3>;
		iovcc-supply = <&v3v3>;
		status = "okay";
	};
};
<dc {
	status = "okay";
	port {
		ltdc_ep1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&dsi_in>;
		};
	};
};
6. Ilitek ILI251x[edit | edit source]
The Ilitek ILI251x is a multi-touch capacitive touch controller driver.
For details and the datasheet please contact the ILI251x driver provider.
| This touchscreen driver can be found in the EDT ETML0700Z9NDHA module found in: | 
6.1. Linux driver[edit | edit source]
Bindings: Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml
Sources: drivers/input/touchscreen/ilitek_ts_i2c.c
Devicetree example: arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
...
/ {
...
	panel_dsi_backlight: panel-dsi-backlight {
		compatible = "gpio-backlight";
		gpios = <&gpioi 5 GPIO_ACTIVE_LOW>;
		default-on;
		default-brightness-level = <0>;
		status = "disabled";
	};
	panel_lvds: panel-lvds {
		compatible = "edt,etml0700z9ndha", "panel-lvds";
		enable-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>;
		backlight = <&panel_lvds_backlight>;
		status = "okay";
		width-mm = <156>;
		height-mm = <92>;
		data-mapping = "vesa-24";
		panel-timing {
			clock-frequency = <54000000>;
			hactive = <1024>;
			vactive = <600>;
			hfront-porch = <150>;
			hback-porch = <150>;
			hsync-len = <21>;
			vfront-porch = <24>;
			vback-porch = <24>;
			vsync-len = <21>;
		};
		port {
			lvds_panel_in: endpoint {
				remote-endpoint = <&lvds_out0>;
			};
		};
	};
	panel_lvds_backlight: panel-lvds-backlight {
		compatible = "gpio-backlight";
		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
		default-on;
		default-brightness-level = <0>;
		status = "okay";
	};
...
};
...
&i2c2 {
...
	ili2511: ili2511@41 {
		compatible = "ilitek,ili251x";
		reg = <0x41>;
		interrupt-parent = <&gpioi>;
		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
		reset-gpios = <&gpiog 14 GPIO_ACTIVE_LOW>;
		status = "okay";
	};
};
...
<dc {
	rotation-memory = <<dc_sec_rotation>;
	status = "okay";
	port {
		#address-cells = <1>;
		#size-cells = <0>;
		ltdc_ep0_out: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dsi_in>;
		};
		ltdc_ep1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&lvds_in>;
		};
	};
};
&lvds {
	status = "okay";
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <0>;
			lvds_in: endpoint {
				remote-endpoint = <<dc_ep1_out>;
			};
		};
		port@1 {
			reg = <1>;
			lvds_out0: endpoint {
				remote-endpoint = <&lvds_panel_in>;
			};
		};
	};
};
7. To go further[edit | edit source]
Related articles:
8. References[edit | edit source]
- ↑ 1.0 1.1 1.2 1.3 Linux Input Subsystem kernel API and userspace API