ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / EW1200.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
10         model = "EW1200";
11
12         aliases {
13                 led-status = &led_run;
14         };
15
16         memory@0 {
17                 device_type = "memory";
18                 reg = <0x0 0x8000000>;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,57600";
23         };
24
25         palmbus: palmbus@1E000000 {
26                 i2c@900 {
27                         status = "okay";
28                 };
29         };
30
31         gpio-keys-polled {
32                 compatible = "gpio-keys-polled";
33                 poll-interval = <20>;
34
35                 reset {
36                         label = "reset";
37                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_RESTART>;
39                 };
40         };
41
42         gpio-leds {
43                 compatible = "gpio-leds";
44
45                 led_run: run {
46                         label = "ew1200:green:run";
47                         gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
48                 };
49
50                 usb {
51                         label = "ew1200:green:usb";
52                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
53                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
54                         linux,default-trigger = "usbport";
55                 };
56         };
57 };
58
59 &sdhci {
60         status = "okay";
61 };
62
63 &spi0 {
64         status = "okay";
65
66         m25p80@0 {
67                 compatible = "jedec,spi-nor";
68                 reg = <0>;
69                 spi-max-frequency = <10000000>;
70                 m25p,chunked-io = <32>;
71
72                 partitions {
73                         compatible = "fixed-partitions";
74                         #address-cells = <1>;
75                         #size-cells = <1>;
76
77                         partition@0 {
78                                 label = "u-boot";
79                                 reg = <0x0 0x30000>;
80                                 read-only;
81                         };
82
83                         partition@30000 {
84                                 label = "u-boot-env";
85                                 reg = <0x30000 0x10000>;
86                                 read-only;
87                         };
88
89                         factory: partition@40000 {
90                                 label = "factory";
91                                 reg = <0x40000 0x10000>;
92                                 read-only;
93                         };
94
95                         partition@50000 {
96                                 label = "firmware";
97                                 reg = <0x50000 0xfb0000>;
98                         };
99                 };
100         };
101 };
102
103 &pcie {
104         status = "okay";
105 };
106
107 &pcie0 {
108         mt76@0,0 {
109                 reg = <0x0000 0 0 0 0>;
110                 mediatek,mtd-eeprom = <&factory 0x8000>;
111                 ieee80211-freq-limit = <5000000 6000000>;
112         };
113 };
114
115 &pcie1 {
116         mt76@0,0 {
117                 reg = <0x0000 0 0 0 0>;
118                 mediatek,mtd-eeprom = <&factory 0x0000>;
119                 ieee80211-freq-limit = <2400000 2500000>;
120         };
121 };
122
123 &ethernet {
124         mtd-mac-address = <&factory 0xe000>;
125 };
126
127 &pinctrl {
128         state_default: pinctrl0 {
129                 gpio {
130                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
131                         ralink,function = "gpio";
132                 };
133         };
134 };