ramips: rb750gr3: License DTS as GPL-2.0-or-later OR MIT
[openwrt/openwrt.git] / target / linux / ramips / dts / 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 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x10000000>;
23 };
24
25 chosen {
26 bootargs = "console=ttyS0,115200";
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 pwr {
33 label = "rb750gr3:blue:pwr";
34 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
35 default-state = "on";
36 };
37
38 led_usr: usr {
39 label = "rb750gr3:green:usr";
40 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 mode {
49 label = "mode";
50 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
51 linux,code = <BTN_0>;
52 };
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60
61 beeper {
62 compatible = "gpio-beeper";
63 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
64 };
65
66 gpio_export {
67 compatible = "gpio-export";
68 #size-cells = <0>;
69
70 usb_power {
71 gpio-export,name = "usb_power";
72 gpio-export,output = <1>;
73 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
74 };
75 };
76 };
77
78 &spi0 {
79 status = "okay";
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <20000000>;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "RouterBoot";
93 reg = <0x0 0x40000>;
94 read-only;
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "bootloader1";
101 reg = <0x0 0xf000>;
102 read-only;
103 };
104
105 hard_config: partition@f000 {
106 label = "hard_config";
107 reg = <0xf000 0x1000>;
108 read-only;
109 };
110
111 partition@10000 {
112 label = "bootloader2";
113 reg = <0x10000 0xf000>;
114 read-only;
115 };
116
117 partition@20000 {
118 label = "soft_config";
119 reg = <0x20000 0x1000>;
120 };
121
122 partition@30000 {
123 label = "bios";
124 reg = <0x30000 0x1000>;
125 read-only;
126 };
127 };
128
129 partition@40000 {
130 compatible = "mikrotik,minor";
131 label = "firmware";
132 reg = <0x040000 0xfc0000>;
133 };
134 };
135 };
136 };
137
138 &ethernet {
139 mtd-mac-address = <&hard_config 0x0010>;
140 mtd-mac-address-increment = <1>;
141 };
142
143 &pinctrl {
144 state_default: pinctrl0 {
145 gpio {
146 /* via gpio7 (uart3 group) the PoE status can be read */
147 ralink,group = "uart2", "uart3", "jtag", "wdt";
148 ralink,function = "gpio";
149 };
150 };
151 };
152
153 &sdhci {
154 status = "okay";
155 };