ramips: TP-Link Archer C5 v4: license and file formatting fixes
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_huasifei_ws1208v2.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc";
9 model = "Huasifei WS1208V2";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
16 label-mac-device = &gmac0;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 button-reset {
27 label = "Reset";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_status: led-status {
37 function = LED_FUNCTION_STATUS;
38 color = <LED_COLOR_ID_GREEN>;
39 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
40 };
41
42 led-cellular {
43 label = "green:cellular";
44 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
45 };
46
47 led-wlan5g {
48 label = "green:wlan5g";
49 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy1tpt";
51 };
52
53 led-wlan2g {
54 label = "green:wlan2g";
55 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 led-usb {
60 function = LED_FUNCTION_USB;
61 color = <LED_COLOR_ID_GREEN>;
62 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
63 trigger-sources = <&xhci_ehci_port1>;
64 linux,default-trigger = "usbport";
65 };
66 };
67 };
68
69 &sdhci {
70 status = "okay";
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <10000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "u-boot-env";
94 reg = <0x30000 0x10000>;
95 read-only;
96 };
97
98 partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x400>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x200>;
114 };
115
116 macaddr_factory_e000: macaddr@e000 {
117 reg = <0xe000 0x6>;
118 };
119 };
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 reg = <0x50000 0xfb0000>;
125 label = "firmware";
126 };
127 };
128 };
129 };
130
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie0 {
136 wifi@0,0 {
137 compatible = "pci14c3,7603";
138 reg = <0x0000 0 0 0 0>;
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };
142 };
143
144 &pcie1 {
145 wifi@0,0 {
146 compatible = "pci14c3,7662";
147 reg = <0x0000 0 0 0 0>;
148 nvmem-cells = <&eeprom_factory_8000>;
149 nvmem-cell-names = "eeprom";
150 ieee80211-freq-limit = <5000000 6000000>;
151
152 led {
153 led-sources = <2>;
154 };
155 };
156 };
157
158 &gmac0 {
159 nvmem-cells = <&macaddr_factory_e000>;
160 nvmem-cell-names = "mac-address";
161 };
162
163 &gmac1 {
164 status = "okay";
165 label = "wan";
166 phy-handle = <&ethphy4>;
167
168 nvmem-cells = <&macaddr_factory_e000>;
169 nvmem-cell-names = "mac-address";
170 };
171
172 &mdio {
173 ethphy4: ethernet-phy@4 {
174 reg = <4>;
175 };
176 };
177
178 &switch0 {
179 ports {
180 port@0 {
181 status = "okay";
182 label = "lan1";
183 };
184
185 port@1 {
186 status = "okay";
187 label = "lan2";
188 };
189
190 port@2 {
191 status = "okay";
192 label = "lan3";
193 };
194
195 port@3 {
196 status = "okay";
197 label = "lan4";
198 };
199 };
200 };