47e4b429a918bc6896dc3c305febd8c377148cf6
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_zyxel_keenetic-extra-ii.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zyxel,keenetic-extra-ii", "mediatek,mt7628an-soc";
8 model = "ZyXEL Keenetic Extra II";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600n8";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35
36 fn {
37 label = "fn";
38 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
39 linux,code = <BTN_0>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 led_power: power {
47 label = "green:power";
48 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
49 default-state = "keep";
50 };
51
52 internet {
53 label = "green:internet";
54 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi {
58 label = "green:wifi";
59 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
60 };
61
62 usb {
63 label = "green:usb";
64 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
65 trigger-sources = <&ohci_port1>, <&ehci_port1>;
66 linux,default-trigger = "usbport";
67 };
68 };
69
70 gpio_export {
71 compatible = "gpio-export";
72 #size-cells = <0>;
73
74 usbpower {
75 gpio-export,name = "usbpower";
76 gpio-export,output = <1>;
77 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
78 };
79 };
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-config";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 label = "factory";
109 reg = <0x40000 0x10000>;
110 read-only;
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0xe90000>;
117 };
118
119 partition@ee0000 {
120 label = "config_1";
121 reg = <0xee0000 0x10000>;
122 read-only;
123 };
124
125 partition@ef0000 {
126 label = "storage";
127 reg = <0xef0000 0x100000>;
128 read-only;
129 };
130
131 partition@ff0000 {
132 label = "dump";
133 reg = <0xff0000 0x10000>;
134 read-only;
135 };
136
137 partition@1000000 {
138 label = "u-state";
139 reg = <0x1000000 0x30000>;
140 read-only;
141 };
142
143 partition@1030000 {
144 label = "u-config_res";
145 reg = <0x1030000 0x10000>;
146 read-only;
147 };
148
149 partition@1040000 {
150 label = "rf-eeprom_res";
151 reg = <0x1040000 0x10000>;
152 read-only;
153 };
154
155 partition@1050000 {
156 label = "firmware_2";
157 reg = <0x1050000 0xe90000>;
158 read-only;
159 };
160
161 partition@1ee0000 {
162 label = "config_2";
163 reg = <0x1ee0000 0x10000>;
164 read-only;
165 };
166 };
167 };
168 };
169
170 &ehci {
171 status = "okay";
172 };
173
174 &ohci {
175 status = "okay";
176 };
177
178 &ethernet {
179 mtd-mac-address = <&factory 0x4>;
180 };
181
182 &esw {
183 mediatek,portmap = <0x3e>;
184 };
185
186 &wmac {
187 status = "okay";
188 };
189
190 &pcie {
191 status = "okay";
192 };
193
194 &pcie0 {
195 mt76@0,0 {
196 reg = <0x0000 0 0 0 0>;
197 mediatek,mtd-eeprom = <&factory 0x8000>;
198 ieee80211-freq-limit = <5000000 6000000>;
199 };
200 };
201
202 &state_default {
203 gpio {
204 groups = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
205 function = "gpio";
206 };
207 };