92080da905553bd12542b2430cfa080bd963d540
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / ArcherC20v4.dts
1 /dts-v1/;
2
3 #include "TPLINK-8M.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "tplink,c20-v4", "mediatek,mt7628an-soc";
10 model = "TP-Link Archer C20 v4";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 lan {
20 label = "c20-v4:green:lan";
21 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
22 };
23
24 led_power: power {
25 label = "c20-v4:green:power";
26 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
27 };
28
29 wan {
30 label = "c20-v4:green:wan";
31 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
32 };
33
34 wan_orange {
35 label = "c20-v4:orange:wan";
36 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan5g {
40 label = "c20-v4:green:wlan5g";
41 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "c20-v4:green:wlan2g";
46 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
47 };
48
49 wps {
50 label = "c20-v4:green:wps";
51 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 gpio-keys-polled {
56 compatible = "gpio-keys-polled";
57 #address-cells = <1>;
58 #size-cells = <0>;
59 poll-interval = <20>;
60
61 reset {
62 label = "reset";
63 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_RESTART>;
65 };
66
67 rfkill {
68 label = "rfkill";
69 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RFKILL>;
71 };
72 };
73 };
74
75 &wmac {
76 mtd-mac-address-increment = <(-2)>;
77 };
78
79 &ethernet {
80 mediatek,portmap = "wllll";
81 };
82
83 &pinctrl {
84 state_default: pinctrl0 {
85 gpio {
86 ralink,group = "i2s", "refclk", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt";
87 ralink,function = "gpio";
88 };
89 };
90 };
91
92 &pcie {
93 status = "okay";
94
95 pcie-bridge {
96 mt76@0,0 {
97 reg = <0x0000 0 0 0 0>;
98 device_type = "pci";
99 mediatek,mtd-eeprom = <&factory 0x28000>;
100 ieee80211-freq-limit = <5000000 6000000>;
101 mtd-mac-address = <&factory 0xf100>;
102 mtd-mac-address-increment = <(-1)>;
103 };
104 };
105 };