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