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