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