Skip to content

Commit 470fdd0

Browse files
committed
dtoverlays: Add overlay for Ilitek-ts-i2c driver (213X/23XX/25XX chips)
Signed-off-by: Dave Stevenson <[email protected]>
1 parent 97300d6 commit 470fdd0

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,18 @@ 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+
sizex Touchscreen size x, horizontal resolution of
2787+
touchscreen (in pixels)
2788+
sizey Touchscreen size y, vertical resolution of
2789+
touchscreen (in pixels)
2790+
i2c-path Override I2C path to allow for i2c-gpio buses
2791+
2792+
27812793
Name: ilitek251x
27822794
Info: Enables I2C connected Ilitek 251x multiple touch controller using
27832795
GPIO 4 (pin 7 on GPIO header) for interrupt.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
touchscreen-size-x = <1280>;
34+
touchscreen-size-y = <800>;
35+
};
36+
};
37+
};
38+
39+
__overrides__ {
40+
interrupt = <&ili2130_pins>,"brcm,pins:0",
41+
<&ili2130>,"interrupts:0";
42+
sizex = <&ili2130>,"touchscreen-size-x:0";
43+
sizey = <&ili2130>,"touchscreen-size-y:0";
44+
i2c-path = <&frag1>, "target?=0",
45+
<&frag1>, "target-path";
46+
};
47+
};

0 commit comments

Comments
 (0)