kernel: backport of_request_module()
[openwrt/staging/dedeckeh.git] / target / linux / bcm27xx / patches-5.15 / 950-0648-overlays-Add-overlay-for-Azoteq-IQS550.patch
1 From 7c9c2e970b0a047ae2a747752fdd12e31dbb2451 Mon Sep 17 00:00:00 2001
2 From: Jeff LaBundy <jeff@labundy.com>
3 Date: Mon, 28 Jan 2019 23:11:47 -0600
4 Subject: [PATCH] overlays: Add overlay for Azoteq IQS550
5
6 This patch adds a device tree overlay for the Azoteq IQS550
7 trackpad/touchscreen controller.
8
9 Signed-off-by: Jeff LaBundy <jeff@labundy.com>
10 ---
11 arch/arm/boot/dts/overlays/Makefile | 1 +
12 arch/arm/boot/dts/overlays/README | 13 ++++++
13 arch/arm/boot/dts/overlays/iqs550-overlay.dts | 46 +++++++++++++++++++
14 3 files changed, 60 insertions(+)
15 create mode 100644 arch/arm/boot/dts/overlays/iqs550-overlay.dts
16
17 --- a/arch/arm/boot/dts/overlays/Makefile
18 +++ b/arch/arm/boot/dts/overlays/Makefile
19 @@ -106,6 +106,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
20 iqaudio-dac.dtbo \
21 iqaudio-dacplus.dtbo \
22 iqaudio-digi-wm8804-audio.dtbo \
23 + iqs550.dtbo \
24 irs1125.dtbo \
25 jedec-spi-nor.dtbo \
26 justboom-both.dtbo \
27 --- a/arch/arm/boot/dts/overlays/README
28 +++ b/arch/arm/boot/dts/overlays/README
29 @@ -1991,6 +1991,19 @@ Params: card_name Override
30 dai stream name.
31
32
33 +Name: iqs550
34 +Info: Enables I2C connected Azoteq IQS550 trackpad/touchscreen controller
35 + using GPIO 4 (pin 7 on GPIO header) for interrupt.
36 +Load: dtoverlay=iqs550,<param>=<val>
37 +Params: interrupt GPIO used for interrupt (default 4)
38 + reset GPIO used for reset (optional)
39 + sizex Touchscreen size x (default 800)
40 + sizey Touchscreen size y (default 480)
41 + invx Touchscreen inverted x axis
42 + invy Touchscreen inverted y axis
43 + swapxy Touchscreen swapped x y axis
44 +
45 +
46 Name: irs1125
47 Info: Infineon irs1125 TOF camera module.
48 Uses Unicam 1, which is the standard camera connector on most Pi
49 --- /dev/null
50 +++ b/arch/arm/boot/dts/overlays/iqs550-overlay.dts
51 @@ -0,0 +1,46 @@
52 +// SPDX-License-Identifier: GPL-2.0-or-later
53 +// Definitions for Azoteq IQS550 trackpad/touchscreen controller
54 +/dts-v1/;
55 +/plugin/;
56 +#include <dt-bindings/gpio/gpio.h>
57 +#include <dt-bindings/interrupt-controller/irq.h>
58 +
59 +/ {
60 + compatible = "brcm,bcm2835";
61 +
62 + fragment@0 {
63 + target = <&i2c1>;
64 + __overlay__ {
65 + #address-cells = <1>;
66 + #size-cells = <0>;
67 + status = "okay";
68 +
69 + iqs550: iqs550@74 {
70 + compatible = "azoteq,iqs550";
71 + reg = <0x74>;
72 + interrupt-parent = <&gpio>;
73 + interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
74 + touchscreen-size-x = <800>;
75 + touchscreen-size-y = <480>;
76 + };
77 + };
78 + };
79 +
80 + fragment@1 {
81 + target = <&iqs550>;
82 + iqs550_reset: __dormant__ {
83 + reset-gpios = <&gpio 255 (GPIO_ACTIVE_LOW |
84 + GPIO_PUSH_PULL)>;
85 + };
86 + };
87 +
88 + __overrides__ {
89 + interrupt = <&iqs550>,"interrupts:0";
90 + reset = <0>,"+1", <&iqs550_reset>,"reset-gpios:4";
91 + sizex = <&iqs550>,"touchscreen-size-x:0";
92 + sizey = <&iqs550>,"touchscreen-size-y:0";
93 + invx = <&iqs550>,"touchscreen-inverted-x?";
94 + invy = <&iqs550>,"touchscreen-inverted-y?";
95 + swapxy = <&iqs550>,"touchscreen-swapped-x-y?";
96 + };
97 +};