ramips: cleanup the RB750Gr3 support
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / RB750Gr3.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,rb750gr3", "mediatek,mt7621-soc";
10 model = "MikroTik RouterBOARD 750Gr3";
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 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x10000000>;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 pwr {
32 label = "rb750gr3:blue:pwr";
33 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
34 default-state = "on";
35 };
36
37 led_usr: usr {
38 label = "rb750gr3:green:usr";
39 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys-polled";
45 poll-interval = <20>;
46
47 mode {
48 label = "mode";
49 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
50 linux,code = <BTN_0>;
51 };
52
53 reset {
54 label = "reset";
55 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58 };
59
60 beeper {
61 compatible = "gpio-beeper";
62 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
63 };
64
65 gpio_export {
66 compatible = "gpio-export";
67 #size-cells = <0>;
68
69 usb_power {
70 gpio-export,name = "usb_power";
71 gpio-export,output = <1>;
72 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
73 };
74 };
75 };
76
77 &spi0 {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <20000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "RouterBoot";
92 reg = <0x0 0x40000>;
93 read-only;
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "bootloader1";
100 reg = <0x0 0xf000>;
101 read-only;
102 };
103
104 hard_config: partition@f000 {
105 label = "hard_config";
106 reg = <0xf000 0x1000>;
107 read-only;
108 };
109
110 partition@10000 {
111 label = "bootloader2";
112 reg = <0x10000 0xf000>;
113 read-only;
114 };
115
116 partition@20000 {
117 label = "soft_config";
118 reg = <0x20000 0x1000>;
119 };
120
121 partition@30000 {
122 label = "bios";
123 reg = <0x30000 0x1000>;
124 read-only;
125 };
126 };
127
128 partition@40000 {
129 compatible = "mikrotik,minor";
130 label = "firmware";
131 reg = <0x040000 0xfc0000>;
132 };
133 };
134 };
135 };
136
137 &ethernet {
138 mtd-mac-address = <&hard_config 0x0010>;
139 mtd-mac-address-increment = <1>;
140 };
141
142 &pinctrl {
143 state_default: pinctrl0 {
144 gpio {
145 /* via gpio7 (uart3 group) the PoE status can be read */
146 ralink,group = "uart2", "uart3", "jtag", "wdt";
147 ralink,function = "gpio";
148 };
149 };
150 };
151
152 &sdhci {
153 status = "okay";
154 };