43b021fa13ae816e32234241f29cec6f690c36e2
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_mtc_wr1201.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "mtc,wr1201", "mediatek,mt7621-soc";
8 model = "MTC Wireless Router WR1201";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &gmac0;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 label = "green:power";
23 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
24 };
25
26 usb {
27 label = "green:usb";
28 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
29 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
30 linux,default-trigger = "usbport";
31 };
32
33 eth_link {
34 label = "green:eth_link";
35 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
36 };
37
38 wps {
39 label = "green:wps";
40 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "Bootloader";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "Config";
76 reg = <0x30000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@40000 {
81 label = "factory";
82 reg = <0x40000 0x10000>;
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x200>;
92 };
93
94 eeprom_factory_8000: eeprom@8000 {
95 reg = <0x8000 0x200>;
96 };
97
98 macaddr_factory_4: macaddr@4 {
99 compatible = "mac-base";
100 reg = <0x4 0x6>;
101 #nvmem-cell-cells = <1>;
102 };
103 };
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x50000 0xfa0000>;
110 };
111
112 partition@ff0000 {
113 label = "Second_Config";
114 reg = <0xff0000 0x10000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &ethernet {
122 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
123 };
124
125 &gmac0 {
126 nvmem-cells = <&macaddr_factory_4 0>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &switch0 {
131 ports {
132 port@0 {
133 status = "okay";
134 label = "lan4";
135 };
136
137 port@1 {
138 status = "okay";
139 label = "lan3";
140 };
141
142 port@2 {
143 status = "okay";
144 label = "lan2";
145 };
146
147 port@3 {
148 status = "okay";
149 label = "lan1";
150 };
151
152 port@4 {
153 status = "okay";
154 label = "wan";
155 nvmem-cells = <&macaddr_factory_4 1>;
156 nvmem-cell-names = "mac-address";
157 };
158 };
159 };
160
161 &sdhci {
162 status = "okay";
163 };
164
165 &pcie {
166 status = "okay";
167 };
168
169 &pcie0 {
170 wifi@0,0 {
171 reg = <0x0000 0 0 0 0>;
172 ieee80211-freq-limit = <5000000 6000000>;
173 nvmem-cells = <&eeprom_factory_8000>;
174 nvmem-cell-names = "eeprom";
175
176 led {
177 led-sources = <2>;
178 led-active-low;
179 };
180 };
181 };
182
183 &pcie1 {
184 wifi@0,0 {
185 reg = <0x0000 0 0 0 0>;
186 ieee80211-freq-limit = <2400000 2500000>;
187 nvmem-cells = <&eeprom_factory_0>;
188 nvmem-cell-names = "eeprom";
189
190 led {
191 led-sources = <2>;
192 led-active-low;
193 };
194 };
195 };
196
197 &state_default {
198 gpio {
199 groups = "rgmii2";
200 function = "gpio";
201 };
202 };