ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.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-status = &led_power;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600n8";
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34
35 wps {
36 label = "wps";
37 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40
41 fn {
42 label = "fn";
43 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
44 linux,code = <BTN_0>;
45 };
46 };
47
48 gpio-leds {
49 compatible = "gpio-leds";
50
51 led_power: power {
52 label = "keenetic-extra-ii:green:power";
53 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
54 default-state = "keep";
55 };
56
57 internet {
58 label = "keenetic-extra-ii:green:internet";
59 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
60 };
61
62 wifi {
63 label = "keenetic-extra-ii:green:wifi";
64 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
65 };
66
67 usb {
68 label = "keenetic-extra-ii:green:usb";
69 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
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 m25p,chunked-io = <32>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "u-config";
107 reg = <0x30000 0x10000>;
108 read-only;
109 };
110
111 factory: partition@40000 {
112 label = "rf-eeprom";
113 reg = <0x40000 0x10000>;
114 read-only;
115 };
116
117 partition@50000 {
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 };