5872a710b886d4e04c0d58e65b1c483aa5ad8684
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
82 label = "factory";
83 reg = <0x40000 0x10000>;
84 #address-cells = <1>;
85 #size-cells = <1>;
86 read-only;
87
88 eeprom_factory_0: eeprom@0 {
89 reg = <0x0 0x200>;
90 };
91
92 eeprom_factory_8000: eeprom@8000 {
93 reg = <0x8000 0x200>;
94 };
95
96 macaddr_factory_4: macaddr@4 {
97 reg = <0x4 0x6>;
98 };
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfa0000>;
105 };
106
107 partition@ff0000 {
108 label = "Second_Config";
109 reg = <0xff0000 0x10000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &ethernet {
117 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_factory_4>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &switch0 {
126 ports {
127 port@0 {
128 status = "okay";
129 label = "lan4";
130 };
131
132 port@1 {
133 status = "okay";
134 label = "lan3";
135 };
136
137 port@2 {
138 status = "okay";
139 label = "lan2";
140 };
141
142 port@3 {
143 status = "okay";
144 label = "lan1";
145 };
146
147 port@4 {
148 status = "okay";
149 label = "wan";
150 nvmem-cells = <&macaddr_factory_4>;
151 nvmem-cell-names = "mac-address";
152 mac-address-increment = <1>;
153 };
154 };
155 };
156
157 &sdhci {
158 status = "okay";
159 };
160
161 &pcie {
162 status = "okay";
163 };
164
165 &pcie0 {
166 wifi@0,0 {
167 reg = <0x0000 0 0 0 0>;
168 ieee80211-freq-limit = <5000000 6000000>;
169 nvmem-cells = <&eeprom_factory_8000>;
170 nvmem-cell-names = "eeprom";
171
172 led {
173 led-sources = <2>;
174 led-active-low;
175 };
176 };
177 };
178
179 &pcie1 {
180 wifi@0,0 {
181 reg = <0x0000 0 0 0 0>;
182 ieee80211-freq-limit = <2400000 2500000>;
183 nvmem-cells = <&eeprom_factory_0>;
184 nvmem-cell-names = "eeprom";
185
186 led {
187 led-sources = <2>;
188 led-active-low;
189 };
190 };
191 };
192
193 &state_default {
194 gpio {
195 groups = "rgmii2";
196 function = "gpio";
197 };
198 };