ramips: set usb led trigger via devicetree
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 3G300M.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 = "tenda,3g300m", "ralink,rt3052-soc";
10 model = "Tenda 3G300M";
11
12 aliases {
13 led-status = &led_ap;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 3grouter {
20 label = "3g300m:blue:3grouter";
21 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
22 };
23
24 led_ap: ap {
25 label = "3g300m:blue:ap";
26 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
27 };
28
29 wisprouter {
30 label = "3g300m:blue:wisprouter";
31 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
32 };
33
34 wirelessrouter {
35 label = "3g300m:blue:wirelessrouter";
36 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
37 };
38
39 3g {
40 label = "3g300m:blue:3g";
41 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
42 trigger-sources = <&otg_port1>;
43 linux,default-trigger = "usbport";
44 };
45
46 wpsreset {
47 label = "3g300m:blue:wpsreset";
48 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
49 };
50 };
51
52 gpio-keys-polled {
53 compatible = "gpio-keys-polled";
54 poll-interval = <20>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 mode {
63 label = "mode";
64 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
65 linux,code = <BTN_0>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99 };
100
101 partition@50000 {
102 label = "firmware";
103 reg = <0x50000 0x3b0000>;
104 };
105 };
106 };
107 };
108
109 &pinctrl {
110 state_default: pinctrl0 {
111 gpio {
112 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
113 ralink,function = "gpio";
114 };
115 };
116 };
117
118 &ethernet {
119 mtd-mac-address = <&factory 0x4>;
120 };
121
122 &esw {
123 mediatek,portmap = <0x2f>;
124 };
125
126 &wmac {
127 ralink,mtd-eeprom = <&factory 0>;
128 };
129
130 &otg {
131 status = "okay";
132 };