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