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