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