ramips: add support for ZyXEL LTE3301-Plus
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zyxel_lte3301-plus.dts
1 /dts-v1/;
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,lte3301-plus", "mediatek,mt7621-soc";
10 model = "ZyXEL LTE3301-Plus";
11
12 aliases {
13 label-mac-device = &gmac0;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio_export {
26 compatible = "gpio-export";
27 #size-cells = <0>;
28
29 power_modem {
30 gpio-export,name = "power_modem";
31 gpio-export,output = <1>;
32 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
33 };
34
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45
46 wps {
47 label = "wps";
48 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51
52 };
53
54 leds {
55 compatible = "gpio-leds";
56
57 led_power: power {
58 label = "lte3301-plus:white:power";
59 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
60 };
61
62 wifi {
63 label = "lte3301-plus:white:wifi";
64 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
65 };
66
67 internet {
68 label = "lte3301-plus:white:internet";
69 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
70 };
71
72 usb {
73 label = "lte3301-plus:white:usb";
74 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
75 };
76
77 lte {
78 label = "lte3301-plus:white:lte";
79 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
80 };
81
82 mobile_green {
83 label = "lte3301-plus:green:mobile";
84 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
85 };
86
87 mobile_orange {
88 label = "lte3301-plus:orange:mobile";
89 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
90 };
91
92 mobile_red {
93 label = "lte3301-plus:red:mobile";
94 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
95 };
96
97 };
98
99 };
100
101 &gpio {
102 status = "okay";
103
104 enable_usb_power {
105 gpio-hog;
106 line-name = "enable USB power";
107 gpios = <7 GPIO_ACTIVE_HIGH>;
108 output-high;
109 };
110 };
111
112 &nand {
113 status = "okay";
114
115 partitions {
116 compatible = "fixed-partitions";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 partition@0 {
121 label = "uboot";
122 reg = <0x00000 0x80000>; /* 64 KB */
123 };
124 partition@80000 {
125 label = "uboot_env";
126 reg = <0x80000 0x80000>; /* 64 KB */
127 };
128 factory: partition@100000 {
129 label = "factory";
130 reg = <0x100000 0x40000>;
131 };
132 partition@140000 {
133 label = "Kernel";
134 reg = <0x140000 0x1ec0000>;
135 };
136 partition@2140000 {
137 label = "kernel2";
138 reg = <0x2140000 0x1ec0000>;
139 };
140 partition@4000000 {
141 label = "wwan";
142 reg = <0x4000000 0x100000>;
143 };
144 partition@4100000 {
145 label = "ubi";
146 reg = <0x4100000 0x3ee0000>;
147 };
148 };
149 };
150
151 &ethernet {
152 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
153 };
154
155 &state_default {
156 gpio {
157 groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
158 function = "gpio";
159 };
160
161 };
162
163 &gmac0 {
164 nvmem-cells = <&macaddr_factory_fe6e>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &switch0 {
169 ports {
170 port@0 {
171 status = "okay";
172 label = "lan4";
173 };
174 port@1 {
175 status = "okay";
176 label = "lan3";
177 };
178 port@2 {
179 status = "okay";
180 label = "lan2";
181 };
182 port@3 {
183 status = "okay";
184 label = "lan1";
185 };
186 };
187 };
188
189 &pcie {
190 status = "okay";
191 };
192
193 &pcie0 {
194 status = "okay";
195 mt7615d@0,0 {
196 /* In reality at hangs at pcie1, this is a driver bug */
197 compatible = "pci14c3,7615";
198 reg = <0x0000 0 0 0 0>;
199 mediatek,firmware-eeprom = "mt7615e_eeprom.bin";
200 mediatek,mtd-eeprom = <&factory 0x0000>;
201 nvmem-cells = <&macaddr_factory_fe6e>;
202 nvmem-cell-names = "mac-address";
203 mac-address-increment = <(1)>;
204 };
205
206 };
207
208 &factory {
209 compatible = "nvmem-cells";
210 #address-cells = <1>;
211 #size-cells = <1>;
212 mtd-mac-address = <&factory 0xfe6e>;
213
214 macaddr_factory_fe6e: macaddr@fe6e {
215 reg = <0xfe6e 0x6>;
216 };
217 };