brcm2708: add linux 4.19 support
[oweals/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0176-overlays-Add-gpio-no-bank0-irq-overlay.patch
1 From deb8928a66ab048325b52a00c36bd8a69cd63bea Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 18 Jul 2018 17:25:00 +0100
4 Subject: [PATCH 176/703] overlays: Add gpio-no-bank0-irq overlay
5
6 See: https://github.com/raspberrypi/linux/issues/2590
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
9 ---
10  arch/arm/boot/dts/overlays/Makefile                |  1 +
11  arch/arm/boot/dts/overlays/README                  |  9 +++++++++
12  .../dts/overlays/gpio-no-bank0-irq-overlay.dts     | 14 ++++++++++++++
13  3 files changed, 24 insertions(+)
14  create mode 100755 arch/arm/boot/dts/overlays/gpio-no-bank0-irq-overlay.dts
15
16 --- a/arch/arm/boot/dts/overlays/Makefile
17 +++ b/arch/arm/boot/dts/overlays/Makefile
18 @@ -37,6 +37,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
19         gpio-ir.dtbo \
20         gpio-ir-tx.dtbo \
21         gpio-key.dtbo \
22 +       gpio-no-bank0-irq.dtbo \
23         gpio-no-irq.dtbo \
24         gpio-poweroff.dtbo \
25         gpio-shutdown.dtbo \
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -597,6 +597,15 @@ Params: gpio                    GPIO pin
29          keycode                 Set the key code for the button
30  
31  
32 +Name:   gpio-no-bank0-irq
33 +Info:   Use this overlay to disable GPIO interrupts for GPIOs in bank 0 (0-27),
34 +        which can be useful for UIO drivers.
35 +        N.B. Using this overlay will trigger a kernel WARN during booting, but
36 +        this can safely be ignored - the system should work as expected.
37 +Load:   dtoverlay=gpio-no-bank0-irq
38 +Params: <None>
39 +
40 +
41  Name:   gpio-no-irq
42  Info:   Use this overlay to disable all GPIO interrupts, which can be useful
43          for user-space GPIO edge detection systems.
44 --- /dev/null
45 +++ b/arch/arm/boot/dts/overlays/gpio-no-bank0-irq-overlay.dts
46 @@ -0,0 +1,14 @@
47 +/dts-v1/;
48 +/plugin/;
49 +
50 +/ {
51 +       compatible = "brcm,bcm2835";
52 +
53 +       fragment@0 {
54 +               // Configure the gpio pin controller
55 +               target = <&gpio>;
56 +               __overlay__ {
57 +                           interrupts = <255 255>, <2 18>;
58 +               };
59 +       };
60 +};