ath79: fix nanobeam ac ethernet interface
[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 num-cs = <1>;
138
139 flash@0 {
140 compatible = "jedec,spi-nor";
141 reg = <0>;
142 spi-max-frequency = <25000000>;
143
144 partitions {
145 compatible = "fixed-partitions";
146 #address-cells = <1>;
147 #size-cells = <1>;
148
149 partition@0 {
150 label = "u-boot";
151 reg = <0x0 0x40000>;
152 read-only;
153 };
154
155 partition@40000 {
156 label = "u-boot-env";
157 reg = <0x40000 0x10000>;
158 };
159
160 partition@50000 {
161 label = "firmware";
162 reg = <0x50000 0x3a0000>;
163 compatible = "netgear,uimage";
164 };
165
166 art: partition@3f0000 {
167 label = "art";
168 reg = <0x3f0000 0x10000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &eth0 {
176 mtd-mac-address = <&art 0x0>;
177 };
178
179 &eth1 {
180 status = "okay";
181
182 mtd-mac-address = <&art 0x6>;
183 };
184
185 &pcie {
186 status = "okay";
187
188 ath9k: wifi@0,0 {
189 compatible = "pci168c,002b";
190 reg = <0x0000 0 0 0 0>;
191 mtd-mac-address = <&art 0x0>;
192 mtd-mac-address-increment = <1>;
193 qca,no-eeprom;
194 #gpio-cells = <2>;
195 gpio-controller;
196 };
197 };
198
199 &uart {
200 status = "okay";
201 };