ramips: set usb led trigger via devicetree
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / DWR-118-A2.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
10 model = "D-Link DWR-118 A2";
11
12 aliases {
13 led-status = &led_internet;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 poll-interval = <20>;
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 gpio-leds {
34 compatible = "gpio-leds";
35
36 wan {
37 label = "dwr-118-a2:green:wan";
38 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
39 };
40
41 led_internet: internet {
42 label = "dwr-118-a2:green:internet";
43 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
44 };
45
46 lan {
47 label = "dwr-118-a2:green:lan";
48 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
49 };
50
51 wlan2g {
52 label = "dwr-118-a2:green:wlan2g";
53 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
54 };
55
56 usb {
57 label = "dwr-118-a2:green:usb";
58 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
59 trigger-sources = <&ohci_port1>, <&ehci_port1>;
60 linux,default-trigger = "usbport";
61 };
62 };
63
64 gpio_export {
65 compatible = "gpio-export";
66 #size-cells = <0>;
67
68 usb {
69 gpio-export,name = "usb";
70 gpio-export,output = <1>;
71 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
72 };
73 };
74 };
75
76 &gpio1 {
77 status = "okay";
78 };
79
80 &gpio2 {
81 status = "okay";
82 };
83
84 &gpio3 {
85 status = "okay";
86 };
87
88 &spi0 {
89 status = "okay";
90
91 flash@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <50000000>;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 partition@0 {
102 label = "jboot";
103 reg = <0x0 0x10000>;
104 read-only;
105 };
106
107 partition@10000 {
108 label = "firmware";
109 reg = <0x10000 0xfe0000>;
110 };
111
112 config: partition@ff0000 {
113 label = "config";
114 reg = <0xff0000 0x10000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };
128
129 &pinctrl {
130 state_default: pinctrl0 {
131 default {
132 ralink,group = "ephy", "uartf", "spi refclk", "wled";
133 ralink,function = "gpio";
134 };
135 };
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie0 {
143 wifi@0,0 {
144 reg = <0x0000 0 0 0 0>;
145 ieee80211-freq-limit = <5000000 6000000>;
146 mtd-mac-address = <&config 0xe4a8>;
147 mtd-mac-address-increment = <(2)>;
148
149 led {
150 led-sources = <2>;
151 led-active-low;
152 };
153 };
154 };
155
156 &ethernet {
157 status = "okay";
158 pinctrl-names = "default";
159 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
160
161 port@4 {
162 status = "okay";
163 phy-handle = <&phy4>;
164 phy-mode = "rgmii";
165 };
166
167 mdio-bus {
168 status = "okay";
169
170 phy4: ethernet-phy@4 {
171 reg = <4>;
172 phy-mode = "rgmii";
173 };
174 };
175 };
176
177 &gsw {
178 mediatek,port4 = "gmac";
179 };