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