ramips: set usb led trigger via devicetree
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / ALL0239-3G.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 = "allnet,all0239-3g", "ralink,rt3052-soc";
10 model = "Allnet ALL0239-3G";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16
17 cfi@1f000000 {
18 compatible = "cfi-flash";
19 reg = <0x1f000000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "u-boot";
30 reg = <0x0 0x30000>;
31 read-only;
32 };
33
34 partition@30000 {
35 label = "u-boot-env";
36 reg = <0x30000 0x10000>;
37 read-only;
38 };
39
40 factory: partition@40000 {
41 label = "factory";
42 reg = <0x40000 0x10000>;
43 read-only;
44 };
45
46 partition@50000 {
47 label = "firmware";
48 reg = <0x50000 0x7b0000>;
49 };
50 };
51 };
52
53 gpio-leds {
54 compatible = "gpio-leds";
55
56 usb {
57 label = "all0239-3g:green:usb";
58 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
59 trigger-sources = <&otg_port1>;
60 linux,default-trigger = "usbport";
61 };
62
63 3g {
64 label = "all0239-3g:green:3g";
65 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
66 };
67
68 led_status: status {
69 label = "all0239-3g:green:status";
70 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
71 };
72
73 wps {
74 label = "all0239-3g:green:wps";
75 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
76 };
77 };
78
79 gpio-keys-polled {
80 compatible = "gpio-keys-polled";
81 poll-interval = <20>;
82
83 reset {
84 label = "reset";
85 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_RESTART>;
87 };
88
89 connect {
90 label = "connect";
91 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_CONNECT>;
93 };
94
95 wps {
96 label = "wps";
97 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_WPS_BUTTON>;
99 };
100 };
101 };
102
103 &pinctrl {
104 state_default: pinctrl0 {
105 gpio {
106 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
107 ralink,function = "gpio";
108 };
109 };
110 };
111
112 &ethernet {
113 mtd-mac-address = <&factory 0x28>;
114 };
115
116 &esw {
117 status = "okay";
118 mediatek,portmap = <0x3e>;
119 };
120
121 &wmac {
122 ralink,mtd-eeprom = <&factory 0>;
123 };
124
125 &otg {
126 status = "okay";
127 };