e085162531bf85400b43960be201207c3c875c38
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_tplink_archer-c20i.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,archer-c20i", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C20i";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 lan {
20 label = "archer-c20i:blue:lan";
21 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "archer-c20i:blue:usb";
26 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&ohci_port1>, <&ehci_port1>;
28 linux,default-trigger = "usbport";
29 };
30
31 wps {
32 label = "archer-c20i:blue:wps";
33 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
34 };
35
36 wan {
37 label = "archer-c20i:blue:wan";
38 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
39 };
40
41 wlan {
42 label = "archer-c20i:blue:wlan";
43 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 rfkill {
51 label = "rfkill";
52 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RFKILL>;
54 };
55
56 reset_wps {
57 label = "reset_wps";
58 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62 };
63
64 &gpio1 {
65 status = "okay";
66 };
67
68 &gpio2 {
69 status = "okay";
70 };
71
72 &gpio3 {
73 status = "okay";
74 };
75
76 &spi0 {
77 status = "okay";
78
79 m25p80@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <10000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x20000>;
92 read-only;
93 };
94
95 partition@20000 {
96 compatible = "tplink,firmware";
97 label = "firmware";
98 reg = <0x20000 0x7a0000>;
99 };
100
101 partition@7c0000 {
102 label = "config";
103 reg = <0x7c0000 0x10000>;
104 };
105
106 rom: partition@7d0000 {
107 label = "rom";
108 reg = <0x7d0000 0x10000>;
109 };
110
111 partition@7e0000 {
112 label = "romfile";
113 reg = <0x7e0000 0x10000>;
114 };
115
116 radio: partition@7f0000 {
117 label = "radio";
118 reg = <0x7f0000 0x10000>;
119 };
120 };
121 };
122 };
123
124 &pinctrl {
125 state_default: pinctrl0 {
126 gpio {
127 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
128 ralink,function = "gpio";
129 };
130 };
131 };
132
133 &ethernet {
134 pinctrl-names = "default";
135 mtd-mac-address = <&rom 0xf100>;
136 mediatek,portmap = "wllll";
137 };
138
139 &ehci {
140 status = "okay";
141 };
142
143 &ohci {
144 status = "okay";
145 };
146
147 &gsw {
148 mediatek,port4 = "ephy";
149 };
150
151 &wmac {
152 ralink,mtd-eeprom = <&radio 0x0>;
153 };
154
155 &pcie {
156 status = "okay";
157 };
158
159 &pcie0 {
160 mt76@0,0 {
161 reg = <0x0000 0 0 0 0>;
162 mediatek,mtd-eeprom = <&radio 0x8000>;
163 ieee80211-freq-limit = <5000000 6000000>;
164 };
165 };