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