apm821xx: dts: Unify naming of gpio-keys nodes
[openwrt/staging/chunkeey.git] / target / linux / apm821xx / dts / netgear-wndap6x0.dtsi
1 /*
2 * Device Tree Source for Netgear WNDAP620 and WNDAP660
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without
6 * any warranty of any kind, whether express or implied.
7 */
8
9 #include "apm82181.dtsi"
10
11 / {
12 aliases {
13 serial0 = &UART0;
14 led-boot = &status;
15 led-failsafe = &failsafe;
16 led-running = &status;
17 led-upgrade = &status;
18 };
19
20 chosen {
21 stdout-path = "/plb/opb/serial@ef600300";
22 };
23 };
24
25 &CRYPTO {
26 status = "okay";
27 };
28
29 &PKA {
30 status = "okay";
31 };
32
33 &TRNG {
34 status = "okay";
35 };
36
37 &EBC0 {
38 ndfc@1,0 {
39 status = "okay";
40 /* 32 MiB SLC NAND Flash */
41 nand {
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 partition@0 {
46 label = "u-boot";
47 reg = <0x00000000 0x00100000>;
48 read-only;
49 };
50
51 partition@100000 {
52 label = "u-boot-env";
53 reg = <0x00100000 0x00010000>;
54 read-only;
55 };
56
57 partition@110000,0 {
58 label = "firmware";
59 reg = <0x00110000 0x01ac0000>;
60 };
61
62 partition@110000,1 {
63 /*
64 * The u-boot bootloader will look at this
65 * offset (0x110000) for an uImage binary.
66 */
67 label = "kernel";
68 reg = <0x00110000 0x003f0000>;
69 };
70
71 partition@500000 {
72 label = "ubi";
73 reg = <0x00500000 0x016d0000>;
74 };
75
76 partition@1bd0000 {
77 /*
78 * original vendor device-tree - do not use or
79 * overwrite. The original u-boot also supports
80 * the gzipped legacy monolithic/Multi-File Image
81 * format, which is a better choice.
82 */
83 label = "device-tree";
84 reg = <0x01bd0000 0x0010000>;
85 read-only;
86 };
87
88 partition@1be0000 {
89 label = "var";
90 reg = <0x01be0000 0x0400000>;
91 read-only;
92 };
93
94 partition@1fe0000 {
95 label = "manudata";
96 reg = <0x01fe0000 0x20000 >;
97 read-only;
98 };
99 };
100 };
101 };
102
103 &UART0 {
104 status = "okay";
105 };
106
107 &GPIO0 {
108 status = "okay";
109 };
110
111 &EMAC0 {
112 status = "okay";
113
114 fixed-link {
115 speed = <1000>;
116 full-duplex;
117 pause;
118 asym-pause;
119 };
120
121 mdio0: mdio {
122 #address-cells = <1>;
123 #size-cells = <0>;
124 };
125 };
126
127 &POB0 {
128 keys {
129 compatible = "gpio-keys-polled";
130 #address-cells = <1>;
131 #size-cells = <0>;
132 #interrupt-cells = <2>;
133 poll-interval = <60>; /* 3 * 20 = 60ms */
134 autorepeat;
135
136 reset {
137 label = "Reset Button";
138 gpios = <&GPIO0 16 GPIO_ACTIVE_HIGH>;
139 linux,code = <KEY_RESTART>;
140 interrupt-parent = <&UIC1>;
141 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
142 };
143 };
144
145 LEDS: gpio-leds {
146 compatible = "gpio-leds";
147
148 status: power {
149 label = "wndap6x0:green:power";
150 gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
151 };
152
153 failsafe: test {
154 label = "wndap6x0:amber:test";
155 gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
156 panic-indicator;
157 };
158
159 activity {
160 label = "wndap6x0:green:activity";
161 gpios = <&GPIO0 21 GPIO_ACTIVE_HIGH>;
162 };
163
164 wlan2g {
165 label = "wndap6x0:green:wlan2g";
166 gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
167 };
168
169 wlan5g {
170 label = "wndap6x0:green:wlan5g";
171 gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
172 };
173 };
174
175 gpio-export {
176 compatible = "gpio-export";
177
178 internal-antenna {
179 gpio-export,name = "wndap6x0:internal-antenna";
180 gpio-export,output = <1>;
181 gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
182 };
183
184 external-antenna {
185 gpio-export,name = "wndap6x0:external-antenna";
186 gpio-export,output = <0>;
187 gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
188 };
189
190 mains-powered {
191 /*
192 * Input pin describing what powers the AP
193 * 0/Low = PoE
194 * 1/High = 12v mains powered
195 */
196 gpio-export,name = "wndap620:mains-powered";
197 gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
198 };
199 };
200
201 rtl8367b {
202 compatible = "realtek,rtl8367b";
203 cpu_port = <5>;
204 realtek,extif0 = <1 2 1 1 1 1 1 1 2>;
205 mii-bus = <&mdio0>;
206 };
207 };
208
209 &PCIE0 {
210 status = "okay";
211 };
212
213 &MSI {
214 status = "okay";
215 };
216
217 &IIC0 {
218 status = "okay";
219
220 at24@52 {
221 compatible = "atmel,24c04";
222 reg = <0x52>;
223 pagesize = <16>;
224 read-only;
225 };
226 };
227