ramips: fix RBM11G partitioning
[openwrt/staging/lynxis.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 RouterBOARD M11G";
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 = "rbm11g:green:usr";
30 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
31 };
32
33 rssi0 {
34 label = "rbm11g:green:rssi0";
35 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
36 };
37
38 rssi1 {
39 label = "rbm11g:green:rssi1";
40 gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
41 };
42
43 rssi2 {
44 label = "rbm11g:green:rssi2";
45 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
46 };
47
48 rssi3 {
49 label = "rbm11g:green:rssi3";
50 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
51 };
52
53 rssi4 {
54 label = "rbm11g:green:rssi4";
55 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 gpio-keys-polled {
60 compatible = "gpio-keys-polled";
61 poll-interval = <20>;
62 res {
63 label = "reset";
64 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67 };
68
69 pcie0_vcc_reg {
70 compatible = "regulator-fixed";
71 regulator-name = "pcie0_vcc";
72
73 regulator-min-microvolt = <3300000>;
74 regulator-max-microvolt = <3300000>;
75 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
76 enable-active-high;
77 regulator-boot-on;
78 regulator-always-on;
79 };
80 };
81
82
83 &spi0 {
84 status = "okay";
85
86 w25q128@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 // XXX empiric value to obtain actual 10MHz SCK at the chip
90 spi-max-frequency = <3125000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "RouterBoot";
99 reg = <0x0 0x40000>;
100 read-only;
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "bootloader1";
107 reg = <0x0 0xf000>;
108 read-only;
109 };
110
111 hard_config: partition@f000 {
112 label = "hard_config";
113 reg = <0xf000 0x1000>;
114 read-only;
115 };
116
117 partition@10000 {
118 label = "bootloader2";
119 reg = <0x10000 0xf000>;
120 read-only;
121 };
122
123 partition@20000 {
124 label = "soft_config";
125 reg = <0x20000 0x1000>;
126 };
127
128 partition@30000 {
129 label = "bios";
130 reg = <0x30000 0x1000>;
131 read-only;
132 };
133 };
134
135 partition@40000 {
136 label = "firmware";
137 reg = <0x040000 0xFC0000>;
138 };
139 };
140 };
141 };
142
143 &ethernet {
144 mtd-mac-address = <&hard_config 0x0010>;
145 mtd-mac-address-increment = <1>;
146 };
147
148
149 &pinctrl {
150 state_default: pinctrl0 {
151 gpio {
152 ralink,group = "uart2", "wdt", "rgmii2";
153 ralink,function = "gpio";
154 };
155 };
156 };
157
158 &i2c {
159 status = "okay";
160 };
161
162 &pcie {
163 status = "okay";
164 };