ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar9331_tplink_tl-mr3040-v2.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-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 &gpio {
91 status = "okay";
92 };
93
94 &usb {
95 #address-cells = <1>;
96 #size-cells = <0>;
97 dr_mode = "host";
98 vbus-supply = <&reg_usb_vbus>;
99 status = "okay";
100
101 hub_port: port@1 {
102 reg = <1>;
103 #trigger-source-cells = <0>;
104 };
105 };
106
107 &usb_phy {
108 status = "okay";
109 };
110
111 &spi {
112 status = "okay";
113
114 num-chipselects = <1>;
115
116 flash@0 {
117 compatible = "jedec,spi-nor";
118 spi-max-frequency = <50000000>;
119 reg = <0>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 uboot: partition@0 {
127 label = "u-boot";
128 reg = <0x000000 0x020000>;
129 read-only;
130 };
131
132 partition@20000 {
133 compatible = "tplink,firmware";
134 label = "firmware";
135 reg = <0x020000 0x3d0000>;
136 };
137
138 art: partition@3f0000 {
139 label = "art";
140 reg = <0x3f0000 0x010000>;
141 read-only;
142 };
143 };
144 };
145 };
146
147 &eth0 {
148 status = "okay";
149
150 mtd-mac-address = <&uboot 0x1fc00>;
151 gmac-config {
152 device = <&gmac>;
153
154 switch-phy-addr-swap = <0>;
155 switch-phy-swap = <0>;
156 };
157 };
158
159 &eth1 {
160 status = "okay";
161
162 compatible = "syscon", "simple-mfd";
163 };
164
165 &wmac {
166 status = "okay";
167
168 mtd-cal-data = <&art 0x1000>;
169 mtd-mac-address = <&uboot 0x1fc00>;
170 };