ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_planex_mzk-ex300np.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc";
10         model = "Planex MZK-EX300NP";
11
12         aliases {
13                 led-boot = &led_wps;
14                 led-failsafe = &led_wps;
15                 led-running = &led_wps;
16                 led-upgrade = &led_wps;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 wifi {
23                         label = "mzk-ex300np:green:wifi";
24                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
25                 };
26
27                 led_wps: wps {
28                         label = "mzk-ex300np:green:wps";
29                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
30                 };
31
32                 rep {
33                         label = "mzk-ex300np:blue:rep";
34                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
35                 };
36
37                 wifi1 {
38                         label = "mzk-ex300np:blue:wifi1";
39                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
40                 };
41
42                 wifi2 {
43                         label = "mzk-ex300np:blue:wifi2";
44                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
45                 };
46
47                 wifi3 {
48                         label = "mzk-ex300np:blue:wifi3";
49                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
50                 };
51         };
52
53         keys {
54                 compatible = "gpio-keys";
55
56                 reset {
57                         label = "reset";
58                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
59                         linux,code = <KEY_RESTART>;
60                 };
61
62                 wps {
63                         label = "wps";
64                         gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
65                         linux,code = <KEY_RFKILL>;
66                 };
67         };
68 };
69
70 &gpio1 {
71         status = "okay";
72 };
73
74 &gpio3 {
75         status = "okay";
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 = "u-boot";
93                                 reg = <0x0 0x30000>;
94                                 read-only;
95                         };
96
97                         partition@30000 {
98                                 label = "u-boot-env";
99                                 reg = <0x30000 0x10000>;
100                                 read-only;
101                         };
102
103                         factory: partition@40000 {
104                                 label = "factory";
105                                 reg = <0x40000 0x10000>;
106                                 read-only;
107                         };
108
109                         partition@50000 {
110                                 compatible = "denx,uimage";
111                                 label = "firmware";
112                                 reg = <0x50000 0x730000>;
113                         };
114
115                         partition@780000 {
116                                 label = "Udata";
117                                 reg = <0x780000 0x80000>;
118                         };
119                 };
120         };
121 };
122
123 &state_default {
124         gpio {
125                 ralink,group = "i2c", "spi refclk", "rgmii1", "wled";
126                 ralink,function = "gpio";
127         };
128 };
129
130 &ethernet {
131         pinctrl-names = "default";
132         pinctrl-0 = <&ephy_pins>;
133         mtd-mac-address = <&factory 0x4>;
134         mediatek,portmap = "llllw";
135 };
136
137 &wmac {
138         ralink,mtd-eeprom = <&factory 0>;
139 };