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