018e83664db81e676647fe4fcc906d67343f597b
[openwrt/staging/stintel.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 &switch0 {
130 ports {
131 port@0 {
132 status = "okay";
133 label = "wan";
134 };
135
136 port@1 {
137 status = "okay";
138 label = "lan2";
139 };
140
141 port@2 {
142 status = "okay";
143 label = "lan3";
144 };
145
146 port@3 {
147 status = "okay";
148 label = "lan4";
149 };
150
151 port@4 {
152 status = "okay";
153 label = "lan5";
154 };
155 };
156 };
157
158 &state_default {
159 gpio {
160 /* via gpio7 (uart3 group) the PoE status can be read */
161 groups = "uart2", "uart3", "jtag", "wdt";
162 function = "gpio";
163 };
164 };
165
166 &sdhci {
167 status = "okay";
168 };