Skip to content

Commit 599de3a

Browse files
6by9pelwell
authored andcommitted
dtoverlays: Add overlay for Ilitek-ts-i2c driver (213X/23XX/25XX chips)
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 483851e commit 599de3a

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,6 +2784,17 @@ Load: dtoverlay=i2s-master-dac
27842784
Params: <None>
27852785

27862786

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

0 commit comments

Comments
 (0)