30eccaf5f591b14f6d8a237665ecfb0bf9741d68
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / DIR-645.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "DIR-645", "ralink,rt3883-soc";
9 model = "D-Link DIR-645";
10
11 rtl8367b {
12 compatible = "realtek,rtl8367b";
13 gpio-sda = <&gpio0 1 0>;
14 gpio-sck = <&gpio0 2 0>;
15 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
16 };
17
18 gpio-keys-polled {
19 compatible = "gpio-keys-polled";
20 #address-cells = <1>;
21 #size-cells = <0>;
22 poll-interval = <100>;
23
24 reset {
25 label = "reset";
26 gpios = <&gpio0 9 0>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio0 14 0>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 gpio-leds {
38 compatible = "gpio-leds";
39
40 inet {
41 label = "dir-645:green:inet";
42 gpios = <&gpio0 0 1>;
43 };
44
45 wps {
46 label = "dir-645:green:wps";
47 gpios = <&gpio1 2 0>;
48 };
49 };
50
51 gpio_export {
52 compatible = "gpio-export";
53 #size-cells = <0>;
54
55 usb {
56 gpio-export,name = "usb";
57 gpio-export,output = <1>;
58 gpios = <&gpio1 6 0>;
59 };
60 };
61 };
62
63 &gpio1 {
64 status = "okay";
65 };
66
67 &spi0 {
68 status = "okay";
69
70 m25p80@0 {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 linux,modalias = "m25p80";
76 spi-max-frequency = <25000000>;
77
78 partition@0 {
79 label = "uboot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "uboot-env";
86 reg = <0x30000 0x4000>;
87 read-only;
88 };
89
90 factory: partition@34000 {
91 label = "factory";
92 reg = <0x34000 0x4000>;
93 read-only;
94 };
95
96 partition@38000 {
97 label = "nvram";
98 reg = <0x38000 0x8000>;
99 read-only;
100 };
101
102 partition@40000 {
103 label = "devdata";
104 reg = <0x40000 0x10000>;
105 };
106
107 partition@50000 {
108 label = "firmware";
109 reg = <0x50000 0x7b0000>;
110 };
111 };
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "i2c", "jtag", "uartf";
118 ralink,function = "gpio";
119 };
120 };
121 };
122
123 &ethernet {
124 mtd-mac-address = <&factory 0x4>;
125
126 port@0 {
127 mediatek,fixed-link = <1000 1 1 0>;
128 };
129 };
130
131 &wmac {
132 ralink,5ghz = <0>;
133 ralink,mtd-eeprom = <&factory 0>;
134 };
135
136 &ehci {
137 status = "okay";
138 };
139
140 &ohci {
141 status = "okay";
142 };