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