643747a3c4cef45fa351993f1f86f8dead43c067
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_archer-c20-v5.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an_tplink_8m-split-uboot.dtsi"
5
6 / {
7         compatible = "tplink,archer-c20-v5", "mediatek,mt7628an-soc";
8         model = "TP-Link Archer C20 v5";
9
10         aliases {
11                 led-boot = &led_power;
12                 led-failsafe = &led_power;
13                 led-running = &led_power;
14                 led-upgrade = &led_power;
15         };
16
17         keys {
18                 compatible = "gpio-keys";
19
20                 reset {
21                         label = "reset";
22                         gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
23                         linux,code = <KEY_RESTART>;
24                 };
25
26                 rfkill {
27                         label = "rfkill";
28                         gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
29                         linux,code = <KEY_RFKILL>;
30                 };
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 led_power: power {
37                         label = "archer-c20-v5:green:power";
38                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
39                 };
40
41                 wlan2g {
42                         label = "archer-c20-v5:green:wlan2g";
43                         gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
44                         linux,default-trigger = "phy0tpt";
45                 };
46
47                 wlan5g {
48                         label = "archer-c20-v5:green:wlan5g";
49                         gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
50                         linux,default-trigger = "phy1tpt";
51                 };
52
53                 lan {
54                         label = "archer-c20-v5:green:lan";
55                         gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
56                 };
57
58                 wan_green {
59                         label = "archer-c20-v5:green:wan";
60                         gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
61                 };
62
63                 wan_orange {
64                         label = "archer-c20-v5:orange:wan";
65                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
66                 };
67
68                 wps {
69                         label = "archer-c20-v5:green:wps";
70                         gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
71                 };
72         };
73 };
74
75 &state_default {
76         gpio {
77                 ralink,group = "i2s", "gpio", "refclk", "p0led_an", "p1led_an",
78                                         "p2led_an", "p3led_an", "p4led_an", "wdt";
79                 ralink,function = "gpio";
80         };
81 };
82
83 &pcie {
84         status = "okay";
85 };
86
87 &pcie0 {
88         wifi@0,0 {
89                 reg = <0x0000 0 0 0 0>;
90                 mediatek,mtd-eeprom = <&radio 0x8000>;
91                 ieee80211-freq-limit = <5000000 6000000>;
92                 mtd-mac-address = <&rom 0xf100>;
93                 mtd-mac-address-increment = <(-1)>;
94         };
95 };