ramips: add support for Z-ROUTER ZR-2660
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3662_dlink_dir-645.dts
1 #include "rt3883.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 = "dlink,dir-645", "ralink,rt3662-soc", "ralink,rt3883-soc";
9 model = "D-Link DIR-645";
10
11 aliases {
12 led-boot = &led_wps;
13 led-failsafe = &led_wps;
14 led-running = &led_wps;
15 led-upgrade = &led_wps;
16 };
17
18 rtl8367b {
19 compatible = "realtek,rtl8367b";
20 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
21 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
22 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
23 };
24
25 keys {
26 compatible = "gpio-keys-polled";
27 poll-interval = <100>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34
35 wps {
36 label = "wps";
37 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 inet {
46 label = "green:inet";
47 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
48 };
49
50 led_wps: wps {
51 function = LED_FUNCTION_WPS;
52 color = <LED_COLOR_ID_GREEN>;
53 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
54 };
55 };
56
57 gpio_export {
58 compatible = "gpio-export";
59 #size-cells = <0>;
60
61 usb {
62 gpio-export,name = "usb";
63 gpio-export,output = <1>;
64 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
65 };
66 };
67 };
68
69 &gpio1 {
70 status = "okay";
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <25000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "uboot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "uboot-env";
94 reg = <0x30000 0x4000>;
95 read-only;
96 };
97
98 partition@34000 {
99 label = "factory";
100 reg = <0x34000 0x4000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x200>;
110 };
111
112 macaddr_factory_4: macaddr@4 {
113 reg = <0x4 0x6>;
114 };
115 };
116 };
117
118 partition@38000 {
119 label = "nvram";
120 reg = <0x38000 0x8000>;
121 read-only;
122 };
123
124 partition@40000 {
125 label = "devdata";
126 reg = <0x40000 0x10000>;
127 };
128
129 partition@50000 {
130 compatible = "seama";
131 label = "firmware";
132 reg = <0x50000 0x7b0000>;
133 };
134 };
135 };
136 };
137
138 &state_default {
139 gpio {
140 groups = "i2c", "jtag", "uartf";
141 function = "gpio";
142 };
143 };
144
145 &ethernet {
146 nvmem-cells = <&macaddr_factory_4>;
147 nvmem-cell-names = "mac-address";
148
149 port@0 {
150 mediatek,fixed-link = <1000 1 1 0>;
151 };
152 };
153
154 &wmac {
155 ralink,5ghz = <0>;
156 nvmem-cells = <&eeprom_factory_0>;
157 nvmem-cell-names = "eeprom";
158 };
159
160 &ehci {
161 status = "okay";
162 };
163
164 &ohci {
165 status = "okay";
166 };