ath79: WNR612v2: improve device support
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7240_netgear_wnr612-v2.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7240.dtsi"
8
9 / {
10         aliases {
11                 led-boot = &power;
12                 led-failsafe = &power;
13                 led-running = &power;
14                 led-upgrade = &power;
15                 label-mac-device = &eth1;
16         };
17
18         ath9k-keys {
19                 compatible = "gpio-keys-polled";
20                 poll-interval = <20>;
21
22                 reset {
23                         label = "reset";
24                         linux,code = <KEY_RESTART>;
25                         gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
26                         debounce-interval = <60>;
27                 };
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 pinctrl-names = "default";
34                 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
35
36                 power: power {
37                         label = "netgear:green:power";
38                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39                 };
40
41                 lan1 {
42                         label = "netgear:green:lan1";
43                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
44                 };
45
46                 lan2 {
47                         label = "netgear:green:lan2";
48                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
49                 };
50
51                 wan {
52                         label = "netgear:green:wan";
53                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
54                 };
55         };
56
57         ath9k-leds {
58                 compatible = "gpio-leds";
59
60                 wlan: wlan {
61                         label = "netgear:green:wlan";
62                         gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
63                         linux,default-trigger = "phy0tpt";
64                 };
65         };
66 };
67
68 &spi {
69         status = "okay";
70         num-cs = <1>;
71
72         flash@0 {
73                 compatible = "jedec,spi-nor";
74                 reg = <0>;
75                 spi-max-frequency = <25000000>;
76
77                 partitions {
78                         compatible = "fixed-partitions";
79                         #address-cells = <1>;
80                         #size-cells = <1>;
81
82                         partition@0 {
83                                 reg = <0x0 0x40000>;
84                                 label = "u-boot";
85                                 read-only;
86                         };
87
88                         partition@40000 {
89                                 reg = <0x40000 0x10000>;
90                                 label = "u-boot-env";
91                         };
92
93                         partition@50000 {
94                                 compatible = "netgear,uimage";
95                                 reg = <0x50000 0x3a0000>;
96                                 label = "firmware";
97                         };
98
99                         art: partition@3f0000 {
100                                 reg = <0x3f0000 0x10000>;
101                                 label = "art";
102                                 read-only;
103                         };
104                 };
105         };
106 };
107
108 &eth0 {
109         status = "okay";
110
111         mtd-mac-address = <&art 0x0>;
112 };
113
114 &eth1 {
115         status = "okay";
116
117         mtd-mac-address = <&art 0x6>;
118 };
119
120 &pcie {
121         status = "okay";
122
123         ath9k: wifi@0,0 {
124                 compatible = "pci168c,002b";
125                 reg = <0x0000 0 0 0 0>;
126                 mtd-mac-address = <&art 0x0>;
127                 mtd-mac-address-increment = <1>;
128                 qca,no-eeprom;
129                 #gpio-cells = <2>;
130                 gpio-controller;
131         };
132 };
133
134 &uart {
135         status = "okay";
136 };