ramips: set usb led trigger via devicetree
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / ArcherC50.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "tplink,c50", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C50";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 lan {
24 label = "c50:green:lan";
25 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power: power {
29 label = "c50:green:power";
30 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 usb {
35 label = "c50:green:usb";
36 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&ohci_port1>, <&ehci_port1>;
38 linux,default-trigger = "usbport";
39 };
40
41 wan {
42 label = "c50:green:wan";
43 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
44 };
45
46 wan_orange {
47 label = "c50:orange:wan";
48 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
49 };
50
51 wlan5g {
52 label = "c50:green:wlan5g";
53 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
54 };
55
56 wlan2g {
57 label = "c50:green:wlan2g";
58 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
59 };
60
61 wps {
62 label = "c50:green:wps";
63 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 gpio-keys-polled {
68 compatible = "gpio-keys-polled";
69 poll-interval = <20>;
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76
77 rfkill {
78 label = "rfkill";
79 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_RFKILL>;
81 }; };
82 };
83
84 &gpio1 {
85 status = "okay";
86 };
87
88 &gpio2 {
89 status = "okay";
90 };
91
92 &gpio3 {
93 status = "okay";
94 };
95
96 &spi0 {
97 status = "okay";
98
99 m25p80@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <10000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x0 0x20000>;
112 read-only;
113 };
114
115 partition@20000 {
116 label = "firmware";
117 reg = <0x20000 0x7a0000>;
118 };
119
120 partition@7c0000 {
121 label = "config";
122 reg = <0x7c0000 0x10000>;
123 read-only;
124 };
125
126 rom: partition@7d0000 {
127 label = "rom";
128 reg = <0x7d0000 0x10000>;
129 read-only;
130 };
131
132 partition@7e0000 {
133 label = "romfile";
134 reg = <0x7e0000 0x10000>;
135 read-only;
136 };
137
138 radio: partition@7f0000 {
139 label = "radio";
140 reg = <0x7f0000 0x10000>;
141 read-only;
142 };
143 };
144 };
145 };
146
147 &pinctrl {
148 state_default: pinctrl0 {
149 gpio {
150 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd";
151 ralink,function = "gpio";
152 };
153 };
154 };
155
156 &ethernet {
157 pinctrl-names = "default";
158 mtd-mac-address = <&rom 0xf100>;
159 mediatek,portmap = "wllll";
160 };
161
162 &ehci {
163 status = "okay";
164 };
165
166 &ohci {
167 status = "okay";
168 };
169
170 &gsw {
171 mediatek,port4 = "ephy";
172 };
173
174 &wmac {
175 ralink,mtd-eeprom = <&radio 0>;
176 mtd-mac-address = <&rom 0xf100>;
177 mtd-mac-address-increment = <(-2)>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&pa_pins>;
180 };
181
182 &pcie {
183 status = "okay";
184 };
185
186 &pcie0 {
187 mt76@0,0 {
188 reg = <0x0000 0 0 0 0>;
189 mediatek,mtd-eeprom = <&radio 32768>;
190 ieee80211-freq-limit = <5000000 6000000>;
191 mtd-mac-address = <&rom 0xf100>;
192 mtd-mac-address-increment = <(-1)>;
193 };
194 };