ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / rt3883_dlink_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         keys {
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         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                                 compatible = "seama";
117                                 label = "firmware";
118                                 reg = <0x50000 0x7b0000>;
119                         };
120                 };
121         };
122 };
123
124 &pinctrl {
125         state_default: pinctrl0 {
126                 gpio {
127                         ralink,group = "i2c", "jtag", "uartf";
128                         ralink,function = "gpio";
129                 };
130         };
131 };
132
133 &ethernet {
134         mtd-mac-address = <&factory 0x4>;
135
136         port@0 {
137                 mediatek,fixed-link = <1000 1 1 0>;
138         };
139 };
140
141 &wmac {
142         ralink,5ghz = <0>;
143         ralink,mtd-eeprom = <&factory 0>;
144 };
145
146 &ehci {
147         status = "okay";
148 };
149
150 &ohci {
151         status = "okay";
152 };