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