ath79: fix WNDR3800 support
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_netgear_wndr3800.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 "ar7100.dtsi"
8
9 / {
10 compatible = "netgear,wndr3800", "qca,ar7161";
11 model = "Netgear WNDR3800";
12
13 aliases {
14 led-status = &power_green;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 memory@0 {
22 device_type = "memory";
23 reg = <0x0 0x8000000>;
24 };
25
26 extosc: ref {
27 compatible = "fixed-clock";
28 #clock-cells = <0>;
29 clock-output-names = "ref";
30 clock-frequency = <40000000>;
31 };
32
33 reset-leds {
34 compatible = "reset-leds";
35
36 usb_led {
37 label = "netgear:green:usb";
38 resets = <&rst 12>;
39 trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
40 linux,default-trigger = "usbport";
41 };
42 };
43
44 gpio-leds {
45 compatible = "gpio-leds";
46
47 wps {
48 label = "netgear:orange:wps";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 default-state = "off";
51 };
52
53 power_green: power_green {
54 label = "netgear:green:power";
55 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
56 default-state = "off";
57 };
58
59 power_orange {
60 label = "netgear:orange:power";
61 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
62 default-state = "off";
63 };
64
65 wps_green {
66 label = "netgear:green:wps";
67 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
68 default-state = "off";
69 };
70
71 wan_green {
72 label = "netgear:green:wan";
73 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
74 default-state = "off";
75 };
76 };
77
78 gpio-keys-polled {
79 compatible = "gpio-keys-polled";
80 #address-cells = <1>;
81 #size-cells = <0>;
82 poll-interval = <100>;
83
84 wps {
85 label = "wps";
86 linux,code = <KEY_WPS_BUTTON>;
87 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
88 };
89
90 reset {
91 label = "reset";
92 linux,code = <KEY_RESTART>;
93 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
94 };
95
96 rfkill {
97 label = "rfkill";
98 linux,code = <KEY_RFKILL>;
99 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
100 };
101 };
102
103 rtl8366s {
104 compatible = "realtek,rtl8366s";
105 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
106 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
107
108 mdio-bus {
109 status = "okay";
110
111 phy-mask = <0x10>;
112
113 phy4: ethernet-phy@4 {
114 reg = <4>;
115 phy-mode = "rgmii";
116 };
117 };
118 };
119 };
120
121 &usb_phy {
122 status = "okay";
123 };
124
125 &usb1 {
126 status = "okay";
127
128 usb_ochi_port: port@1 {
129 reg = <1>;
130 #trigger-source-cells = <0>;
131 };
132 };
133
134 &usb2 {
135 status = "okay";
136
137 usb_echi_port: port@1 {
138 reg = <1>;
139 #trigger-source-cells = <0>;
140 };
141 };
142
143 &pcie0 {
144 status = "okay";
145 };
146
147 &uart {
148 status = "okay";
149 };
150
151 &spi {
152 status = "okay";
153 num-cs = <1>;
154
155 flash@0 {
156 #address-cells = <1>;
157 #size-cells = <1>;
158 compatible = "mx25l12805d";
159 reg = <0>;
160 spi-max-frequency = <25000000>;
161
162 partitions {
163 compatible = "fixed-partitions";
164 #address-cells = <1>;
165 #size-cells = <1>;
166
167 partition@0 {
168 label = "u-boot";
169 reg = <0x000000 0x050000>;
170 read-only;
171 };
172
173 partition@1 {
174 label = "u-boot-env";
175 reg = <0x050000 0x020000>;
176 read-only;
177 };
178
179 partition@2 {
180 label = "firmware";
181 reg = <0x070000 0xf80000>;
182 };
183
184 art: partition@3 {
185 label = "art";
186 reg = <0xff0000 0x010000>;
187 read-only;
188 };
189 };
190 };
191 };
192
193 &eth0 {
194 status = "okay";
195
196 pll-data = <0x11110000 0x00001099 0x00991099>;
197
198 mtd-mac-address = <&art 0x00>;
199
200 fixed-link {
201 speed = <1000>;
202 full-duplex;
203 };
204 };
205
206 &eth1 {
207 status = "okay";
208
209 pll-data = <0x11110000 0x00001099 0x00991099>;
210
211 mtd-mac-address = <&art 0x06>;
212
213 resets = <&rst 13>;
214 reset-names = "mac";
215
216 phy-handle = <&phy4>;
217 };