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