ipq806x: add missing wakeup-source for gpio keys
[openwrt/staging/zorun.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
1 #include "qcom-ipq8065.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "ZyXEL NBG6817";
7 compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 aliases {
15 mdio-gpio0 = &mdio0;
16 sdcc1 = &sdcc1;
17
18 led-boot = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 chosen {
25 bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
26 append-rootblock = "root=/dev/mmcblk0p";
27 };
28
29 keys {
30 compatible = "gpio-keys";
31 pinctrl-0 = <&button_pins>;
32 pinctrl-names = "default";
33
34 wifi {
35 label = "wifi";
36 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 linux,input-type = <EV_SW>;
39 debounce-interval = <60>;
40 wakeup-source;
41 };
42
43 reset {
44 label = "reset";
45 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 debounce-interval = <60>;
48 wakeup-source;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 debounce-interval = <60>;
56 wakeup-source;
57 };
58 };
59
60 leds {
61 compatible = "gpio-leds";
62 pinctrl-0 = <&led_pins>;
63 pinctrl-names = "default";
64
65 internet {
66 label = "white:internet";
67 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
68 };
69
70 power: power {
71 label = "white:power";
72 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
73 default-state = "keep";
74 };
75
76 wifi2g {
77 label = "amber:wifi2g";
78 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
79 };
80
81 /* wifi2g amber from the manual is missing */
82
83 wifi5g {
84 label = "amber:wifi5g";
85 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
86 };
87
88 /* wifi5g amber from the manual is missing */
89 };
90 };
91
92 &qcom_pinmux {
93 button_pins: button_pins {
94 mux {
95 pins = "gpio53", "gpio54", "gpio65";
96 function = "gpio";
97 drive-strength = <2>;
98 bias-pull-up;
99 };
100 };
101
102 led_pins: led_pins {
103 mux {
104 pins = "gpio9", "gpio26", "gpio33", "gpio64";
105 function = "gpio";
106 drive-strength = <2>;
107 bias-pull-down;
108 };
109 };
110
111 mdio0_pins: mdio0_pins {
112 clk {
113 pins = "gpio1";
114 input-disable;
115 };
116 };
117
118 rgmii2_pins: rgmii2_pins {
119 tx {
120 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
121 input-disable;
122 };
123 };
124
125 spi_pins: spi_pins {
126 cs {
127 pins = "gpio20";
128 drive-strength = <12>;
129 };
130 };
131
132 usb0_pwr_en_pins: usb0_pwr_en_pins {
133 mux {
134 pins = "gpio16", "gpio17";
135 function = "gpio";
136 drive-strength = <12>;
137 };
138
139 pwr {
140 pins = "gpio17";
141 bias-pull-down;
142 output-high;
143 };
144
145 ovc {
146 pins = "gpio16";
147 bias-pull-up;
148 };
149 };
150
151 usb1_pwr_en_pins: usb1_pwr_en_pins {
152 mux {
153 pins = "gpio14", "gpio15";
154 function = "gpio";
155 drive-strength = <12>;
156 };
157
158 pwr {
159 pins = "gpio14";
160 bias-pull-down;
161 output-high;
162 };
163
164 ovc {
165 pins = "gpio15";
166 bias-pull-up;
167 };
168 };
169 };
170
171 &gsbi5 {
172 qcom,mode = <GSBI_PROT_SPI>;
173 status = "okay";
174
175 spi4: spi@1a280000 {
176 status = "okay";
177
178 pinctrl-0 = <&spi_pins>;
179 pinctrl-names = "default";
180
181 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
182
183 m25p80@0 {
184 compatible = "jedec,spi-nor";
185 #address-cells = <1>;
186 #size-cells = <1>;
187 spi-max-frequency = <51200000>;
188 reg = <0>;
189
190 partitions {
191 compatible = "qcom,smem-part";
192 };
193 };
194 };
195 };
196
197 &usb3_0 {
198 status = "okay";
199
200 pinctrl-0 = <&usb0_pwr_en_pins>;
201 pinctrl-names = "default";
202 };
203
204 &usb3_1 {
205 status = "okay";
206
207 pinctrl-0 = <&usb1_pwr_en_pins>;
208 pinctrl-names = "default";
209 };
210
211 &pcie0 {
212 status = "okay";
213 reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
214 pinctrl-0 = <&pcie0_pins>;
215 pinctrl-names = "default";
216 };
217
218 &pcie1 {
219 status = "okay";
220 reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
221 pinctrl-0 = <&pcie1_pins>;
222 pinctrl-names = "default";
223 max-link-speed = <1>;
224 };
225
226 &mdio0 {
227 status = "okay";
228
229 pinctrl-0 = <&mdio0_pins>;
230 pinctrl-names = "default";
231
232
233 phy0: ethernet-phy@0 {
234 reg = <0>;
235 qca,ar8327-initvals = <
236 0x00004 0x7600000 /* PAD0_MODE */
237 0x00008 0x1000000 /* PAD5_MODE */
238 0x0000c 0x80 /* PAD6_MODE */
239 0x000e4 0xaa545 /* MAC_POWER_SEL */
240 0x000e0 0xc74164de /* SGMII_CTRL */
241 0x0007c 0x4e /* PORT0_STATUS */
242 0x00094 0x4e /* PORT6_STATUS */
243 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
244 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
245 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
246 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
247 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
248 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
249 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
250 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
251 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
252 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
253 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
254 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
255 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
256 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
257 >;
258 };
259
260 phy4: ethernet-phy@4 {
261 reg = <4>;
262 qca,ar8327-initvals = <
263 0x000e4 0x6a545 /* MAC_POWER_SEL */
264 0x0000c 0x80 /* PAD6_MODE */
265 >;
266 };
267 };
268
269 &gmac1 {
270 status = "okay";
271 phy-mode = "rgmii";
272 qcom,id = <1>;
273 qcom,phy_mdio_addr = <4>;
274 qcom,poll_required = <0>;
275 qcom,rgmii_delay = <1>;
276 qcom,phy_mii_type = <0>;
277 qcom,emulation = <0>;
278 qcom,irq = <255>;
279 mdiobus = <&mdio0>;
280
281 pinctrl-0 = <&rgmii2_pins>;
282 pinctrl-names = "default";
283
284 fixed-link {
285 speed = <1000>;
286 full-duplex;
287 };
288 };
289
290 &gmac2 {
291 status = "okay";
292 phy-mode = "sgmii";
293 qcom,id = <2>;
294 qcom,phy_mdio_addr = <0>; /* none */
295 qcom,poll_required = <0>; /* no polling */
296 qcom,rgmii_delay = <0>;
297 qcom,phy_mii_type = <1>;
298 qcom,emulation = <0>;
299 qcom,irq = <258>;
300 mdiobus = <&mdio0>;
301
302 fixed-link {
303 speed = <1000>;
304 full-duplex;
305 };
306 };
307
308 &amba {
309 sdcc1: sdcc@12400000 {
310 status = "okay";
311 };
312 };
313
314 &adm_dma {
315 status = "okay";
316 };