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