ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / PSR-680W.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 = "petatel,psr-680w", "ralink,rt3052-soc";
10         model = "Petatel PSR-680W Wireless 3G Router";
11
12         aliases {
13                 led-status = &led_wan;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,115200";
18         };
19
20         cfi@1f000000 {
21                 compatible = "cfi-flash";
22                 reg = <0x1f000000 0x800000>;
23                 bank-width = <2>;
24                 device-width = <2>;
25
26                 partitions {
27                         compatible = "fixed-partitions";
28                         #address-cells = <1>;
29                         #size-cells = <1>;
30
31                         partition@0 {
32                                 label = "u-boot";
33                                 reg = <0x0 0x30000>;
34                                 read-only;
35                         };
36
37                         partition@30000 {
38                                 label = "u-boot-env";
39                                 reg = <0x30000 0x10000>;
40                                 read-only;
41                         };
42
43                         factory: partition@40000 {
44                                 label = "factory";
45                                 reg = <0x40000 0x10000>;
46                                 read-only;
47                         };
48
49                         partition@50000 {
50                                 label = "firmware";
51                                 reg = <0x50000 0x3b0000>;
52                         };
53                 };
54         };
55
56         gpio-leds {
57                 compatible = "gpio-leds";
58
59                 led_wan: wan {
60                         label = "psr-680w:red:wan";
61                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
62                 };
63         };
64
65         gpio-keys-polled {
66                 compatible = "gpio-keys-polled";
67                 poll-interval = <20>;
68
69                 reset {
70                         label = "reset";
71                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
72                         linux,code = <KEY_RESTART>;
73                 };
74         };
75 };
76
77 &pinctrl {
78         state_default: pinctrl0 {
79                 gpio {
80                         ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
81                         ralink,function = "gpio";
82                 };
83         };
84 };
85
86 &ethernet {
87         mtd-mac-address = <&factory 0x4>;
88 };
89
90 &esw {
91         mediatek,portmap = <0x3e>;
92 };
93
94 &wmac {
95         ralink,mtd-eeprom = <&factory 0>;
96 };
97
98 &otg {
99         status = "okay";
100 };