ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_asus_rt-n12p.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "asus,rt-n12p", "ralink,mt7620n-soc";
10         model = "Asus RT-N12+";
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         leds {
24                 compatible = "gpio-leds";
25
26                 wan {
27                         label = "rt-n12p:green:wan";
28                         gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
29                 };
30
31                 lan {
32                         label = "rt-n12p:green:lan";
33                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
34                 };
35
36                 led_power: power {
37                         label = "rt-n12p:green:power";
38                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
39                 };
40
41                 air {
42                         label = "rt-n12p:green:air";
43                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
44                 };
45         };
46
47         keys {
48                 compatible = "gpio-keys";
49
50                 reset {
51                         label = "reset";
52                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_RESTART>;
54                 };
55         };
56 };
57
58 &gpio1 {
59         status = "okay";
60 };
61
62 &gpio2 {
63         status = "okay";
64 };
65
66 &gpio3 {
67         status = "okay";
68 };
69
70 &spi0 {
71         status = "okay";
72
73         m25p80@0 {
74                 compatible = "jedec,spi-nor";
75                 reg = <0>;
76                 spi-max-frequency = <10000000>;
77
78                 partitions {
79                         compatible = "fixed-partitions";
80                         #address-cells = <1>;
81                         #size-cells = <1>;
82
83                         partition@0 {
84                                 label = "u-boot";
85                                 reg = <0x0 0x30000>;
86                                 read-only;
87                         };
88
89                         partition@30000 {
90                                 label = "u-boot-env";
91                                 reg = <0x30000 0x10000>;
92                                 read-only;
93                         };
94
95                         factory: partition@40000 {
96                                 label = "factory";
97                                 reg = <0x40000 0x10000>;
98                                 read-only;
99                         };
100
101                         partition@50000 {
102                                 compatible = "denx,uimage";
103                                 label = "firmware";
104                                 reg = <0x50000 0xfb0000>;
105                         };
106                 };
107         };
108 };
109
110 &ethernet {
111         mtd-mac-address = <&factory 0x4>;
112         mediatek,portmap = "wllll";
113 };
114
115 &wmac {
116         ralink,mtd-eeprom = <&factory 0>;
117 };
118
119 &state_default {
120         default {
121                 ralink,group = "ephy", "wled", "i2c", "wdt", "pa", "spi refclk";
122                 ralink,function = "gpio";
123         };
124 };