ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / WL-341V3.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "sitecom,wl-341-v3", "ralink,rt3052-soc";
10         model = "Sitecom WL-341 v3";
11
12         cfi@1f000000 {
13                 compatible = "cfi-flash";
14                 reg = <0x1f000000 0x800000>;
15                 bank-width = <2>;
16                 device-width = <2>;
17
18                 partitions {
19                         compatible = "fixed-partitions";
20                         #address-cells = <1>;
21                         #size-cells = <1>;
22
23                         partition@0 {
24                                 label = "u-boot";
25                                 reg = <0x0 0x20000>;
26                                 read-only;
27                         };
28
29                         boardnvram: partition@20000 {
30                                 label = "board-nvram";
31                                 reg = <0x20000 0x10000>;
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 label = "u-boot-env";
37                                 reg = <0x30000 0x10000>;
38                                 read-only;
39                         };
40
41                         partition@40000 {
42                                 label = "firmware";
43                                 reg = <0x40000 0x3b0000>;
44                         };
45                 };
46         };
47
48         gpio-leds {
49                 compatible = "gpio-leds";
50
51                 first {
52                         label = "wl-341v3:amber:first";
53                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
54                 };
55
56                 first2 {
57                         label = "wl-341v3:blue:first";
58                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
59                 };
60
61                 third {
62                         label = "wl-341v3:amber:third";
63                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
64                 };
65
66                 third2 {
67                         label = "wl-341v3:blue:third";
68                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
69                 };
70
71                 fourth {
72                         label = "wl-341v3:blue:fourth";
73                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
74                 };
75
76                 fifth {
77                         label = "wl-341v3:amber:fifth";
78                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
79                 };
80
81                 fifth2 {
82                         label = "wl-341v3:blue:fifth";
83                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
84                 };
85         };
86
87         gpio-keys-polled {
88                 compatible = "gpio-keys-polled";
89                 poll-interval = <20>;
90
91                 reset {
92                         label = "reset";
93                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
94                         linux,code = <KEY_RESTART>;
95                 };
96
97                 wps {
98                         label = "wps";
99                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
100                         linux,code = <KEY_WPS_BUTTON>;
101                 };
102         };
103 };
104
105 &pinctrl {
106         state_default: pinctrl0 {
107                 gpio {
108                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
109                         ralink,function = "gpio";
110                 };
111         };
112 };
113
114 &ethernet {
115         mtd-mac-address = <&boardnvram 0xffa0>;
116 };
117
118 &esw {
119         mediatek,portmap = <0x3e>;
120 };
121
122 &wmac {
123         ralink,mtd-eeprom = <&boardnvram 0xfd70>;
124 };
125
126 &otg {
127         status = "okay";
128 };