ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar7161_dlink_dir-825-b1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "dlink,dir-825-b1", "qca,ar7161";
11 model = "D-Link DIR825B1";
12
13 aliases {
14 led-boot = &led_power_orange;
15 led-failsafe = &led_power_orange;
16 led-running = &led_power_blue;
17 led-upgrade = &led_power_orange;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 usb {
24 function = LED_FUNCTION_USB;
25 color = <LED_COLOR_ID_BLUE>;
26 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
28 linux,default-trigger = "usbport";
29 };
30
31 led_power_orange: power_orange {
32 function = LED_FUNCTION_POWER;
33 color = <LED_COLOR_ID_ORANGE>;
34 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
35 default-state = "on";
36 };
37
38 led_power_blue: power_blue {
39 function = LED_FUNCTION_POWER;
40 color = <LED_COLOR_ID_BLUE>;
41 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
42 };
43
44 wps {
45 function = LED_FUNCTION_WPS;
46 color = <LED_COLOR_ID_BLUE>;
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 };
49
50 planet_orange {
51 label = "orange:planet";
52 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
53 };
54
55 planet_blue {
56 label = "blue:planet";
57 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 ath9k-leds {
62 compatible = "gpio-leds";
63
64 wlan2g {
65 label = "blue:wlan2g";
66 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy0tpt";
68 };
69
70 wlan5g {
71 label = "blue:wlan5g";
72 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
73 linux,default-trigger = "phy1tpt";
74 };
75 };
76
77 keys {
78 compatible = "gpio-keys";
79
80 reset {
81 label = "reset";
82 linux,code = <KEY_RESTART>;
83 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
84 };
85
86 wps {
87 label = "wps";
88 linux,code = <KEY_WPS_BUTTON>;
89 gpios = <&gpio 8 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 realtek,initvals = <0x06 0x0108>;
98
99 mdio-bus {
100 #address-cells = <1>;
101 #size-cells = <0>;
102 status = "okay";
103
104 phy4: ethernet-phy@4 {
105 reg = <4>;
106 phy-mode = "rgmii";
107 };
108 };
109 };
110
111 virtual_flash {
112 compatible = "mtd-concat";
113 devices = <&fwconcat0 &fwconcat1>;
114
115 partitions {
116 compatible = "fixed-partitions";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 partition@0 {
121 compatible = "denx,uimage";
122 label = "firmware";
123 reg = <0x0 0x0>;
124 };
125 };
126 };
127 };
128
129 &usb1 {
130 status = "okay";
131 };
132
133 &usb2 {
134 status = "okay";
135 };
136
137 &usb_phy {
138 status = "okay";
139 };
140
141 &pcie0 {
142 status = "okay";
143
144 ath9k0: wifi@11,0 {
145 compatible = "pci168c,0029";
146 reg = <0x8800 0 0 0 0>;
147 nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
148 nvmem-cell-names = "mac-address", "calibration";
149 #gpio-cells = <2>;
150 gpio-controller;
151 };
152
153 ath9k1: wifi@12,0 {
154 compatible = "pci168c,0029";
155 reg = <0x9000 0 0 0 0>;
156 nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
157 nvmem-cell-names = "mac-address", "calibration";
158 #gpio-cells = <2>;
159 gpio-controller;
160 };
161 };
162
163 &spi {
164 status = "okay";
165
166 flash@0 {
167 compatible = "jedec,spi-nor";
168 reg = <0>;
169 spi-max-frequency = <25000000>;
170
171 partitions {
172 compatible = "fixed-partitions";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 partition@0 {
177 label = "u-boot";
178 reg = <0x000000 0x040000>;
179 read-only;
180 };
181
182 partition@40000 {
183 label = "config";
184 reg = <0x040000 0x010000>;
185 read-only;
186 };
187
188 fwconcat0: partition@50000 {
189 label = "fwconcat0";
190 reg = <0x050000 0x610000>;
191 };
192
193 partition@660000 {
194 label = "caldata";
195 reg = <0x660000 0x010000>;
196 read-only;
197
198 nvmem-layout {
199 compatible = "fixed-layout";
200 #address-cells = <1>;
201 #size-cells = <1>;
202
203 cal_art_1000: cal@1000 {
204 reg = <0x1000 0xeb8>;
205 };
206
207 cal_art_5000: cal@5000 {
208 reg = <0x5000 0xeb8>;
209 };
210
211 macaddr_lan: macaddr@ffa0 {
212 compatible = "mac-base";
213 reg = <0xffa0 0x11>;
214 #nvmem-cell-cells = <1>;
215 };
216
217 macaddr_wan: macaddr@ffb4 {
218 compatible = "mac-base";
219 reg = <0xffb4 0x11>;
220 #nvmem-cell-cells = <1>;
221 };
222 };
223 };
224
225 fwconcat1: partition@670000 {
226 label = "fwconcat1";
227 reg = <0x670000 0x190000>;
228 };
229 };
230 };
231 };
232
233 &eth0 {
234 status = "okay";
235
236 pll-data = <0x11110000 0x00001099 0x00991099>;
237
238 nvmem-cells = <&macaddr_lan 0>;
239 nvmem-cell-names = "mac-address";
240
241 fixed-link {
242 speed = <1000>;
243 full-duplex;
244 };
245 };
246
247 &eth1 {
248 status = "okay";
249
250 pll-data = <0x11110000 0x00001099 0x00991099>;
251
252 nvmem-cells = <&macaddr_wan 0>;
253 nvmem-cell-names = "mac-address";
254
255 phy-handle = <&phy4>;
256 };
257