307819e746e9038d6218c64cf72c54e5cac718cf
[openwrt/staging/hauke.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 label = "Factory";
122 reg = <0x100000 0x40000>;
123 read-only;
124
125 nvmem-layout {
126 compatible = "fixed-layout";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 eeprom_factory_0: eeprom@0 {
131 reg = <0x0 0x400>;
132 };
133
134 eeprom_factory_8000: eeprom@8000 {
135 reg = <0x8000 0x4da8>;
136 };
137
138 macaddr_factory_fe6e: macaddr@fe6e {
139 reg = <0xfe6e 0x6>;
140 };
141 };
142 };
143
144 partition@140000 {
145 label = "Kernel";
146 reg = <0x140000 0x1ec0000>;
147 };
148
149 partition@540000 {
150 label = "ubi";
151 reg = <0x540000 0x1ac0000>;
152 };
153
154 partition@2140000 {
155 label = "Kernel2";
156 reg = <0x2140000 0x1ec0000>;
157 };
158
159 partition@4000000 {
160 label = "wwan";
161 reg = <0x4000000 0x100000>;
162 };
163
164 partition@4100000 {
165 label = "data";
166 reg = <0x4100000 0x1000000>;
167 };
168
169 partition@5100000 {
170 label = "rom-d";
171 reg = <0x5100000 0x100000>;
172 read-only;
173 };
174
175 partition@5200000 {
176 label = "reserve";
177 reg = <0x5200000 0x80000>;
178 };
179 };
180 };
181
182 &pcie {
183 status = "okay";
184 };
185
186 &ethernet {
187 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
188 };
189
190 &state_default {
191 gpio {
192 groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
193 function = "gpio";
194 };
195 };
196
197 &gmac0 {
198 nvmem-cells = <&macaddr_factory_fe6e>;
199 nvmem-cell-names = "mac-address";
200 };
201
202 &switch0 {
203 ports {
204 port@0 {
205 status = "okay";
206 label = "lan1";
207 };
208 port@2 {
209 status = "okay";
210 label = "lan2";
211 };
212 };
213 };
214
215 &pcie0 {
216 wifi@0,0 {
217 compatible = "mediatek,mt76";
218 reg = <0x0000 0 0 0 0>;
219 nvmem-cells = <&eeprom_factory_0>;
220 nvmem-cell-names = "eeprom";
221 };
222 };
223
224 &pcie1 {
225 wifi@0,0 {
226 compatible = "mediatek,mt76";
227 reg = <0x0000 0 0 0 0>;
228 nvmem-cells = <&eeprom_factory_8000>;
229 nvmem-cell-names = "eeprom";
230 };
231 };