ramips: add support for Z-ROUTER ZR-2660
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_nexx_wt3020.dtsi
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "nexx,wt3020", "ralink,mt7620n-soc";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &ethernet;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 reset {
22 label = "reset";
23 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RESTART>;
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_power: power {
32 function = LED_FUNCTION_POWER;
33 color = <LED_COLOR_ID_BLUE>;
34 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
35 };
36 };
37 };
38
39 &spi0 {
40 status = "okay";
41
42 flash@0 {
43 compatible = "jedec,spi-nor";
44 reg = <0>;
45 spi-max-frequency = <10000000>;
46
47 partitions {
48 compatible = "fixed-partitions";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 partition@0 {
53 label = "u-boot";
54 reg = <0x0 0x30000>;
55 read-only;
56 };
57
58 partition@30000 {
59 label = "u-boot-env";
60 reg = <0x30000 0x10000>;
61 read-only;
62 };
63
64 partition@40000 {
65 label = "factory";
66 reg = <0x40000 0x10000>;
67 read-only;
68
69 nvmem-layout {
70 compatible = "fixed-layout";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 eeprom_factory_0: eeprom@0 {
75 reg = <0x0 0x200>;
76 };
77
78 macaddr_factory_4: macaddr@4 {
79 reg = <0x4 0x6>;
80 };
81 };
82 };
83
84 firmware: partition@50000 {
85 compatible = "denx,uimage";
86 label = "firmware";
87 /* reg property is set based on flash size in DTS files */
88 };
89 };
90 };
91 };
92
93 &gpio3 {
94 status = "okay";
95 };
96
97 &ethernet {
98 nvmem-cells = <&macaddr_factory_4>;
99 nvmem-cell-names = "mac-address";
100
101 mediatek,portmap = "wllll";
102 };
103
104 &wmac {
105 nvmem-cells = <&eeprom_factory_0>;
106 nvmem-cell-names = "eeprom";
107 };
108
109 &state_default {
110 default {
111 groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
112 function = "gpio";
113 };
114 };