summaryrefslogtreecommitdiff
path: root/overlays/apalis-imx8qm_atmel-mxt_overlay.dts
blob: 0c60ad68aa26075f6e3f4997b1ecd522cf429d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Atmel MXT touchscreen for the 7inch and 10inch display orderable at Toradex.

/dts-v1/;
/plugin/;

#include "dt-bindings/interrupt-controller/irq.h"
#include "dt-bindings/gpio/gpio.h"
#include "dt-bindings/pinctrl/pads-imx8qm.h"

/ {
	compatible = "toradex,apalis-imx8qm";
	fragment@0 {
		target = <&i2c2>;
		__overlay__ {
			/* Atmel maxtouch controller */
			atmel_mxt_ts: atmel_mxt_ts@4a {
				compatible = "atmel,maxtouch";
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_touch>;
				reg = <0x4a>;
				interrupt-parent = <&gpio4>;
				interrupts = <1 IRQ_TYPE_EDGE_FALLING>;    /* Apalis GPIO5 */
				reset-gpios = <&gpio4 2 GPIO_ACTIVE_HIGH>; /* Apalis GPIO6 */
				status = "okay";
			};
		};
	};

	fragment@1 {
		target = <&iomuxc>;
		__overlay__ {
			apalis-imx8qm {
				/* Apalis GPIO5+6 */
				pinctrl_touch: touchgrp {
					fsl,pins = <
						SC_P_FLEXCAN2_RX_LSIO_GPIO4_IO01		0x06000021
						SC_P_FLEXCAN2_TX_LSIO_GPIO4_IO02		0x06000021
					>;
				};
			};
		};
	};
};