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