ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_atheros_db120.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
9
10 / {
11 model = "Atheros DB120 reference board";
12 compatible = "atheros,db120", "qca,ar9344";
13
14 aliases {
15 led-boot = &led_system;
16 led-failsafe = &led_system;
17 led-running = &led_system;
18 led-upgrade = &led_system;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wlan2g {
25 label = "green:wlan2g";
26 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 wlan5g {
31 label = "green:wlan5g";
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "phy1tpt";
34 };
35
36 led_system: system {
37 label = "green:system";
38 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 usb {
43 function = LED_FUNCTION_USB;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
46 trigger-sources = <&hub_port>;
47 linux,default-trigger = "usbport";
48 };
49 };
50
51 leds-ath9k {
52 compatible = "gpio-leds";
53
54 wlan5g-ath {
55 label = "green:wlan5g-ath";
56 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy1tpt";
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 wps {
65 linux,code = <KEY_WPS_BUTTON>;
66 label = "WPS button";
67 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70 };
71
72 virtual_flash {
73 compatible = "mtd-concat";
74 devices = <&fwconcat0 &fwconcat1>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 reg = <0x0 0x0>;
83 label = "firmware";
84 compatible = "openwrt,uimage", "denx,uimage";
85 openwrt,ih-magic = <IH_MAGIC_OKLI>;
86 };
87 };
88 };
89 };
90
91 &ref {
92 clock-frequency = <40000000>;
93 };
94
95 &spi {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <25000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 uboot: partition@0 {
109 label = "u-boot";
110 reg = <0x000000 0x040000>;
111 read-only;
112 };
113
114 partition@40000 {
115 label = "u-boot-env";
116 reg = <0x040000 0x010000>;
117 read-only;
118 };
119
120 fwconcat0: partition@50000 {
121 label = "fwconcat0";
122 reg = <0x050000 0x630000>;
123 };
124
125 partition@680000 {
126 label = "loader";
127 reg = <0x680000 0x010000>;
128 };
129
130 fwconcat1: partition@690000 {
131 label = "fwconcat1";
132 reg = <0x690000 0x150000>;
133 };
134
135 partition@7e0000 {
136 label = "nvram";
137 reg = <0x7e0000 0x010000>;
138 };
139
140 partition@7f0000 {
141 label = "art";
142 reg = <0x7f0000 0x010000>;
143 read-only;
144
145 nvmem-layout {
146 compatible = "fixed-layout";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 macaddr_art_0: macaddr@0 {
151 reg = <0x0 0x6>;
152 };
153
154 macaddr_art_6: macaddr@6 {
155 reg = <0x6 0x6>;
156 };
157
158 calibration_art_1000: calibration@1000 {
159 reg = <0x1000 0x440>;
160 };
161
162 calibration_art_5000: calibration@5000 {
163 reg = <0x5000 0x440>;
164 };
165 };
166 };
167 };
168 };
169 };
170
171 &eth0 {
172 status = "okay";
173
174 pll-data = <0x06000000 0x00000101 0x00001616>;
175
176 nvmem-cells = <&macaddr_art_0>;
177 nvmem-cell-names = "mac-address";
178
179 phy-mode = "rgmii";
180 phy-handle = <&phy0>;
181 };
182
183 &mdio0 {
184 status = "okay";
185
186 phy0: ethernet-phy@0 {
187 reg = <0>;
188
189 qca,ar8327-initvals = <
190 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
191 0x10 0xc1000000 /* POWER_ON_STRAP */
192 0x7c 0x0000007e /* PORT0_STATUS */
193 0x94 0x0000007e /* PORT6_STATUS */
194 >;
195 };
196 };
197
198 &pinmux {
199 pmx_led_wan_lan: pinmux_led_wan_lan {
200 pinctrl-single,bits = <0x10 0x2c2d0000 0xffff0000>,
201 <0x14 0x292a2b 0xffffff>;
202 };
203 };
204
205 &builtin_switch {
206 pinctrl-names = "default";
207 pinctrl-0 = <&pmx_led_wan_lan>;
208
209 /delete-property/qca,phy4-mii-enable;
210 };
211
212 &eth1 {
213 status = "okay";
214
215 nvmem-cells = <&macaddr_art_6>;
216 nvmem-cell-names = "mac-address";
217
218 gmac-config {
219 device = <&gmac>;
220 switch-phy-swap = <0>;
221 switch-only-mode = <1>;
222 };
223 };
224
225 &pcie {
226 status = "okay";
227
228 ath9k: wifi@0,0 {
229 compatible = "pci168c,0030";
230 reg = <0x0000 0 0 0 0>;
231 nvmem-cells = <&calibration_art_5000>;
232 nvmem-cell-names = "calibration";
233 ieee80211-freq-limit = <4900000 5990000>;
234 #gpio-cells = <2>;
235 gpio-controller;
236 };
237 };
238
239 &wmac {
240 status = "okay";
241
242 nvmem-cells = <&calibration_art_1000>;
243 nvmem-cell-names = "calibration";
244 };
245
246 &usb {
247 status = "okay";
248 };
249
250 &usb_phy {
251 status = "okay";
252 };