ar71xx: Add support for ath79_gpio_function_* on QCA955X
[openwrt.git] / target / linux / bcm53xx / patches-4.3 / 082-ARM-BCM5301X-Add-DT-for-Netgear-R7000.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Wed, 26 Aug 2015 16:11:38 +0200
3 Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7000
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
9 ---
10 --- a/arch/arm/boot/dts/Makefile
11 +++ b/arch/arm/boot/dts/Makefile
12 @@ -72,6 +72,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
13         bcm47081-buffalo-wzr-900dhp.dtb \
14         bcm4709-asus-rt-ac87u.dtb \
15         bcm4709-buffalo-wxr-1900dhp.dtb \
16 +       bcm4709-netgear-r7000.dtb \
17         bcm4709-netgear-r8000.dtb
18  dtb-$(CONFIG_ARCH_BCM_63XX) += \
19         bcm963138dvt.dtb
20 --- /dev/null
21 +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
22 @@ -0,0 +1,106 @@
23 +/*
24 + * Broadcom BCM470X / BCM5301X ARM platform code.
25 + * DTS for Netgear R7000
26 + *
27 + * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
28 + *
29 + * Licensed under the GNU/GPL. See COPYING for details.
30 + */
31 +
32 +/dts-v1/;
33 +
34 +#include "bcm4708.dtsi"
35 +#include "bcm5301x-nand-cs0-bch8.dtsi"
36 +
37 +/ {
38 +       compatible = "netgear,r7000", "brcm,bcm4709", "brcm,bcm4708";
39 +       model = "Netgear R7000";
40 +
41 +       chosen {
42 +               bootargs = "console=ttyS0,115200";
43 +       };
44 +
45 +       memory {
46 +               reg = <0x00000000 0x08000000>;
47 +       };
48 +
49 +       leds {
50 +               compatible = "gpio-leds";
51 +
52 +               power-white {
53 +                       label = "bcm53xx:white:power";
54 +                       gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
55 +                       linux,default-trigger = "default-on";
56 +               };
57 +
58 +               power-amber {
59 +                       label = "bcm53xx:amber:power";
60 +                       gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
61 +                       linux,default-trigger = "default-off";
62 +               };
63 +
64 +               5ghz {
65 +                       label = "bcm53xx:white:5ghz";
66 +                       gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
67 +                       linux,default-trigger = "default-off";
68 +               };
69 +
70 +               2ghz {
71 +                       label = "bcm53xx:white:2ghz";
72 +                       gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
73 +                       linux,default-trigger = "default-off";
74 +               };
75 +
76 +               wps {
77 +                       label = "bcm53xx:white:wps";
78 +                       gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
79 +                       linux,default-trigger = "default-off";
80 +               };
81 +
82 +               wireless {
83 +                       label = "bcm53xx:white:wireless";
84 +                       gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
85 +                       linux,default-trigger = "default-off";
86 +               };
87 +
88 +               usb3 {
89 +                       label = "bcm53xx:white:usb3";
90 +                       gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
91 +                       linux,default-trigger = "default-off";
92 +               };
93 +
94 +               usb2 {
95 +                       label = "bcm53xx:white:usb2";
96 +                       gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
97 +                       linux,default-trigger = "default-off";
98 +               };
99 +       };
100 +
101 +       gpio-keys {
102 +               compatible = "gpio-keys";
103 +               #address-cells = <1>;
104 +               #size-cells = <0>;
105 +
106 +               wps {
107 +                       label = "WPS";
108 +                       linux,code = <KEY_WPS_BUTTON>;
109 +                       gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
110 +               };
111 +
112 +               rfkill {
113 +                       label = "WiFi";
114 +                       linux,code = <KEY_RFKILL>;
115 +                       gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
116 +               };
117 +
118 +               restart {
119 +                       label = "Reset";
120 +                       linux,code = <KEY_RESTART>;
121 +                       gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
122 +               };
123 +       };
124 +};
125 +
126 +&uart0 {
127 +       status = "okay";
128 +};