a075d085565d9451589306c2382b8d9165404bc5
[openwrt/staging/rmilecki.git] / target / linux / ramips / dts / mt7621_mikrotik_routerboard-750gr3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/gpio/gpio.h>
8
9 / {
10 compatible = "mikrotik,routerboard-750gr3", "mediatek,mt7621-soc";
11 model = "MikroTik RouterBOARD 750Gr3";
12
13 aliases {
14 led-boot = &led_usr;
15 led-failsafe = &led_usr;
16 led-running = &led_usr;
17 led-upgrade = &led_usr;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 pwr {
29 label = "routerboard-750gr3:blue:pwr";
30 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
31 default-state = "on";
32 };
33
34 led_usr: usr {
35 label = "routerboard-750gr3:green:usr";
36 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 mode {
44 label = "mode";
45 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
46 linux,code = <BTN_0>;
47 };
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54 };
55
56 beeper {
57 compatible = "gpio-beeper";
58 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
59 };
60
61 gpio_export {
62 compatible = "gpio-export";
63 #size-cells = <0>;
64
65 usb_power {
66 gpio-export,name = "usb_power";
67 gpio-export,output = <1>;
68 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
69 };
70 };
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <20000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "RouterBoot";
88 reg = <0x0 0x40000>;
89 read-only;
90 compatible = "mikrotik,routerboot-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "bootloader1";
96 reg = <0x0 0x0>;
97 read-only;
98 };
99
100 hard_config: hard_config {
101 read-only;
102 };
103
104 partition@10000 {
105 label = "bootloader2";
106 reg = <0x10000 0xf000>;
107 read-only;
108 };
109
110 soft_config {
111 };
112
113 partition@30000 {
114 label = "bios";
115 reg = <0x30000 0x1000>;
116 read-only;
117 };
118 };
119
120 partition@40000 {
121 compatible = "mikrotik,minor";
122 label = "firmware";
123 reg = <0x040000 0xfc0000>;
124 };
125 };
126 };
127 };
128
129 &gmac0 {
130 mtd-mac-address = <&hard_config 0x0010>;
131 };
132
133 &switch0 {
134 ports {
135 port@0 {
136 status = "okay";
137 label = "wan";
138 };
139
140 port@1 {
141 status = "okay";
142 label = "lan2";
143 mtd-mac-address = <&hard_config 0x0010>;
144 mtd-mac-address-increment = <1>;
145 };
146
147 port@2 {
148 status = "okay";
149 label = "lan3";
150 mtd-mac-address = <&hard_config 0x0010>;
151 mtd-mac-address-increment = <2>;
152 };
153
154 port@3 {
155 status = "okay";
156 label = "lan4";
157 mtd-mac-address = <&hard_config 0x0010>;
158 mtd-mac-address-increment = <3>;
159 };
160
161 port@4 {
162 status = "okay";
163 label = "lan5";
164 mtd-mac-address = <&hard_config 0x0010>;
165 mtd-mac-address-increment = <4>;
166 };
167 };
168 };
169
170 &state_default {
171 gpio {
172 /* via gpio7 (uart3 group) the PoE status can be read */
173 groups = "uart2", "uart3", "jtag", "wdt";
174 function = "gpio";
175 };
176 };
177
178 &sdhci {
179 status = "okay";
180 };