ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_rb750gr3.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,rb750gr3", "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 = "rb750gr3:blue:pwr";
29                         gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
30                         default-state = "on";
31                 };
32
33                 led_usr: usr {
34                         label = "rb750gr3:green:usr";
35                         gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
36                 };
37         };
38
39         keys {
40                 compatible = "gpio-keys";
41
42                 mode {
43                         label = "mode";
44                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
45                         linux,code = <BTN_0>;
46                 };
47
48                 reset {
49                         label = "reset";
50                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_RESTART>;
52                 };
53         };
54
55         beeper {
56                 compatible = "gpio-beeper";
57                 gpios = <&gpio0 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 = <&gpio0 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 &ethernet {
133         mtd-mac-address = <&hard_config 0x0010>;
134         mtd-mac-address-increment = <1>;
135 };
136
137 &pinctrl {
138         state_default: pinctrl0 {
139                 gpio {
140                         /* via gpio7 (uart3 group) the PoE status can be read */
141                         ralink,group = "uart2", "uart3", "jtag", "wdt";
142                         ralink,function = "gpio";
143                 };
144         };
145 };
146
147 &sdhci {
148         status = "okay";
149 };