Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / ArcherMR200.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8         compatible = "ralink,mt7620a-soc";
9         model = "TP-Link Archer MR200";
10
11         chosen {
12                 bootargs = "console=ttyS0,115200";
13         };
14
15         gpio-leds {
16                 compatible = "gpio-leds";
17
18                 lan {
19                         label = "mr200:white:lan";
20                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21                 };
22
23                 wan {
24                         label = "mr200:white:wan";
25                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
26                 };
27
28                 power {
29                         label = "mr200:white:power";
30                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
31                 };
32
33                 4g {
34                         label = "mr200:white:4g";
35                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
36                 };
37
38                 wps {
39                         label = "mr200:white:wps";
40                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
41                 };
42
43                 signal1 {
44                         label = "mr200:white:signal1";
45                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
46                 };
47
48                 signal2 {
49                         label = "mr200:white:signal2";
50                         gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
51                 };
52
53                 signal3 {
54                         label = "mr200:white:signal3";
55                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
56                 };
57
58                 signal4 {
59                         label = "mr200:white:signal4";
60                         gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
61                 };
62
63                 wlan {
64                         label = "mr200:white:wlan";
65                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
66                 };
67         };
68
69         gpio-keys {
70                 compatible = "gpio-keys";
71                 #address-cells = <1>;
72                 #size-cells = <0>;
73
74                 reset {
75                         label = "reset";
76                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
77                         linux,code = <KEY_RESTART>;
78                 };
79
80                 rfkill {
81                         label = "rfkill";
82                         gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
83                         linux,code = <KEY_RFKILL>;
84                 };
85         };
86
87         gpio_export {
88                 compatible = "gpio-export";
89                 #size-cells = <0>;
90
91                 power_usb {
92                         gpio-export,name = "power_usb1";
93                         gpio-export,output = <1>;
94                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
95                 };
96         };
97
98 };
99
100 &gpio1 {
101         status = "okay";
102 };
103
104 &gpio2 {
105         status = "okay";
106 };
107
108 &gpio3 {
109         status = "okay";
110 };
111
112 &spi0 {
113         status = "okay";
114
115         m25p80@0 {
116                 #address-cells = <1>;
117                 #size-cells = <1>;
118                 compatible = "jedec,spi-nor";
119                 reg = <0>;
120                 linux,modalias = "m25p80", "mx25l6405d";
121                 spi-max-frequency = <10000000>;
122
123                 partition@0 {
124                         label = "u-boot";
125                         reg = <0x0 0x20000>;
126                         read-only;
127                 };
128
129                 partition@20000 {
130                         label = "firmware";
131                         reg = <0x20000 0x7b0000>;
132                 };
133
134                 rom: partition@7d0000 {
135                         label = "rom";
136                         reg = <0x7d0000 0x10000>;
137                         read-only;
138                 };
139
140                 partition@7e0000 {
141                         label = "romfile";
142                         reg = <0x7e0000 0x10000>;
143                         read-only;
144                 };
145
146                 radio: partition@7f0000 {
147                         label = "radio";
148                         reg = <0x7f0000 0x10000>;
149                         read-only;
150                 };
151         };
152 };
153
154 &pinctrl {
155         state_default: pinctrl0 {
156                 gpio {
157                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
158                         ralink,function = "gpio";
159                 };
160         };
161 };
162
163 &ethernet {
164                 mtd-mac-address = <&rom 0xf100>;
165                 mediatek,portmap = "llll";
166         };
167
168 &ehci {
169         status = "okay";
170 };
171
172 &ohci {
173         status = "okay";
174 };
175
176 &gsw {
177         mediatek,port4 = "ephy";
178 };
179
180 &wmac {
181         ralink,mtd-eeprom = <&radio 0>;
182 };
183
184 &pcie {
185         status = "okay";
186
187         pcie-bridge {
188                 mt76@0,0 {
189                         reg = <0x0000 0 0 0 0>;
190                         device_type = "pci";
191                         mediatek,mtd-eeprom = <&radio 32768>;
192                         mediatek,2ghz = <0>;
193                 };
194         };
195 };