ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / M2M.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "intenso,memory2move", "ralink,rt5350-soc";
10         model = "Intenso Memory 2 Move";
11
12         aliases {
13                 led-status = &led_wifi;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5";
18         };
19
20         gpio-leds {
21                 compatible = "gpio-leds";
22
23                 led_wifi: wifi {
24                         label = "m2m:blue:wifi";
25                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
26                 };
27
28                 wan {
29                         label = "m2m:green:wan";
30                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
31                 };
32         };
33
34         gpio-keys-polled {
35                 compatible = "gpio-keys-polled";
36                 poll-interval = <20>;
37
38                 power {
39                         label = "power";
40                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
41                         linux,code = <KEY_POWER>;
42                 };
43
44                 reset {
45                         label = "reset";
46                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_RESTART>;
48                 };
49         };
50 };
51
52 &spi0 {
53         status = "okay";
54
55         m25p80@0 {
56                 compatible = "jedec,spi-nor";
57                 reg = <0>;
58                 spi-max-frequency = <10000000>;
59
60                 partitions {
61                         compatible = "fixed-partitions";
62                         #address-cells = <1>;
63                         #size-cells = <1>;
64
65                         partition@0 {
66                                 label = "Bootloader";
67                                 reg = <0x0 0x30000>;
68                                 read-only;
69                         };
70
71                         partition@30000 {
72                                 label = "Config";
73                                 reg = <0x30000 0x10000>;
74                                 read-only;
75                         };
76
77                         factory: partition@40000 {
78                                 label = "Factory";
79                                 reg = <0x40000 0x10000>;
80                                 read-only;
81                         };
82
83                         partition@50000 {
84                                 label = "firmware";
85                                 reg = <0x50000 0x7b0000>;
86                         };
87                 };
88         };
89 };
90
91 &pinctrl {
92         state_default: pinctrl0 {
93                 gpio {
94                         ralink,group = "i2c", "uartf";
95                         ralink,function = "gpio";
96                 };
97         };
98 };
99
100 &ethernet {
101         mtd-mac-address = <&factory 0x28>;
102 };
103
104 &esw {
105         mediatek,portmap = <0x2f>;
106 };
107
108 &ehci {
109         status = "okay";
110 };
111
112 &ohci {
113         status = "okay";
114 };
115
116 &wmac {
117         ralink,mtd-eeprom = <&factory 0x0>;
118 };