ath79: add support for Netgear WNR2000 v3
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7241_netgear_wnr2000-v3.dts
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 "ar7241.dtsi"
8
9 / {
10         compatible = "netgear,wnr2000-v3", "qca,ar7241";
11         model = "Netgear WNR2000 v3";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &power_amber;
19                 led-failsafe = &power_amber;
20                 led-running = &power_green;
21                 led-upgrade = &power_amber;
22                 label-mac-device = &eth1;
23         };
24
25         keys {
26                 compatible = "gpio-keys";
27
28                 wps {
29                         label = "wps";
30                         linux,code = <KEY_WPS_BUTTON>;
31                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
32                 };
33         };
34
35         ath9k-keys {
36                 compatible = "gpio-keys-polled";
37                 poll-interval = <20>;
38
39                 reset {
40                         label = "reset";
41                         linux,code = <KEY_RESTART>;
42                         gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
43                         debounce-interval = <60>;
44                 };
45
46                 rfkill {
47                         label = "rfkill";
48                         linux,code = <KEY_RFKILL>;
49                         gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
50                         debounce-interval = <60>;
51                 };
52         };
53
54         leds {
55                 compatible = "gpio-leds";
56
57                 pinctrl-names = "default";
58                 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
59
60                 wan_green {
61                         label = "netgear:green:wan";
62                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
63                 };
64
65                 wan_amber {
66                         label = "netgear:amber:wan";
67                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
68                 };
69
70                 lan1_green {
71                         label = "netgear:green:lan1";
72                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
73                 };
74
75                 lan1_amber {
76                         label = "netgear:amber:lan1";
77                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
78                 };
79
80                 lan2_green {
81                         label = "netgear:green:lan2";
82                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
83                 };
84
85                 lan2_amber {
86                         label = "netgear:amber:lan2";
87                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
88                 };
89
90                 lan3_green {
91                         label = "netgear:green:lan3";
92                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
93                 };
94
95                 lan3_amber {
96                         label = "netgear:amber:lan3";
97                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
98                 };
99
100                 lan4_green {
101                         label = "netgear:green:lan4";
102                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
103                 };
104
105                 lan4_amber {
106                         label = "netgear:amber:lan4";
107                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
108                 };
109
110                 wps_green {
111                         label = "netgear:green:wps";
112                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
113                 };
114         };
115
116         ath9k-leds {
117                 compatible = "gpio-leds";
118
119                 power_green: power_green {
120                         label = "netgear:green:power";
121                         gpios = <&ath9k 3 GPIO_ACTIVE_LOW>;
122                 };
123
124                 power_amber: power_amber {
125                         label = "netgear:amber:power";
126                         gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
127                         default-state = "keep";
128                 };
129
130                 wlan_blue {
131                         label = "netgear:blue:wlan";
132                         gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
133                         linux,default-trigger = "phy0tpt";
134                 };
135         };
136 };
137
138 &spi {
139         status = "okay";
140         num-cs = <1>;
141
142         flash@0 {
143                 compatible = "jedec,spi-nor";
144                 reg = <0>;
145                 spi-max-frequency = <25000000>;
146
147                 partitions {
148                         compatible = "fixed-partitions";
149                         #address-cells = <1>;
150                         #size-cells = <1>;
151
152                         partition@0 {
153                                 label = "u-boot";
154                                 reg = <0x0 0x40000>;
155                                 read-only;
156                         };
157
158                         partition@40000 {
159                                 label = "u-boot-env";
160                                 reg = <0x40000 0x10000>;
161                         };
162
163                         partition@50000 {
164                                 label = "firmware";
165                                 reg = <0x50000 0x3a0000>;
166                                 compatible = "netgear,uimage";
167                         };
168
169                         art: partition@3f0000 {
170                                 label = "art";
171                                 reg = <0x3f0000 0x10000>;
172                                 read-only;
173                         };
174                 };
175         };
176 };
177
178 &eth0 {
179         status = "okay";
180
181         mtd-mac-address = <&art 0x0>;
182 };
183
184 &eth1 {
185         status = "okay";
186
187         compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
188         mtd-mac-address = <&art 0x6>;
189 };
190
191 &pcie {
192         status = "okay";
193
194         ath9k: wifi@0,0 {
195                 compatible = "pci168c,002e";
196                 reg = <0x0000 0 0 0 0>;
197                 mtd-mac-address = <&art 0x0>;
198                 mtd-mac-address-increment = <1>;
199                 qca,no-eeprom;
200                 #gpio-cells = <2>;
201                 gpio-controller;
202         };
203 };
204
205 &uart {
206         status = "okay";
207 };