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