bcm53xx: backport BCM5301X patches from arm-soc.git next/dt
[oweals/openwrt.git] / target / linux / bcm53xx / patches-3.18 / 047-ARM-BCM5301X-Add-buttons-for-Netgear-R6250.patch
1 From f6f8234439737171e571a41264280e844a429699 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Sun, 30 Nov 2014 18:28:29 +0100
4 Subject: [PATCH] ARM: BCM5301X: Add buttons for Netgear R6250
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 ---
12  arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 25 +++++++++++++++++++++++++
13  arch/arm/boot/dts/bcm5301x.dtsi             |  1 +
14  2 files changed, 26 insertions(+)
15
16 diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
17 index 58d999d..4ed7de1 100644
18 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
19 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
20 @@ -66,4 +66,29 @@
21                         linux,default-trigger = "default-off";
22                 };
23         };
24 +
25 +       gpio-keys {
26 +               compatible = "gpio-keys";
27 +               #address-cells = <1>;
28 +               #size-cells = <0>;
29 +               poll-interval = <200>;
30 +
31 +               wps {
32 +                       label = "WPS";
33 +                       linux,code = <KEY_WPS_BUTTON>;
34 +                       gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
35 +               };
36 +
37 +               rfkill {
38 +                       label = "WiFi";
39 +                       linux,code = <KEY_RFKILL>;
40 +                       gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
41 +               };
42 +
43 +               restart {
44 +                       label = "Reset";
45 +                       linux,code = <KEY_RESTART>;
46 +                       gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
47 +               };
48 +       };
49  };
50 diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
51 index b7c4e9e..78aec62 100644
52 --- a/arch/arm/boot/dts/bcm5301x.dtsi
53 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
54 @@ -9,6 +9,7 @@
55   */
56  
57  #include <dt-bindings/gpio/gpio.h>
58 +#include <dt-bindings/input/input.h>
59  #include <dt-bindings/interrupt-controller/irq.h>
60  #include <dt-bindings/interrupt-controller/arm-gic.h>
61  #include "skeleton.dtsi"
62 -- 
63 1.8.4.5
64