ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / AR670W.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,ar670w", "ralink,rt2880-soc";
10         model = "Airlink101 AR670W";
11
12         aliases {
13                 led-status = &led_power;
14         };
15
16         cfi@bdc00000 {
17                 compatible = "cfi-flash";
18                 reg = <0xbc400000 0x800000>;
19                 bank-width = <2>;
20
21                 partitions {
22                         compatible = "fixed-partitions";
23                         #address-cells = <1>;
24                         #size-cells = <1>;
25
26                         partition@0 {
27                                 reg = <0x0 0x30000>;
28                                 label = "u-boot";
29                                 read-only;
30                         };
31
32                         factory: partition@30000 {
33                                 reg = <0x30000 0x10000>;
34                                 label = "factory";
35                                 read-only;
36                         };
37
38                         partition@40000 {
39                                 reg = <0x40000 0x3c0000>;
40                                 label = "firmware";
41                         };
42                 };
43         };
44
45         gpio-leds {
46                 compatible = "gpio-leds";
47
48                 led_power: power {
49                         label = "ar670w:green:power";
50                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wpsblue {
54                         label = "ar670w:blue:wps";
55                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
56                 };
57         };
58
59         gpio-keys-polled {
60                 compatible = "gpio-keys-polled";
61                 poll-interval = <100>;
62
63                 wps {
64                         label = "wps";
65                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
66                         linux,code = <KEY_WPS_BUTTON>;
67                 };
68
69                 reset {
70                         label = "reset";
71                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
72                         linux,code = <KEY_RESTART>;
73                 };
74         };
75 };
76
77 &gpio0 {
78         status = "okay";
79 };
80
81 &pinctrl {
82         state_default: pinctrl0 {
83                 gpio {
84                         ralink,group = "i2c", "spi", "uartlite";
85                         ralink,function = "gpio";
86                 };
87         };
88 };
89
90 &ethernet {
91         status = "okay";
92         mtd-mac-address = <&factory 0x2004>;
93
94         port@0 {
95                 phy-handle = <&phy0>;
96                 phy-mode = "mii";
97         };
98
99         mdio-bus {
100                 status = "okay";
101
102                 phy0: ethernet-phy@0 {
103                         phy-mode = "mii";
104                         reg = <0>;
105                 };
106         };
107 };
108
109 &wmac {
110         status = "okay";
111         ralink,mtd-eeprom = <&factory 0x2000>;
112 };