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