ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / WLI-TX4-AG300N.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         #address-cells = <1>;
10         #size-cells = <1>;
11         compatible = "buffalo,wli-tx4-ag300n", "ralink,rt2880-soc";
12         model = "Buffalo WLI-TX4-AG300N";
13
14         aliases {
15                 led-status = &led_power;
16         };
17
18         cfi@1f000000 {
19                 compatible = "cfi-flash";
20                 reg = <0x1f000000 0x800000>;
21                 bank-width = <2>;
22                 device-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 label = "uboot";
31                                 reg = <0x0 0x30000>;
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 label = "uboot-env";
37                                 reg = <0x30000 0x10000>;
38                                 read-only;
39                         };
40
41                         factory: partition@40000 {
42                                 label = "factory";
43                                 reg = <0x40000 0x10000>;
44                                 read-only;
45                         };
46
47                         partition@50000 {
48                                 label = "firmware";
49                                 reg = <0x50000 0x3b0000>;
50                         };
51                 };
52         };
53
54         gpio-keys-polled {
55                 compatible = "gpio-keys-polled";
56                 poll-interval = <100>;
57
58                 wps {
59                         label = "wps";
60                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
61                         linux,code = <KEY_WPS_BUTTON>;
62                 };
63
64                 bandwidth {
65                         label = "bandwidth";
66                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
67                         linux,code = <KEY_RESTART>;
68                 };
69
70                 reset {
71                         label = "reset";
72                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
73                         linux,code = <KEY_RESTART>;
74                 };
75         };
76
77         gpio-leds {
78                 compatible = "gpio-leds";
79
80                 diag {
81                         label = "wli-tx4-ag300n:red:diag";
82                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
83                 };
84
85                 led_power: power {
86                         label = "wli-tx4-ag300n:blue:power";
87                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
88                 };
89
90                 security {
91                         label = "wli-tx4-ag300n:blue:security";
92                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
93                 };
94         };
95 };
96
97 &gpio0 {
98         status = "okay";
99 };
100
101 &ethernet {
102         status = "okay";
103         mtd-mac-address = <&factory 0x4>;
104
105         port@0 {
106                 mediatek,fixed-link = <100 1 1 1>;
107         };
108
109         mdio-bus {
110                 status = "okay";
111
112                 phy0: ethernet-phy@0 {
113                         phy-mode = "mii";
114                         reg = <0>;
115                 };
116         };
117 };
118
119 &wmac {
120         ralink,mtd-eeprom = <&factory 0>;
121 };