Skip to content

Commit f174dd3

Browse files
committed
dtoverlays: Add overlay for Ilitek-ts-i2c driver (213X/23XX/25XX chips)
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 97300d6 commit f174dd3

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
131131
i2s-dac.dtbo \
132132
i2s-gpio28-31.dtbo \
133133
i2s-master-dac.dtbo \
134+
ilitek-ts-i2c.dtbo \
134135
ilitek251x.dtbo \
135136
imx219.dtbo \
136137
imx258.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,16 @@ Load: dtoverlay=i2s-master-dac
27782778
Params: <None>
27792779

27802780

2781+
Name: ilitek-ts-i2c
2782+
Info: Enables I2C connected Ilitek 23XX, 25XX, and 213X touch controllers
2783+
using GPIO 4 (pin 7 on GPIO header) for interrupt.
2784+
Load: dtoverlay=ilitek-ts-i2c,<param>=<val>
2785+
Params: interrupt GPIO used for interrupt (default 4)
2786+
invx Touchscreen inverted x axis
2787+
invy Touchscreen inverted y axis
2788+
i2c-path Override I2C path to allow for i2c-gpio buses
2789+
2790+
27812791
Name: ilitek251x
27822792
Info: Enables I2C connected Ilitek 251x multiple touch controller using
27832793
GPIO 4 (pin 7 on GPIO header) for interrupt.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Device tree overlay for I2C connected Ilitek multiple touch controller
2+
/dts-v1/;
3+
/plugin/;
4+
5+
/ {
6+
compatible = "brcm,bcm2835";
7+
8+
fragment@0 {
9+
target = <&gpio>;
10+
__overlay__ {
11+
ili2130_pins: ili2130_pins {
12+
brcm,pins = <4>; // interrupt
13+
brcm,function = <0>; // in
14+
brcm,pull = <2>; // pull-up //
15+
};
16+
};
17+
};
18+
19+
frag1: fragment@1 {
20+
target = <&i2c1>;
21+
__overlay__ {
22+
#address-cells = <1>;
23+
#size-cells = <0>;
24+
status = "okay";
25+
26+
ili2130: ili2130@41 {
27+
compatible = "ilitek,ili2130";
28+
reg = <0x41>;
29+
pinctrl-names = "default";
30+
pinctrl-0 = <&ili2130_pins>;
31+
interrupt-parent = <&gpio>;
32+
interrupts = <4 8>; // high-to-low edge triggered
33+
};
34+
};
35+
};
36+
37+
fragment@2 {
38+
target = <&ft5406>;
39+
__overlay__ {
40+
touchscreen-inverted-x;
41+
};
42+
};
43+
44+
fragment@3 {
45+
target = <&ft5406>;
46+
__overlay__ {
47+
touchscreen-inverted-y;
48+
};
49+
};
50+
51+
__overrides__ {
52+
interrupt = <&ili2130_pins>,"brcm,pins:0",
53+
<&ili2130>,"interrupts:0";
54+
i2c-path = <&frag1>, "target?=0",
55+
<&frag1>, "target-path";
56+
invx = <0>, "-2";
57+
invy = <0>, "-3";
58+
swapxy = <&ili2130>,"touchscreen-swapped-x-y?";
59+
};
60+
};

0 commit comments

Comments
 (0)