ath79: fix dts of Teltonika RUT9xx devices
[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 /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 = &led_power_amber;
19 led-failsafe = &led_power_amber;
20 led-running = &led_power_green;
21 led-upgrade = &led_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 led_power_green: power_green {
120 label = "netgear:green:power";
121 gpios = <&ath9k 3 GPIO_ACTIVE_LOW>;
122 };
123
124 led_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
141 num-cs = <1>;
142
143 flash@0 {
144 compatible = "jedec,spi-nor";
145 reg = <0>;
146 spi-max-frequency = <25000000>;
147
148 partitions {
149 compatible = "fixed-partitions";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 partition@0 {
154 label = "u-boot";
155 reg = <0x0 0x40000>;
156 read-only;
157 };
158
159 partition@40000 {
160 label = "u-boot-env";
161 reg = <0x40000 0x10000>;
162 };
163
164 partition@50000 {
165 label = "firmware";
166 reg = <0x50000 0x3a0000>;
167 compatible = "netgear,uimage";
168 };
169
170 art: partition@3f0000 {
171 label = "art";
172 reg = <0x3f0000 0x10000>;
173 read-only;
174 };
175 };
176 };
177 };
178
179 &eth0 {
180 status = "okay";
181
182 mtd-mac-address = <&art 0x0>;
183 };
184
185 &eth1 {
186 status = "okay";
187
188 compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
189 mtd-mac-address = <&art 0x6>;
190 };
191
192 &pcie {
193 status = "okay";
194
195 ath9k: wifi@0,0 {
196 compatible = "pci168c,002e";
197 reg = <0x0000 0 0 0 0>;
198 mtd-mac-address = <&art 0x0>;
199 mtd-mac-address-increment = <1>;
200 qca,no-eeprom;
201 #gpio-cells = <2>;
202 gpio-controller;
203 };
204 };
205
206 &uart {
207 status = "okay";
208 };