ramips: Add support for Mikrotik RouterBOARD RBM33g
[openwrt/openwrt.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 RBM33G";
11
12 memory@0 {
13 device_type = "memory";
14 reg = <0x0 0x10000000>;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 gpio-leds {
22 compatible = "gpio-leds";
23
24 usr {
25 label = "rbm33g:green:usr";
26 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
27 };
28
29 };
30
31 gpio-keys-polled {
32 compatible = "gpio-keys-polled";
33 #address-cells = <1>;
34 #size-cells = <0>;
35 poll-interval = <20>;
36
37 res {
38 label = "res";
39 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43
44 pcie0_vcc_reg {
45 compatible = "regulator-fixed";
46 regulator-name = "pcie0_vcc";
47
48 regulator-min-microvolt = <3300000>;
49 regulator-max-microvolt = <3300000>;
50 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
51 enable-active-high;
52 regulator-boot-on;
53 regulator-always-on;
54 };
55
56 pcie1_vcc_reg {
57 compatible = "regulator-fixed";
58 regulator-name = "pcie1_vcc";
59
60 regulator-min-microvolt = <3300000>;
61 regulator-max-microvolt = <3300000>;
62 gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
63 enable-active-high;
64 regulator-boot-on;
65 regulator-always-on;
66 };
67
68 pcie2_vcc_reg {
69 compatible = "regulator-fixed";
70 regulator-name = "pcie2_vcc";
71
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
75 enable-active-high;
76 regulator-boot-on;
77 regulator-always-on;
78 };
79
80 usb_vcc_reg {
81 compatible = "regulator-fixed";
82 regulator-name = "usb_vcc";
83
84 regulator-min-microvolt = <5000000>;
85 regulator-max-microvolt = <5000000>;
86 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
87 enable-active-high;
88 regulator-always-on;
89 };
90 };
91
92
93 &spi0 {
94 status = "okay";
95
96 w25q40@0 {
97 #address-cells = <1>;
98 #size-cells = <1>;
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <3125000>;
102
103 partition@0 {
104 label = "routerboot";
105 reg = <0x0 0xf000>;
106 read-only;
107 };
108
109 factory: partition@f000 {
110 label = "factory";
111 reg = <0xf000 0x71000>;
112 read-only;
113 };
114
115 };
116
117 w25q128@0 {
118 #address-cells = <1>;
119 #size-cells = <1>;
120 compatible = "jedec,spi-nor";
121 reg = <1>;
122 spi-max-frequency = <3125000>;
123
124 partition@40000 {
125 label = "firmware";
126 reg = <0x040000 0xFC0000>;
127 };
128 };
129 };
130
131 &ethernet {
132 mtd-mac-address = <&factory 0x0010>;
133 mtd-mac-address-increment = <1>;
134 };
135
136
137 &pinctrl {
138 state_default: pinctrl0 {
139 gpio {
140 ralink,group = "uart2", "wdt";
141 ralink,function = "gpio";
142 };
143 };
144 };
145
146 &sdhci {
147 status = "okay";
148 };
149
150 &i2c {
151 status = "okay";
152 };
153
154 &pcie {
155 status = "okay";
156 };