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