mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
dtoverlays: Add overlay for Ilitek-ts-i2c driver (213X/23XX/25XX chips)
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
@@ -131,6 +131,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
|
||||
i2s-dac.dtbo \
|
||||
i2s-gpio28-31.dtbo \
|
||||
i2s-master-dac.dtbo \
|
||||
ilitek-ts-i2c.dtbo \
|
||||
ilitek251x.dtbo \
|
||||
imx219.dtbo \
|
||||
imx258.dtbo \
|
||||
|
||||
@@ -2778,6 +2778,17 @@ Load: dtoverlay=i2s-master-dac
|
||||
Params: <None>
|
||||
|
||||
|
||||
Name: ilitek-ts-i2c
|
||||
Info: Enables I2C connected Ilitek 23XX, 25XX, and 213X touch controllers
|
||||
using GPIO 4 (pin 7 on GPIO header) for interrupt.
|
||||
Load: dtoverlay=ilitek-ts-i2c,<param>=<val>
|
||||
Params: interrupt GPIO used for interrupt (default 4)
|
||||
invx Touchscreen inverted x axis
|
||||
invy Touchscreen inverted y axis
|
||||
swapxy Touchscreen swapped x y axis
|
||||
i2c-path Override I2C path to allow for i2c-gpio buses
|
||||
|
||||
|
||||
Name: ilitek251x
|
||||
Info: Enables I2C connected Ilitek 251x multiple touch controller using
|
||||
GPIO 4 (pin 7 on GPIO header) for interrupt.
|
||||
|
||||
62
arch/arm/boot/dts/overlays/ilitek-ts-i2c-overlay.dts
Normal file
62
arch/arm/boot/dts/overlays/ilitek-ts-i2c-overlay.dts
Normal file
@@ -0,0 +1,62 @@
|
||||
// Device tree overlay for I2C connected Ilitek multiple touch controller
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
ili2130_pins: ili2130_pins {
|
||||
brcm,pins = <4>; // interrupt
|
||||
brcm,function = <0>; // in
|
||||
brcm,pull = <2>; // pull-up
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
frag1: fragment@1 {
|
||||
target = <&i2c1>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ili2130: ili2130@41 {
|
||||
compatible = "ilitek,ili2130";
|
||||
reg = <0x41>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ili2130_pins>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&ili2130>;
|
||||
__overlay__ {
|
||||
touchscreen-inverted-x;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&ili2130>;
|
||||
__overlay__ {
|
||||
touchscreen-inverted-y;
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
interrupt = <&ili2130_pins>,"brcm,pins:0",
|
||||
<&ili2130>,"interrupts:0";
|
||||
i2c-path = <&frag1>, "target?=0",
|
||||
<&frag1>, "target-path";
|
||||
invx = <0>, "-2";
|
||||
invy = <0>, "-3";
|
||||
swapxy = <&ili2130>,"touchscreen-swapped-x-y?";
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user