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