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