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