ramips: TP-Link TL-WR902AC v3: add missing wps button
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / ArcherC2-v1.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,c2-v1", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C2 v1";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 pinctrl {
17 state_default: pinctrl0 {
18 gpio {
19 ralink,group = "i2c", "uartf", "wled", "ephy", "spi refclk";
20 ralink,function = "gpio";
21 };
22 };
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 lan {
29 label = "c2-v1:green:lan";
30 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
31 };
32
33 usb {
34 label = "c2-v1:green:usb";
35 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
36 };
37
38 wps {
39 label = "c2-v1:green:wps";
40 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
41 };
42
43 wan {
44 label = "c2-v1:green:wan";
45 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan {
49 label = "c2-v1:green:wlan";
50 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
51 };
52 };
53
54 gpio-keys {
55 compatible = "gpio-keys";
56
57 reset_wps {
58 label = "reset_wps";
59 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RESTART>;
61 };
62
63 rfkill {
64 label = "rfkill";
65 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
66 linux,code = <KEY_RFKILL>;
67 };
68 };
69
70 rtl8367rb {
71 compatible = "realtek,rtl8367b", "rtl8367b";
72 cpu_port = <6>;
73 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
74 mii-bus = <&mdio0>;
75 };
76 };
77
78 &spi0 {
79 status = "okay";
80
81 m25p80@0 {
82 #address-cells = <1>;
83 #size-cells = <1>;
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <10000000>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x20000>;
91 read-only;
92 };
93
94 partition@20000 {
95 label = "firmware";
96 reg = <0x20000 0x7a0000>;
97 };
98
99 partition@7c0000 {
100 label = "config";
101 reg = <0x7c0000 0x10000>;
102 read-only;
103 };
104
105 rom: partition@7d0000 {
106 label = "rom";
107 reg = <0x7d0000 0x10000>;
108 read-only;
109 };
110
111 partition@7e0000 {
112 label = "romfile";
113 reg = <0x7e0000 0x10000>;
114 read-only;
115 };
116
117 radio: partition@7f0000 {
118 label = "radio";
119 reg = <0x7f0000 0x10000>;
120 read-only;
121 };
122 };
123 };
124
125 &ethernet {
126 status = "okay";
127 mtd-mac-address = <&rom 0xf100>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
130
131 port@5 {
132 status = "okay";
133 mediatek,fixed-link = <1000 1 1 1>;
134 phy-mode = "rgmii";
135 };
136
137 mdio0: mdio-bus {
138 status = "okay";
139 };
140 };
141
142
143 &gpio1 {
144 status = "okay";
145 };
146
147 &gpio2 {
148 status = "okay";
149 };
150
151 &gpio3 {
152 status = "okay";
153 };
154
155 &wmac {
156 ralink,mtd-eeprom = <&radio 0>;
157 mtd-mac-address = <&rom 0xf100>;
158 };
159
160 &ehci {
161 status = "okay";
162 };
163
164 &ohci {
165 status = "okay";
166 };
167
168 &pcie {
169 status = "okay";
170
171 pcie-bridge {
172 mt76@0,0 {
173 reg = <0x0000 0 0 0 0>;
174 device_type = "pci";
175 mediatek,mtd-eeprom = <&radio 0x8000>;
176 };
177 };
178 };