60102b03aba2c32474a8ef36fea38d4fe4b77f9f
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / ar7161_netgear_wndr3800.dts
1 // SPDX-License-Identifier: GPL-2.0
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 memory@0 {
14 device_type = "memory";
15 reg = <0x0 0x8000000>;
16 };
17
18 extosc: ref {
19 compatible = "fixed-clock";
20 #clock-cells = <0>;
21 clock-output-names = "ref";
22 clock-frequency = <40000000>;
23 };
24
25 reset-leds {
26 compatible = "reset-leds";
27
28 wps {
29 label = "netgear:green:usb";
30 resets = <&rst 12>;
31 };
32 };
33
34 gpio-leds {
35 compatible = "gpio-leds";
36
37 wps {
38 label = "netgear:orange:wps";
39 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
40 default-state = "off";
41 };
42
43 power_green {
44 label = "netgear:green:power";
45 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
46 default-state = "off";
47 };
48
49 power_orange {
50 label = "netgear:orange:power";
51 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
52 default-state = "off";
53 };
54
55 wps_green {
56 label = "netgear:green:wps";
57 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
58 default-state = "off";
59 };
60
61 wan_green {
62 label = "netgear:green:wan";
63 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
64 default-state = "off";
65 };
66 };
67
68 gpio-keys-polled {
69 compatible = "gpio-keys-polled";
70 #address-cells = <1>;
71 #size-cells = <0>;
72 poll-interval = <100>;
73
74 button@0 {
75 label = "wps";
76 linux,code = <KEY_WPS_BUTTON>;
77 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
78 };
79
80 button@1 {
81 label = "reset";
82 linux,code = <KEY_RESTART>;
83 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
84 };
85
86 button@2 {
87 label = "wifi";
88 linux,code = <BTN_2>;
89 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
90 };
91 };
92
93 rtl8366s {
94 compatible = "realtek,rtl8366s";
95 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
96 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
97
98 mdio-bus {
99 status = "okay";
100
101 phy-mask = <0x10>;
102
103 phy4: ethernet-phy@4 {
104 reg = <4>;
105 phy-mode = "rgmii";
106 };
107 };
108 };
109 };
110
111 &usb_phy {
112 status = "okay";
113 };
114
115 &usb1 {
116 status = "okay";
117 };
118
119 &usb2 {
120 status = "okay";
121 };
122
123 &pcie0 {
124 status = "okay";
125 };
126
127 &uart {
128 status = "okay";
129 };
130
131 &spi {
132 status = "okay";
133 num-cs = <1>;
134
135 flash@0 {
136 #address-cells = <1>;
137 #size-cells = <1>;
138 compatible = "mx25l12805d";
139 reg = <0>;
140 spi-max-frequency = <25000000>;
141
142 partition@0 {
143 label = "u-boot";
144 reg = <0x000000 0x050000>;
145 read-only;
146 };
147
148 partition@1 {
149 label = "u-boot-env";
150 reg = <0x050000 0x020000>;
151 };
152
153 partition@2 {
154 label = "firmware";
155 reg = <0x70000 0xf80000>;
156 };
157
158 partition@3 {
159 label = "art";
160 reg = <0xff0000 0x010000>;
161 read-only;
162 };
163 };
164 };
165
166 &eth0 {
167 status = "okay";
168
169 pll-data = <0x11110000 0x00001099 0x00991099>;
170
171 fixed-link {
172 speed = <1000>;
173 full-duplex;
174 };
175 };
176
177 &eth1 {
178 status = "okay";
179
180 pll-data = <0x11110000 0x00001099 0x00991099>;
181
182 resets = <&rst 13>;
183 reset-names = "mac";
184
185 phy-handle = <&phy4>;
186 };