Last edited 2 months ago

Touchscreen hardware components

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines


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 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.

Info white.png Information
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 = <&ltdc_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. 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.

Info white.png Information
This touchscreen controller driver can be found on some STM32MP15 Discovery kits.

4.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 = <&ltdc_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";
	};
};

&ltdc {
	status = "okay";

	port {
		ltdc_ep1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&dsi_in>;
		};
	};
};

5. 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.

Info white.png Information
This touchscreen controller driver can be found on some STM32MP257F EV1 Evaluation boards.

5.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";
	};
};
...
&ltdc {
	rotation-memory = <&ltdc_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 = <&ltdc_ep1_out>;
			};
		};

		port@1 {
			reg = <1>;
			lvds_out0: endpoint {
				remote-endpoint = <&lvds_panel_in>;
			};
		};
	};
};

6. References[edit | edit source]

  1. 1.0 1.1 1.2 Linux Input Subsystem kernel API and userspace API