ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_rbm11g.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9         compatible = "mikrotik,rbm11g", "mediatek,mt7621-soc";
10         model = "MikroTik RouterBOARD M11G";
11
12         aliases {
13                 led-boot = &led_usr;
14                 led-failsafe = &led_usr;
15                 led-running = &led_usr;
16                 led-upgrade = &led_usr;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_usr: usr {
27                         label = "rbm11g:green:usr";
28                         gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
29                 };
30
31                 rssi0 {
32                         label = "rbm11g:green:rssi0";
33                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
34                 };
35
36                 rssi1 {
37                         label = "rbm11g:green:rssi1";
38                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
39                 };
40
41                 rssi2 {
42                         label = "rbm11g:green:rssi2";
43                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
44                 };
45
46                 rssi3 {
47                         label = "rbm11g:green:rssi3";
48                         gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
49                 };
50
51                 rssi4 {
52                         label = "rbm11g:green:rssi4";
53                         gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
54                 };
55         };
56
57         keys {
58                 compatible = "gpio-keys";
59
60                 res {
61                         label = "reset";
62                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
63                         linux,code = <KEY_RESTART>;
64                 };
65         };
66
67         pcie0_vcc_reg {
68                 compatible = "regulator-fixed";
69                 regulator-name = "pcie0_vcc";
70
71                 regulator-min-microvolt = <3300000>;
72                 regulator-max-microvolt = <3300000>;
73                 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
74                 enable-active-high;
75                 regulator-boot-on;
76                 regulator-always-on;
77         };
78 };
79
80 &spi0 {
81         status = "okay";
82
83         w25q128@0 {
84                 compatible = "jedec,spi-nor";
85                 reg = <0>;
86                 // XXX empiric value to obtain actual 10MHz SCK at the chip
87                 spi-max-frequency = <3125000>;
88
89                 partitions {
90                         compatible = "fixed-partitions";
91                         #address-cells = <1>;
92                         #size-cells = <1>;
93
94                         partition@0 {
95                                 label = "RouterBoot";
96                                 reg = <0x0 0x40000>;
97                                 read-only;
98                                 compatible = "fixed-partitions";
99                                 #address-cells = <1>;
100                                 #size-cells = <1>;
101
102                                 partition@0 {
103                                         label = "bootloader1";
104                                         reg = <0x0 0xf000>;
105                                         read-only;
106                                 };
107
108                                 hard_config: partition@f000 {
109                                         label = "hard_config";
110                                         reg = <0xf000 0x1000>;
111                                         read-only;
112                                 };
113
114                                 partition@10000 {
115                                         label = "bootloader2";
116                                         reg = <0x10000 0xf000>;
117                                         read-only;
118                                 };
119
120                                 partition@20000 {
121                                         label = "soft_config";
122                                         reg = <0x20000 0x1000>;
123                                 };
124
125                                 partition@30000 {
126                                         label = "bios";
127                                         reg = <0x30000 0x1000>;
128                                         read-only;
129                                 };
130                         };
131
132                         partition@40000 {
133                                 compatible = "mikrotik,minor";
134                                 label = "firmware";
135                                 reg = <0x040000 0xFC0000>;
136                         };
137                 };
138         };
139 };
140
141 &ethernet {
142         mtd-mac-address = <&hard_config 0x0010>;
143         mtd-mac-address-increment = <1>;
144 };
145
146 &state_default {
147         gpio {
148                 ralink,group = "uart2", "wdt", "rgmii2";
149                 ralink,function = "gpio";
150         };
151 };
152
153 &i2c {
154         status = "okay";
155 };
156
157 &pcie {
158         status = "okay";
159 };