a516f337ccc1209ed5e7716dd3c922c81d7f1251
[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 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 pwr {
28 label = "routerboard-750gr3:blue:pwr";
29 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
30 default-state = "on";
31 };
32
33 led_usr: usr {
34 label = "routerboard-750gr3:green:usr";
35 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 mode {
43 label = "mode";
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 linux,code = <BTN_0>;
46 };
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54
55 beeper {
56 compatible = "gpio-beeper";
57 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
58 };
59
60 gpio_export {
61 compatible = "gpio-export";
62 #size-cells = <0>;
63
64 usb_power {
65 gpio-export,name = "usb_power";
66 gpio-export,output = <1>;
67 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
68 };
69 };
70 };
71
72 &spi0 {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <20000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "RouterBoot";
87 reg = <0x0 0x40000>;
88 read-only;
89 compatible = "mikrotik,routerboot-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "bootloader1";
95 reg = <0x0 0x0>;
96 read-only;
97 };
98
99 hard_config: hard_config {
100 read-only;
101 };
102
103 partition@10000 {
104 label = "bootloader2";
105 reg = <0x10000 0xf000>;
106 read-only;
107 };
108
109 soft_config {
110 };
111
112 partition@30000 {
113 label = "bios";
114 reg = <0x30000 0x1000>;
115 read-only;
116 };
117 };
118
119 partition@40000 {
120 compatible = "mikrotik,minor";
121 label = "firmware";
122 reg = <0x040000 0xfc0000>;
123 };
124 };
125 };
126 };
127
128 &switch0 {
129 ports {
130 port@0 {
131 status = "okay";
132 label = "wan";
133 };
134
135 port@1 {
136 status = "okay";
137 label = "lan2";
138 };
139
140 port@2 {
141 status = "okay";
142 label = "lan3";
143 };
144
145 port@3 {
146 status = "okay";
147 label = "lan4";
148 };
149
150 port@4 {
151 status = "okay";
152 label = "lan5";
153 };
154 };
155 };
156
157 &state_default {
158 gpio {
159 /* via gpio7 (uart3 group) the PoE status can be read */
160 groups = "uart2", "uart3", "jtag", "wdt";
161 function = "gpio";
162 };
163 };
164
165 &sdhci {
166 status = "okay";
167 };