ramips: move partitions into partition table node
[openwrt/staging/wigyori.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 spi-max-frequency = <3125000>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "routerboot";
98 reg = <0x000000 0x00F000>;
99 read-only;
100 };
101
102 factory: partition@f000 {
103 label = "factory";
104 reg = <0x00F000 0x031000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "firmware";
110 reg = <0x040000 0xFC0000>;
111 };
112 };
113 };
114 };
115
116 &ethernet {
117 mtd-mac-address = <&factory 0x0010>;
118 mtd-mac-address-increment = <1>;
119 };
120
121
122 &pinctrl {
123 state_default: pinctrl0 {
124 gpio {
125 ralink,group = "uart2", "wdt", "rgmii2";
126 ralink,function = "gpio";
127 };
128 };
129 };
130
131 &i2c {
132 status = "okay";
133 };
134
135 &pcie {
136 status = "okay";
137 };