ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9331_tplink_tl-mr3020-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "ar9331.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 model = "TP-Link TL-MR3020 V1";
11 compatible = "tplink,tl-mr3020-v1", "qca,ar9331";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 label-mac-device = &eth0;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wlan {
25 function = LED_FUNCTION_WLAN;
26 color = <LED_COLOR_ID_GREEN>;
27 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
28 linux,default-trigger = "phy0tpt";
29 };
30
31 lan {
32 function = LED_FUNCTION_LAN;
33 color = <LED_COLOR_ID_GREEN>;
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 };
36
37 led_wps: wps {
38 function = LED_FUNCTION_WPS;
39 color = <LED_COLOR_ID_GREEN>;
40 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
41 };
42
43 led3g {
44 label = "green:3g";
45 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
46 trigger-sources = <&hub_port>;
47 linux,default-trigger = "usbport";
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 linux,code = <KEY_RESTART>;
57 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
58 debounce-interval = <60>;
59 };
60
61 sw1 {
62 label = "sw1";
63 linux,input-type = <EV_SW>;
64 linux,code = <BTN_0>;
65 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
66 debounce-interval = <60>;
67 };
68
69 sw2 {
70 label = "sw2";
71 linux,input-type = <EV_SW>;
72 linux,code = <BTN_1>;
73 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
74 debounce-interval = <60>;
75 };
76 };
77
78 reg_usb_vbus: reg_usb_vbus {
79 compatible = "regulator-fixed";
80 regulator-name = "usb_vbus";
81 regulator-min-microvolt = <5000000>;
82 regulator-max-microvolt = <5000000>;
83 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
84 enable-active-high;
85 };
86 };
87
88 &ref {
89 clock-frequency = <25000000>;
90 };
91
92 &usb {
93 dr_mode = "host";
94 vbus-supply = <&reg_usb_vbus>;
95 status = "okay";
96 };
97
98 &usb_phy {
99 status = "okay";
100 };
101
102 &spi {
103 status = "okay";
104
105 /* Spansion S25FL032PIF SPI flash */
106 flash@0 {
107 compatible = "jedec,spi-nor";
108 spi-max-frequency = <50000000>;
109 reg = <0>;
110
111 partitions {
112 compatible = "fixed-partitions";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 uboot: partition@0 {
117 label = "u-boot";
118 reg = <0x000000 0x020000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 macaddr_uboot_1fc00: macaddr@1fc00 {
127 reg = <0x1fc00 0x6>;
128 };
129 };
130 };
131
132 partition@20000 {
133 compatible = "tplink,firmware";
134 label = "firmware";
135 reg = <0x020000 0x3c0000>;
136 };
137
138 partition@3e0000 {
139 label = "config";
140 reg = <0x3e0000 0x010000>;
141 read-only;
142 };
143
144 art: partition@3f0000 {
145 label = "art";
146 reg = <0x3f0000 0x010000>;
147 read-only;
148 };
149 };
150 };
151 };
152
153 &eth0 {
154 status = "okay";
155
156 nvmem-cells = <&macaddr_uboot_1fc00>;
157 nvmem-cell-names = "mac-address";
158 gmac-config {
159 device = <&gmac>;
160
161 switch-phy-addr-swap = <0>;
162 switch-phy-swap = <0>;
163 };
164 };
165
166 &eth1 {
167 status = "okay";
168
169 compatible = "syscon", "simple-mfd";
170 };
171
172 &wmac {
173 status = "okay";
174
175 mtd-cal-data = <&art 0x1000>;
176 nvmem-cells = <&macaddr_uboot_1fc00>;
177 nvmem-cell-names = "mac-address";
178 };