49ded7d655db54b6901d35cbf176eb2800f1ed11
[openwrt/openwrt.git] / target / linux / ramips / dts / TL-MR3020V3.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc";
10 model = "TP-Link TL-MR3020 v3";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 wps {
33 label = "wps";
34 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37
38 modec1 {
39 label = "sw1";
40 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
41 linux,code = <BTN_0>;
42 };
43
44 modec2 {
45 label = "sw2";
46 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
47 linux,code = <BTN_1>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53
54 led_power: power {
55 label = "tl-mr3020-v3:green:power";
56 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
57 default-state = "on";
58 };
59
60 wan {
61 label = "tl-mr3020-v3:green:3g";
62 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
63 trigger-sources = <&ehci_port1>, <&ohci_port1>;
64 linux,default-trigger = "usbport";
65 };
66
67 wlan {
68 label = "tl-mr3020-v3:green:wlan";
69 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
70 };
71
72 wps {
73 label = "tl-mr3020-v3:green:wps";
74 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
75 };
76
77 lan {
78 label = "tl-mr3020-v3:green:lan";
79 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
80 };
81 };
82 };
83
84 &spi0 {
85 status = "okay";
86
87 m25p80@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <10000000>;
91 m25p,chunked-io = <32>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "boot";
100 reg = <0x0 0x20000>;
101 read-only;
102 };
103
104 partition@20000 {
105 compatible = "tplink,firmware";
106 label = "firmware";
107 reg = <0x20000 0x7a0000>;
108 };
109
110 partition@7c0000 {
111 label = "config";
112 reg = <0x7c0000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@7d0000 {
117 label = "factory";
118 reg = <0x7d0000 0x30000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &ehci {
126 status = "okay";
127 };
128
129 &ohci {
130 status = "okay";
131 };
132
133 &pinctrl {
134 state_default: pinctrl0 {
135 gpio {
136 ralink,group = "i2s", "refclk", "wdt", "p2led_an", "p1led_an", "p0led_an", "wled_an";
137 ralink,function = "gpio";
138 };
139 };
140 };
141
142 &wmac {
143 status = "okay";
144 mtd-mac-address = <&factory 0xf100>;
145 mediatek,mtd-eeprom = <&factory 0x20000>;
146 };
147
148 &ethernet {
149 mtd-mac-address = <&factory 0xf100>;
150 };