ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_zyxel_keenetic-extra-ii.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zyxel,keenetic-extra-ii", "mediatek,mt7628an-soc";
8 model = "ZyXEL Keenetic Extra II";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600n8";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35
36 fn {
37 label = "fn";
38 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
39 linux,code = <BTN_0>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 led_power: power {
47 label = "green:power";
48 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
49 };
50
51 internet {
52 label = "green:internet";
53 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
54 };
55
56 wifi {
57 label = "green:wifi";
58 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
59 };
60
61 usb {
62 label = "green:usb";
63 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
64 trigger-sources = <&ohci_port1>, <&ehci_port1>;
65 linux,default-trigger = "usbport";
66 };
67 };
68
69 gpio_export {
70 compatible = "gpio-export";
71 #size-cells = <0>;
72
73 usbpower {
74 gpio-export,name = "usbpower";
75 gpio-export,output = <1>;
76 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
77 };
78 };
79
80 virtual_flash {
81 compatible = "mtd-concat";
82 devices = <&firmware1 &firmware2>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x0 0x1d20000>;
93 };
94 };
95 };
96 };
97
98 &spi0 {
99 status = "okay";
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <32000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "u-boot";
113 reg = <0x0 0x30000>;
114 read-only;
115 };
116
117 partition@30000 {
118 label = "u-config";
119 reg = <0x30000 0x10000>;
120 read-only;
121 };
122
123 factory: partition@40000 {
124 label = "rf-eeprom";
125 reg = <0x40000 0x10000>;
126 read-only;
127
128 nvmem-layout {
129 compatible = "fixed-layout";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 eeprom_factory_0: eeprom@0 {
134 reg = <0x0 0x400>;
135 };
136
137 eeprom_factory_8000: eeprom@8000 {
138 reg = <0x8000 0x200>;
139 };
140
141 macaddr_factory_4: macaddr@4 {
142 reg = <0x4 0x6>;
143 };
144 };
145 };
146
147 firmware1: partition@50000 {
148 label = "firmware_1";
149 reg = <0x50000 0xe90000>;
150 };
151
152 partition@ee0000 {
153 label = "config_1";
154 reg = <0xee0000 0x10000>;
155 read-only;
156 };
157
158 partition@ef0000 {
159 label = "storage";
160 reg = <0xef0000 0x100000>;
161 read-only;
162 };
163
164 partition@ff0000 {
165 label = "dump";
166 reg = <0xff0000 0x10000>;
167 read-only;
168 };
169
170 partition@1000000 {
171 label = "u-state";
172 reg = <0x1000000 0x30000>;
173 read-only;
174 };
175
176 partition@1030000 {
177 label = "u-config_res";
178 reg = <0x1030000 0x10000>;
179 read-only;
180 };
181
182 partition@1040000 {
183 label = "rf-eeprom_res";
184 reg = <0x1040000 0x10000>;
185 read-only;
186 };
187
188 firmware2: partition@1050000 {
189 label = "firmware_2";
190 reg = <0x1050000 0xe90000>;
191 };
192
193 partition@1ee0000 {
194 label = "config_2";
195 reg = <0x1ee0000 0x10000>;
196 read-only;
197 };
198 };
199 };
200 };
201
202 &ethernet {
203 nvmem-cells = <&macaddr_factory_4>;
204 nvmem-cell-names = "mac-address";
205 };
206
207 &esw {
208 mediatek,portmap = <0x3e>;
209 };
210
211 &wmac {
212 status = "okay";
213
214 nvmem-cells = <&eeprom_factory_0>;
215 nvmem-cell-names = "eeprom";
216 };
217
218 &pcie {
219 status = "okay";
220 };
221
222 &pcie0 {
223 mt76@0,0 {
224 compatible = "mediatek,mt76";
225 reg = <0x0000 0 0 0 0>;
226 nvmem-cells = <&eeprom_factory_8000>;
227 nvmem-cell-names = "eeprom";
228 ieee80211-freq-limit = <5000000 6000000>;
229 };
230 };
231
232 &state_default {
233 gpio {
234 groups = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
235 function = "gpio";
236 };
237 };