ramips: add support for MikroTik RouterBOARD RBM11g
[openwrt/openwrt.git] / target / linux / ramips / dts / RBM11G.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,rbm11g", "mediatek,mt7621-soc";
10 model = "MikroTik RBM11G";
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 = "rbm11g:green:usr";
26 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
27 };
28
29 rssi0 {
30 label = "rbm11g:green:rssi0";
31 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
32 };
33
34 rssi1 {
35 label = "rbm11g:green:rssi1";
36 gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
37 };
38
39 rssi2 {
40 label = "rbm11g:green:rssi2";
41 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
42 };
43
44 rssi3 {
45 label = "rbm11g:green:rssi3";
46 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
47 };
48
49 rssi4 {
50 label = "rbm11g:green:rssi4";
51 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 gpio-keys-polled {
56 compatible = "gpio-keys-polled";
57 #address-cells = <1>;
58 #size-cells = <0>;
59 poll-interval = <20>;
60 res {
61 label = "reset";
62 gpios = <&gpio0 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 = <&gpio0 9 GPIO_ACTIVE_HIGH>;
74 enable-active-high;
75 regulator-boot-on;
76 regulator-always-on;
77 };
78 };
79
80
81 &spi0 {
82 status = "okay";
83
84 w25q128@0 {
85 #address-cells = <1>;
86 #size-cells = <1>;
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <3125000>;
90
91 partition@0 {
92 label = "routerboot";
93 reg = <0x000000 0x00F000>;
94 read-only;
95 };
96
97 factory: partition@f000 {
98 label = "factory";
99 reg = <0x00F000 0x031000>;
100 read-only;
101 };
102
103 partition@40000 {
104 label = "firmware";
105 reg = <0x040000 0xFC0000>;
106 };
107 };
108 };
109
110 &ethernet {
111 mtd-mac-address = <&factory 0x0010>;
112 mtd-mac-address-increment = <1>;
113 };
114
115
116 &pinctrl {
117 state_default: pinctrl0 {
118 gpio {
119 ralink,group = "uart2", "wdt", "rgmii2";
120 ralink,function = "gpio";
121 };
122 };
123 };
124
125 &i2c {
126 status = "okay";
127 };
128
129 &pcie {
130 status = "okay";
131 };