4333ece42e75b5adc2a096721c74959e878e870d
[openwrt/staging/jow.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 nvmem-layout {
133 compatible = "fixed-layout";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 eeprom_factory_0: eeprom@0 {
138 reg = <0x0 0x4da8>;
139 };
140
141 macaddr_factory_fe6e: macaddr@fe6e {
142 reg = <0xfe6e 0x6>;
143 };
144 };
145 };
146 partition@140000 {
147 label = "Kernel";
148 reg = <0x140000 0x1ec0000>;
149 };
150 partition@2140000 {
151 label = "kernel2";
152 reg = <0x2140000 0x1ec0000>;
153 };
154 partition@4000000 {
155 label = "wwan";
156 reg = <0x4000000 0x100000>;
157 };
158 partition@4100000 {
159 label = "ubi";
160 reg = <0x4100000 0x3ee0000>;
161 };
162 };
163 };
164
165 &ethernet {
166 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
167 };
168
169 &state_default {
170 gpio {
171 groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
172 function = "gpio";
173 };
174
175 };
176
177 &gmac0 {
178 nvmem-cells = <&macaddr_factory_fe6e>;
179 nvmem-cell-names = "mac-address";
180 };
181
182 &switch0 {
183 ports {
184 port@0 {
185 status = "okay";
186 label = "lan4";
187 };
188 port@1 {
189 status = "okay";
190 label = "lan3";
191 };
192 port@2 {
193 status = "okay";
194 label = "lan2";
195 };
196 port@3 {
197 status = "okay";
198 label = "lan1";
199 };
200 };
201 };
202
203 &pcie {
204 status = "okay";
205 };
206
207 &pcie0 {
208 status = "okay";
209 mt7615d@0,0 {
210 /* In reality at hangs at pcie1, this is a driver bug */
211 compatible = "pci14c3,7615";
212 reg = <0x0000 0 0 0 0>;
213 mediatek,firmware-eeprom = "mt7615e_eeprom.bin";
214 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_fe6e>;
215 nvmem-cell-names = "eeprom", "mac-address";
216 mac-address-increment = <(1)>;
217 };
218
219 };