84fe3224b6c1633a895c198c92014b275a2053f0
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7628an_tplink_tl-mr3020-v3.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 keys {
24 compatible = "gpio-keys";
25
26 wps {
27 label = "wps";
28 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 modec1 {
33 label = "sw1";
34 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
35 linux,code = <BTN_0>;
36 };
37
38 modec2 {
39 label = "sw2";
40 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
41 linux,code = <BTN_1>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 label = "tl-mr3020-v3:green:power";
50 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 wan {
55 label = "tl-mr3020-v3:green:3g";
56 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
57 trigger-sources = <&ehci_port1>, <&ohci_port1>;
58 linux,default-trigger = "usbport";
59 };
60
61 wlan {
62 label = "tl-mr3020-v3:green:wlan";
63 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
64 };
65
66 wps {
67 label = "tl-mr3020-v3:green:wps";
68 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
69 };
70
71 lan {
72 label = "tl-mr3020-v3:green:lan";
73 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
74 };
75 };
76 };
77
78 &spi0 {
79 status = "okay";
80
81 m25p80@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <10000000>;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "boot";
93 reg = <0x0 0x20000>;
94 read-only;
95 };
96
97 partition@20000 {
98 compatible = "tplink,firmware";
99 label = "firmware";
100 reg = <0x20000 0x7a0000>;
101 };
102
103 partition@7c0000 {
104 label = "config";
105 reg = <0x7c0000 0x10000>;
106 read-only;
107 };
108
109 factory: partition@7d0000 {
110 label = "factory";
111 reg = <0x7d0000 0x30000>;
112 read-only;
113 };
114 };
115 };
116 };
117
118 &ehci {
119 status = "okay";
120 };
121
122 &ohci {
123 status = "okay";
124 };
125
126 &pinctrl {
127 state_default: pinctrl0 {
128 gpio {
129 ralink,group = "i2s", "refclk", "wdt", "p2led_an", "p1led_an", "p0led_an", "wled_an";
130 ralink,function = "gpio";
131 };
132 };
133 };
134
135 &wmac {
136 status = "okay";
137 mtd-mac-address = <&factory 0xf100>;
138 mediatek,mtd-eeprom = <&factory 0x20000>;
139 };
140
141 &ethernet {
142 mtd-mac-address = <&factory 0xf100>;
143 };