3f37155f243bdf3b08c9b04526d15bec78ec1385
[openwrt/staging/wigyori.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 = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "bootloader1";
95 reg = <0x0 0xf000>;
96 read-only;
97 };
98
99 hard_config: partition@f000 {
100 label = "hard_config";
101 reg = <0xf000 0x1000>;
102 read-only;
103 };
104
105 partition@10000 {
106 label = "bootloader2";
107 reg = <0x10000 0xf000>;
108 read-only;
109 };
110
111 partition@20000 {
112 label = "soft_config";
113 reg = <0x20000 0x1000>;
114 };
115
116 partition@30000 {
117 label = "bios";
118 reg = <0x30000 0x1000>;
119 read-only;
120 };
121 };
122
123 partition@40000 {
124 compatible = "mikrotik,minor";
125 label = "firmware";
126 reg = <0x040000 0xfc0000>;
127 };
128 };
129 };
130 };
131
132 &gmac0 {
133 mtd-mac-address = <&hard_config 0x0010>;
134 mtd-mac-address-increment = <1>;
135 };
136
137 &switch0 {
138 ports {
139 port@0 {
140 status = "okay";
141 label = "wan";
142 mtd-mac-address = <&hard_config 0x0010>;
143 mtd-mac-address-increment = <2>;
144 };
145
146 port@1 {
147 status = "okay";
148 label = "lan2";
149 };
150
151 port@2 {
152 status = "okay";
153 label = "lan3";
154 };
155
156 port@3 {
157 status = "okay";
158 label = "lan4";
159 };
160
161 port@4 {
162 status = "okay";
163 label = "lan5";
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 /* via gpio7 (uart3 group) the PoE status can be read */
171 groups = "uart2", "uart3", "jtag", "wdt";
172 function = "gpio";
173 };
174 };
175
176 &sdhci {
177 status = "okay";
178 };