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