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