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