ramips: fix whitespace issues in DTS files
[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 &spi0 {
92         status = "okay";
93
94         w25q40@0 {
95                 compatible = "jedec,spi-nor";
96                 reg = <0>;
97                 spi-max-frequency = <3125000>;
98
99                 partitions {
100                         compatible = "fixed-partitions";
101                         #address-cells = <1>;
102                         #size-cells = <1>;
103
104                         partition@0 {
105                                 label = "RouterBoot";
106                                 reg = <0x0 0x40000>;
107                                 read-only;
108                                 compatible = "fixed-partitions";
109                                 #address-cells = <1>;
110                                 #size-cells = <1>;
111
112                                 partition@0 {
113                                         label = "bootloader1";
114                                         reg = <0x0 0xf000>;
115                                         read-only;
116                                 };
117
118                                 hard_config: partition@f000 {
119                                         label = "hard_config";
120                                         reg = <0xf000 0x1000>;
121                                         read-only;
122                                 };
123
124                                 partition@10000 {
125                                         label = "bootloader2";
126                                         reg = <0x10000 0xf000>;
127                                         read-only;
128                                 };
129
130                                 partition@20000 {
131                                         label = "soft_config";
132                                         reg = <0x20000 0x1000>;
133                                 };
134
135                                 partition@30000 {
136                                         label = "bios";
137                                         reg = <0x30000 0x1000>;
138                                         read-only;
139                                 };
140                         };
141                 };
142         };
143
144         w25q128@1 {
145                 compatible = "jedec,spi-nor";
146                 reg = <1>;
147                 // XXX empiric value to obtain actual 10MHz SCK at the chip
148                 spi-max-frequency = <3125000>;
149
150                 partitions {
151                         compatible = "fixed-partitions";
152                         #address-cells = <1>;
153                         #size-cells = <1>;
154
155                         // Region <0x0 0x40000> seems reserved by OEM
156
157                         partition@40000 {
158                                 compatible = "mikrotik,minor";
159                                 label = "firmware";
160                                 reg = <0x040000 0xFC0000>;
161                         };
162                 };
163         };
164 };
165
166 &ethernet {
167         mtd-mac-address = <&hard_config 0x0010>;
168         mtd-mac-address-increment = <1>;
169 };
170
171 &pinctrl {
172         state_default: pinctrl0 {
173                 gpio {
174                         ralink,group = "uart2", "wdt";
175                         ralink,function = "gpio";
176                 };
177         };
178 };
179
180 &sdhci {
181         status = "okay";
182 };
183
184 &i2c {
185         status = "okay";
186 };
187
188 &pcie {
189         status = "okay";
190 };