ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / rt2880_airlink101_ar725w.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "airlink101,ar725w", "ralink,rt2880-soc";
10         model = "Airlink101 AR725W";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         cfi@bdc00000 {
20                 compatible = "cfi-flash";
21                 reg = <0xbc400000 0x800000>;
22                 bank-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 reg = <0x0 0x30000>;
31                                 label = "u-boot";
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 reg = <0x30000 0x10000>;
37                                 label = "u-boot-env";
38                         };
39
40                         factory: partition@40000 {
41                                 reg = <0x40000 0x10000>;
42                                 label = "factory";
43                                 read-only;
44                         };
45
46                         partition@50000 {
47                                 compatible = "denx,uimage";
48                                 reg = <0x50000 0x3B0000>;
49                                 label = "firmware";
50                         };
51                 };
52         };
53
54         leds {
55                 compatible = "gpio-leds";
56
57                 led_power: power {
58                         label = "ar725w:green:power";
59                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
60                 };
61
62                 wpsred {
63                         label = "ar725w:red:wps";
64                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
65                 };
66
67                 wpsblue {
68                         label = "ar725w:blue:wps";
69                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
70                 };
71         };
72
73         keys {
74                 compatible = "gpio-keys-polled";
75                 poll-interval = <100>;
76
77                 wps {
78                         label = "wps";
79                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
80                         linux,code = <KEY_WPS_BUTTON>;
81                 };
82
83                 reset {
84                         label = "reset";
85                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
86                         linux,code = <KEY_RESTART>;
87                 };
88         };
89 };
90
91 &gpio0 {
92         status = "okay";
93 };
94
95 &pinctrl {
96         state_default: pinctrl0 {
97                 gpio {
98                         ralink,group = "i2c", "spi", "uartlite";
99                         ralink,function = "gpio";
100                 };
101         };
102 };
103
104 &ethernet {
105         status = "okay";
106         mtd-mac-address = <&factory 0x4>;
107
108         port@0 {
109                 phy-handle = <&phy0>;
110                 phy-mode = "mii";
111         };
112
113         mdio-bus {
114                 status = "okay";
115
116                 phy0: ethernet-phy@0 {
117                         phy-mode = "mii";
118                         reg = <0>;
119                 };
120         };
121 };
122
123 &wmac {
124         status = "okay";
125         ralink,mtd-eeprom = <&factory 0>;
126 };