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