ramips: specify "firmware" partition format
[oweals/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         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                                 compatible = "denx,uimage";
124                                 label = "firmware";
125                                 reg = <0x50000 0xe90000>;
126                         };
127
128                         partition@ee0000 {
129                                 label = "config_1";
130                                 reg = <0xee0000 0x10000>;
131                                 read-only;
132                         };
133
134                         partition@ef0000 {
135                                 label = "storage";
136                                 reg = <0xef0000 0x100000>;
137                                 read-only;
138                         };
139
140                         partition@ff0000 {
141                                 label = "dump";
142                                 reg = <0xff0000 0x10000>;
143                                 read-only;
144                         };
145
146                         partition@1000000 {
147                                 label = "u-state";
148                                 reg = <0x1000000 0x30000>;
149                                 read-only;
150                         };
151
152                         partition@1030000 {
153                                 label = "u-config_res";
154                                 reg = <0x1030000 0x10000>;
155                                 read-only;
156                         };
157
158                         partition@1040000 {
159                                 label = "rf-eeprom_res";
160                                 reg = <0x1040000 0x10000>;
161                                 read-only;
162                         };
163
164                         partition@1050000 {
165                                 label = "firmware_2";
166                                 reg = <0x1050000 0xe90000>;
167                                 read-only;
168                         };
169
170                         partition@1ee0000 {
171                                 label = "config_2";
172                                 reg = <0x1ee0000 0x10000>;
173                                 read-only;
174                         };
175                 };
176         };
177 };
178
179 &ehci {
180         status = "okay";
181 };
182
183 &ohci {
184         status = "okay";
185 };
186
187 &ethernet {
188         mtd-mac-address = <&factory 0x4>;
189         mediatek,portmap = "wllll";
190 };
191
192 &wmac {
193         status = "okay";
194         mediatek,mtd-eeprom = <&factory 0x0>;
195 };
196
197 &pcie {
198         status = "okay";
199 };
200
201 &pcie0 {
202         mt76@0,0 {
203                 reg = <0x0000 0 0 0 0>;
204                 mediatek,mtd-eeprom = <&factory 0x8000>;
205                 ieee80211-freq-limit = <5000000 6000000>;
206                 mtd-mac-address = <&factory 0x8004>;
207         };
208 };
209
210 &pinctrl {
211         state_default: pinctrl0 {
212                 gpio {
213                         ralink,group = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
214                         ralink,function = "gpio";
215                 };
216         };
217 };