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