Revert faulty tree push
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_rbm33g.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,rbm33g", "mediatek,mt7621-soc";
10         model = "MikroTik RouterBOARD M33G";
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 = "rbm33g:green:usr";
28                         gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
29                 };
30         };
31
32         keys {
33                 compatible = "gpio-keys-polled";
34                 poll-interval = <20>;
35
36                 res {
37                         label = "res";
38                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_RESTART>;
40                 };
41         };
42
43         pcie0_vcc_reg {
44                 compatible = "regulator-fixed";
45                 regulator-name = "pcie0_vcc";
46
47                 regulator-min-microvolt = <3300000>;
48                 regulator-max-microvolt = <3300000>;
49                 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
50                 enable-active-high;
51                 regulator-boot-on;
52                 regulator-always-on;
53         };
54
55         pcie1_vcc_reg {
56                 compatible = "regulator-fixed";
57                 regulator-name = "pcie1_vcc";
58
59                 regulator-min-microvolt = <3300000>;
60                 regulator-max-microvolt = <3300000>;
61                 gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
62                 enable-active-high;
63                 regulator-boot-on;
64                 regulator-always-on;
65         };
66
67         pcie2_vcc_reg {
68                 compatible = "regulator-fixed";
69                 regulator-name = "pcie2_vcc";
70
71                 regulator-min-microvolt = <3300000>;
72                 regulator-max-microvolt = <3300000>;
73                 gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
74                 enable-active-high;
75                 regulator-boot-on;
76                 regulator-always-on;
77         };
78
79         usb_vcc_reg {
80                 compatible = "regulator-fixed";
81                 regulator-name = "usb_vcc";
82
83                 regulator-min-microvolt = <5000000>;
84                 regulator-max-microvolt = <5000000>;
85                 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
86                 enable-active-high;
87                 regulator-always-on;
88         };
89 };
90
91
92 &spi0 {
93         status = "okay";
94
95         w25q40@0 {
96                 compatible = "jedec,spi-nor";
97                 reg = <0>;
98                 spi-max-frequency = <3125000>;
99
100                 partitions {
101                         compatible = "fixed-partitions";
102                         #address-cells = <1>;
103                         #size-cells = <1>;
104
105                         partition@0 {
106                                 label = "RouterBoot";
107                                 reg = <0x0 0x40000>;
108                                 read-only;
109                                 compatible = "fixed-partitions";
110                                 #address-cells = <1>;
111                                 #size-cells = <1>;
112
113                                 partition@0 {
114                                         label = "bootloader1";
115                                         reg = <0x0 0xf000>;
116                                         read-only;
117                                 };
118
119                                 hard_config: partition@f000 {
120                                         label = "hard_config";
121                                         reg = <0xf000 0x1000>;
122                                         read-only;
123                                 };
124
125                                 partition@10000 {
126                                         label = "bootloader2";
127                                         reg = <0x10000 0xf000>;
128                                         read-only;
129                                 };
130
131                                 partition@20000 {
132                                         label = "soft_config";
133                                         reg = <0x20000 0x1000>;
134                                 };
135
136                                 partition@30000 {
137                                         label = "bios";
138                                         reg = <0x30000 0x1000>;
139                                         read-only;
140                                 };
141                         };
142                 };
143         };
144
145         w25q128@1 {
146                 compatible = "jedec,spi-nor";
147                 reg = <1>;
148                 // XXX empiric value to obtain actual 10MHz SCK at the chip
149                 spi-max-frequency = <3125000>;
150
151                 partitions {
152                         compatible = "fixed-partitions";
153                         #address-cells = <1>;
154                         #size-cells = <1>;
155
156                         // Region <0x0 0x40000> seems reserved by OEM
157
158                         partition@40000 {
159                                 compatible = "mikrotik,minor";
160                                 label = "firmware";
161                                 reg = <0x040000 0xFC0000>;
162                         };
163                 };
164         };
165 };
166
167 &ethernet {
168         mtd-mac-address = <&hard_config 0x0010>;
169         mtd-mac-address-increment = <1>;
170 };
171
172
173 &pinctrl {
174         state_default: pinctrl0 {
175                 gpio {
176                         ralink,group = "uart2", "wdt";
177                         ralink,function = "gpio";
178                 };
179         };
180 };
181
182 &sdhci {
183         status = "okay";
184 };
185
186 &i2c {
187         status = "okay";
188 };
189
190 &pcie {
191         status = "okay";
192 };