ramips: mt7628: use mac-base
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zyxel_lte5398-m904.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,lte5398-m904", "mediatek,mt7621-soc";
10 model = "ZyXEL LTE5398-M904";
11
12 aliases {
13 label-mac-device = &gmac0;
14 led-boot = &led_power_green;
15 led-failsafe = &led_power_green;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_green;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_power_green: power_green {
40 label = "green:power";
41 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
42 };
43
44 power_blue {
45 label = "blue:power";
46 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
47 linux,default-trigger = "usbport";
48 trigger-sources = <&ehci_port2>;
49 };
50
51 internet {
52 label = "green:internet";
53 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
54 };
55
56 wifi {
57 label = "green:wifi";
58 gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
59 linux,default-trigger = "phy0tpt";
60 };
61
62 voice {
63 label = "green:voice";
64 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
65 };
66
67 lte_green {
68 label = "green:lte";
69 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
70 };
71
72 lte_orange {
73 label = "orange:lte";
74 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
75 };
76
77 lte_red {
78 label = "red:lte";
79 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
80 };
81 };
82
83 gpio_export {
84 compatible = "gpio-export";
85 #size-cells = <0>;
86
87 lte_power {
88 gpio-export,name = "lte_power";
89 gpio-export,output = <0>;
90 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
91 };
92
93 usb_power {
94 gpio-export,name = "usb_power";
95 gpio-export,output = <1>;
96 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
97 };
98 };
99 };
100
101 &nand {
102 status = "okay";
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "Bootloader";
111 reg = <0x0 0x80000>;
112 read-only;
113 };
114
115 partition@80000 {
116 label = "Config";
117 reg = <0x80000 0x80000>;
118 };
119
120 factory: partition@100000 {
121 compatible = "nvmem-cells";
122 label = "Factory";
123 reg = <0x100000 0x40000>;
124 #address-cells = <1>;
125 #size-cells = <1>;
126 read-only;
127
128 eeprom_factory_0: eeprom@0 {
129 reg = <0x0 0x400>;
130 };
131
132 eeprom_factory_8000: eeprom@8000 {
133 reg = <0x8000 0x4da8>;
134 };
135
136 macaddr_factory_fe6e: macaddr@fe6e {
137 reg = <0xfe6e 0x6>;
138 };
139 };
140
141 partition@140000 {
142 label = "Kernel";
143 reg = <0x140000 0x1ec0000>;
144 };
145
146 partition@540000 {
147 label = "ubi";
148 reg = <0x540000 0x1ac0000>;
149 };
150
151 partition@2140000 {
152 label = "Kernel2";
153 reg = <0x2140000 0x1ec0000>;
154 };
155
156 partition@4000000 {
157 label = "wwan";
158 reg = <0x4000000 0x100000>;
159 };
160
161 partition@4100000 {
162 label = "data";
163 reg = <0x4100000 0x1000000>;
164 };
165
166 partition@5100000 {
167 label = "rom-d";
168 reg = <0x5100000 0x100000>;
169 read-only;
170 };
171
172 partition@5200000 {
173 label = "reserve";
174 reg = <0x5200000 0x80000>;
175 };
176 };
177 };
178
179 &pcie {
180 status = "okay";
181 };
182
183 &ethernet {
184 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
185 };
186
187 &state_default {
188 gpio {
189 groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
190 function = "gpio";
191 };
192 };
193
194 &gmac0 {
195 nvmem-cells = <&macaddr_factory_fe6e>;
196 nvmem-cell-names = "mac-address";
197 };
198
199 &switch0 {
200 ports {
201 port@0 {
202 status = "okay";
203 label = "lan1";
204 };
205 port@2 {
206 status = "okay";
207 label = "lan2";
208 };
209 };
210 };
211
212 &pcie0 {
213 wifi@0,0 {
214 compatible = "mediatek,mt76";
215 reg = <0x0000 0 0 0 0>;
216 nvmem-cells = <&eeprom_factory_0>;
217 nvmem-cell-names = "eeprom";
218 };
219 };
220
221 &pcie1 {
222 wifi@0,0 {
223 compatible = "mediatek,mt76";
224 reg = <0x0000 0 0 0 0>;
225 nvmem-cells = <&eeprom_factory_8000>;
226 nvmem-cell-names = "eeprom";
227 };
228 };