Skip to content

Commit bd377fa

Browse files
samhsuismpopcornmix
authored andcommitted
BCM2708: Add core Device Tree support, ilitek251x
Signed-off-by: Samuel Hsu <[email protected]>
1 parent 97de237 commit bd377fa

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
6565
i2c0-bcm2708.dtbo \
6666
i2c1-bcm2708.dtbo \
6767
i2s-gpio28-31.dtbo \
68+
ilitek251x.dtbo \
6869
iqaudio-dac.dtbo \
6970
iqaudio-dacplus.dtbo \
7071
iqaudio-digi-wm8804-audio.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,17 @@ Load: dtoverlay=i2s-gpio28-31
11231123
Params: <None>
11241124

11251125

1126+
Name: ilitek251x
1127+
Info: Enables I2C connected Ilitek 251x multiple touch controller using
1128+
GPIO 4 (pin 7 on GPIO header) for interrupt.
1129+
Load: dtoverlay=ilitek251x,<param>=<val>
1130+
Params: interrupt GPIO used for interrupt (default 4)
1131+
sizex Touchscreen size x, horizontal resolution of
1132+
touchscreen (in pixels)
1133+
sizey Touchscreen size y, vertical resolution of
1134+
touchscreen (in pixels)
1135+
1136+
11261137
Name: iqaudio-dac
11271138
Info: Configures the IQaudio DAC audio card
11281139
Load: dtoverlay=iqaudio-dac,<param>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Device tree overlay for I2C connected Ilitek multiple touch controller
2+
/dts-v1/;
3+
/plugin/;
4+
5+
/ {
6+
compatible = "brcm,bcm2708";
7+
8+
fragment@0 {
9+
target = <&gpio>;
10+
__overlay__ {
11+
ili251x_pins: ili251x_pins {
12+
brcm,pins = <4>; // interrupt
13+
brcm,function = <0>; // in
14+
brcm,pull = <2>; // pull-up //
15+
};
16+
};
17+
};
18+
19+
fragment@1 {
20+
target = <&i2c1>;
21+
__overlay__ {
22+
#address-cells = <1>;
23+
#size-cells = <0>;
24+
status = "okay";
25+
26+
ili251x: ili251x@41 {
27+
compatible = "ilitek,ili251x";
28+
reg = <0x41>;
29+
pinctrl-names = "default";
30+
pinctrl-0 = <&ili251x_pins>;
31+
interrupt-parent = <&gpio>;
32+
interrupts = <4 8>; // high-to-low edge triggered
33+
touchscreen-size-x = <16384>;
34+
touchscreen-size-y = <9600>;
35+
};
36+
};
37+
};
38+
39+
__overrides__ {
40+
interrupt = <&ili251x_pins>,"brcm,pins:0",
41+
<&ili251x>,"interrupts:0";
42+
sizex = <&ili251x>,"touchscreen-size-x:0";
43+
sizey = <&ili251x>,"touchscreen-size-y:0";
44+
};
45+
};

0 commit comments

Comments
 (0)