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