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