ramips: add support for ZyXEL Keenetic Extra II
[openwrt/openwrt.git] / target / linux / ramips / dts / ki_rb.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 memory@0 {
13 device_type = "memory";
14 reg = <0x0 0x8000000>;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600n8";
19 };
20
21 gpio-keys-polled {
22 compatible = "gpio-keys-polled";
23 #address-cells = <1>;
24 #size-cells = <0>;
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 gpio-leds {
47 compatible = "gpio-leds";
48
49 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 };
69 };
70
71 gpio_export {
72 compatible = "gpio-export";
73 #size-cells = <0>;
74
75 usbpower {
76 gpio-export,name = "usbpower";
77 gpio-export,output = <1>;
78 gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
79 };
80 };
81 };
82
83 &spi0 {
84 status = "okay";
85
86 m25p80@0 {
87 #address-cells = <1>;
88 #size-cells = <1>;
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <10000000>;
92 m25p,chunked-io = <32>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x30000>;
97 read-only;
98 };
99
100 partition@30000 {
101 label = "u-config";
102 reg = <0x30000 0x10000>;
103 read-only;
104 };
105
106 factory: partition@40000 {
107 label = "rf-eeprom";
108 reg = <0x40000 0x10000>;
109 read-only;
110 };
111
112 partition@50000 {
113 label = "firmware";
114 reg = <0x50000 0xe90000>;
115 };
116
117 partition@ee0000 {
118 label = "config_1";
119 reg = <0xee0000 0x10000>;
120 read-only;
121 };
122
123 partition@ef0000 {
124 label = "storage";
125 reg = <0xef0000 0x100000>;
126 read-only;
127 };
128
129 partition@ff0000 {
130 label = "dump";
131 reg = <0xff0000 0x10000>;
132 read-only;
133 };
134
135 partition@1000000 {
136 label = "u-state";
137 reg = <0x1000000 0x30000>;
138 read-only;
139 };
140
141 partition@1030000 {
142 label = "u-config_res";
143 reg = <0x1030000 0x10000>;
144 read-only;
145 };
146
147 partition@1040000 {
148 label = "rf-eeprom_res";
149 reg = <0x1040000 0x10000>;
150 read-only;
151 };
152
153 partition@1050000 {
154 label = "firmware_2";
155 reg = <0x1050000 0xe90000>;
156 read-only;
157 };
158
159 partition@1ee0000 {
160 label = "config_2";
161 reg = <0x1ee0000 0x10000>;
162 read-only;
163 };
164 };
165 };
166
167 &ehci {
168 status = "okay";
169 };
170
171 &ohci {
172 status = "okay";
173 };
174
175 &ethernet {
176 mtd-mac-address = <&factory 0x4>;
177 mediatek,portmap = "wllll";
178 };
179
180 &wmac {
181 status = "okay";
182 mediatek,mtd-eeprom = <&factory 0x0>;
183 };
184
185 &pcie {
186 status = "okay";
187
188 pcie-bridge {
189 mt76@0,0 {
190 reg = <0x0000 0 0 0 0>;
191 device_type = "pci";
192 mediatek,mtd-eeprom = <&factory 0x8000>;
193 ieee80211-freq-limit = <5000000 6000000>;
194 mtd-mac-address = <&factory 0x8004>;
195 };
196 };
197 };
198
199 &pinctrl {
200 state_default: pinctrl0 {
201 gpio {
202 ralink,group = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
203 ralink,function = "gpio";
204 };
205 };
206 };