ramips: mt7621: use higher SPI clock speed on Mikrotik rbm11g and rbm33g
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_routerboard-m11g.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,routerboard-m11g", "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 = "routerboard-m11g:green:usr";
28                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
29                 };
30
31                 rssi0 {
32                         label = "routerboard-m11g:green:rssi0";
33                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
34                 };
35
36                 rssi1 {
37                         label = "routerboard-m11g:green:rssi1";
38                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
39                 };
40
41                 rssi2 {
42                         label = "routerboard-m11g:green:rssi2";
43                         gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
44                 };
45
46                 rssi3 {
47                         label = "routerboard-m11g:green:rssi3";
48                         gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
49                 };
50
51                 rssi4 {
52                         label = "routerboard-m11g:green:rssi4";
53                         gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
54                 };
55         };
56
57         keys {
58                 compatible = "gpio-keys";
59
60                 res {
61                         label = "reset";
62                         gpios = <&gpio 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 = <&gpio 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         flash@0 {
84                 compatible = "jedec,spi-nor";
85                 reg = <0>;
86                 spi-max-frequency = <33000000>;
87
88                 partitions {
89                         compatible = "fixed-partitions";
90                         #address-cells = <1>;
91                         #size-cells = <1>;
92
93                         partition@0 {
94                                 label = "RouterBoot";
95                                 reg = <0x0 0x40000>;
96                                 read-only;
97                                 compatible = "mikrotik,routerboot-partitions";
98                                 #address-cells = <1>;
99                                 #size-cells = <1>;
100
101                                 partition@0 {
102                                         label = "bootloader1";
103                                         reg = <0x0 0x0>;
104                                         read-only;
105                                 };
106
107                                 hard_config: hard_config {
108                                         read-only;
109                                 };
110
111                                 partition@10000 {
112                                         label = "bootloader2";
113                                         reg = <0x10000 0xf000>;
114                                         read-only;
115                                 };
116
117                                 soft_config {
118                                 };
119
120                                 partition@30000 {
121                                         label = "bios";
122                                         reg = <0x30000 0x1000>;
123                                         read-only;
124                                 };
125                         };
126
127                         partition@40000 {
128                                 compatible = "mikrotik,minor";
129                                 label = "firmware";
130                                 reg = <0x040000 0xFC0000>;
131                         };
132                 };
133         };
134 };
135
136 &switch0 {
137         ports {
138                 port@0 {
139                         status = "okay";
140                         label = "lan";
141                 };
142         };
143 };
144
145 &state_default {
146         gpio {
147                 groups = "uart2", "wdt", "rgmii2";
148                 function = "gpio";
149         };
150 };
151
152 &i2c {
153         status = "okay";
154 };
155
156 &pcie {
157         status = "okay";
158 };