ramips: add support for YunCore G720
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_raisecom_msg1500-x-00.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "raisecom,msg1500-x-00", "mediatek,mt7621-soc";
11 model = "RAISECOM MSG1500 X.00";
12
13 aliases {
14 led-boot = &led_usb;
15 led-failsafe = &led_usb;
16 led-upgrade = &led_usb;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan2g {
24 label = "blue:wlan2g";
25 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
26 linux,default-trigger = "phy0radio";
27 };
28
29 wlan5g {
30 label = "blue:wlan5g";
31 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1radio";
33 };
34
35 led_usb: usb {
36 function = LED_FUNCTION_USB;
37 color = <LED_COLOR_ID_BLUE>;
38 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
39 trigger-sources = <&ehci_port2>;
40 linux,default-trigger = "usbport";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58
59 wifi {
60 label = "wifi";
61 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_RFKILL>;
63 };
64 };
65 };
66
67 &nand {
68 status = "okay";
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "Bootloader";
77 reg = <0x0 0x80000>;
78 read-only;
79 };
80
81 partition@80000 {
82 label = "Config";
83 reg = <0x80000 0x80000>;
84 read-only;
85
86 nvmem-layout {
87 compatible = "fixed-layout";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 macaddr_config_8014: macaddr@8014 {
92 compatible = "mac-base";
93 reg = <0x8014 0x11>;
94 #nvmem-cell-cells = <1>;
95 };
96
97 macaddr_config_8036: macaddr@8036 {
98 compatible = "mac-base";
99 reg = <0x8036 0x11>;
100 #nvmem-cell-cells = <1>;
101 };
102 };
103 };
104
105 partition@100000 {
106 label = "Factory";
107 reg = <0x100000 0x40000>;
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 eeprom_factory_0: eeprom@0 {
116 reg = <0x0 0x4da8>;
117 };
118
119 macaddr_factory_4: macaddr@4 {
120 reg = <0x4 0x6>;
121 };
122 };
123 };
124
125 partition@140000 {
126 label = "kernel";
127 reg = <0x140000 0x400000>;
128 };
129
130 partition@540000 {
131 label = "ubi";
132 reg = <0x540000 0x7a40000>;
133 };
134 };
135 };
136
137 &pcie {
138 status = "okay";
139 };
140
141 &pcie0 {
142 wifi@0,0 {
143 compatible = "mediatek,mt76";
144 reg = <0x0000 0 0 0 0>;
145 /* 5 GHz (phy1) does not take the address from calibration data,
146 but setting it manually here works */
147 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
148 nvmem-cell-names = "eeprom", "mac-address";
149 };
150 };
151
152 &gmac0 {
153 nvmem-cells = <&macaddr_config_8014 0>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &gmac1 {
158 status = "okay";
159 label = "wan";
160 phy-handle = <&ethphy4>;
161
162 nvmem-cells = <&macaddr_config_8036 0>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &mdio {
167 ethphy4: ethernet-phy@4 {
168 reg = <4>;
169 };
170 };
171
172 &switch0 {
173 ports {
174 port@0 {
175 status = "okay";
176 label = "lan4";
177 };
178
179 port@1 {
180 status = "okay";
181 label = "lan3";
182 };
183
184 port@2 {
185 status = "okay";
186 label = "lan2";
187 };
188
189 port@3 {
190 status = "okay";
191 label = "lan1";
192 };
193 };
194 };
195
196 &state_default {
197 gpio {
198 groups = "i2c", "jtag", "uart3", "wdt";
199 function = "gpio";
200 };
201 };