74cdacd2554281bc631e3edfdd92f33eb4de63a8
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DIR-645.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-645", "ralink,rt3883-soc";
10 model = "D-Link DIR-645";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 rtl8367b {
20 compatible = "realtek,rtl8367b";
21 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
22 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
23 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
24 };
25
26 gpio-keys-polled {
27 compatible = "gpio-keys-polled";
28 poll-interval = <100>;
29
30 reset {
31 label = "reset";
32 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
33 linux,code = <KEY_RESTART>;
34 };
35
36 wps {
37 label = "wps";
38 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
39 linux,code = <KEY_WPS_BUTTON>;
40 };
41 };
42
43 gpio-leds {
44 compatible = "gpio-leds";
45
46 inet {
47 label = "dir-645:green:inet";
48 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
49 };
50
51 led_wps: wps {
52 label = "dir-645:green:wps";
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 m25p80@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 factory: partition@34000 {
99 label = "factory";
100 reg = <0x34000 0x4000>;
101 read-only;
102 };
103
104 partition@38000 {
105 label = "nvram";
106 reg = <0x38000 0x8000>;
107 read-only;
108 };
109
110 partition@40000 {
111 label = "devdata";
112 reg = <0x40000 0x10000>;
113 };
114
115 partition@50000 {
116 label = "firmware";
117 reg = <0x50000 0x7b0000>;
118 };
119 };
120 };
121 };
122
123 &pinctrl {
124 state_default: pinctrl0 {
125 gpio {
126 ralink,group = "i2c", "jtag", "uartf";
127 ralink,function = "gpio";
128 };
129 };
130 };
131
132 &ethernet {
133 mtd-mac-address = <&factory 0x4>;
134
135 port@0 {
136 mediatek,fixed-link = <1000 1 1 0>;
137 };
138 };
139
140 &wmac {
141 ralink,5ghz = <0>;
142 ralink,mtd-eeprom = <&factory 0>;
143 };
144
145 &ehci {
146 status = "okay";
147 };
148
149 &ohci {
150 status = "okay";
151 };