ramips: add support for I-O DATA WNPR2600G
[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-polled";
41                 poll-interval = <20>;
42
43                 mode {
44                         label = "mode";
45                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46                         linux,code = <BTN_0>;
47                 };
48
49                 reset {
50                         label = "reset";
51                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_RESTART>;
53                 };
54         };
55
56         beeper {
57                 compatible = "gpio-beeper";
58                 gpios = <&gpio0 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 = <&gpio0 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 &ethernet {
134         mtd-mac-address = <&hard_config 0x0010>;
135         mtd-mac-address-increment = <1>;
136 };
137
138 &pinctrl {
139         state_default: pinctrl0 {
140                 gpio {
141                         /* via gpio7 (uart3 group) the PoE status can be read */
142                         ralink,group = "uart2", "uart3", "jtag", "wdt";
143                         ralink,function = "gpio";
144                 };
145         };
146 };
147
148 &sdhci {
149         status = "okay";
150 };