ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mtc_wr1201.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "mtc,wr1201", "mediatek,mt7621-soc";
10         model = "MTC Wireless Router WR1201";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17                 label-mac-device = &ethernet;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "wr1201:green:power";
29                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
30                 };
31
32                 usb {
33                         label = "wr1201:green:usb";
34                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
36                         linux,default-trigger = "usbport";
37                 };
38
39                 eth_link {
40                         label = "wr1201:green:eth_link";
41                         gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
42                 };
43
44                 wps {
45                         label = "wr1201:green:wps";
46                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
47                 };
48         };
49
50         keys {
51                 compatible = "gpio-keys";
52
53                 reset {
54                         label = "reset";
55                         gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
56                         linux,code = <KEY_RESTART>;
57                 };
58         };
59 };
60
61 &spi0 {
62         status = "okay";
63
64         flash@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <10000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         partition@0 {
75                                 label = "Bootloader";
76                                 reg = <0x0 0x30000>;
77                                 read-only;
78                         };
79
80                         partition@30000 {
81                                 label = "Config";
82                                 reg = <0x30000 0x10000>;
83                                 read-only;
84                         };
85
86                         factory: partition@40000 {
87                                 label = "factory";
88                                 reg = <0x40000 0x10000>;
89                                 read-only;
90                         };
91
92                         partition@50000 {
93                                 compatible = "denx,uimage";
94                                 label = "firmware";
95                                 reg = <0x50000 0xfa0000>;
96                         };
97
98                         partition@ff0000 {
99                                 label = "Second_Config";
100                                 reg = <0xff0000 0x10000>;
101                                 read-only;
102                         };
103                 };
104         };
105 };
106
107 &ethernet {
108         mtd-mac-address = <&factory 0x4>;
109 };
110
111 &sdhci {
112         status = "okay";
113 };
114
115 &pcie {
116         status = "okay";
117 };
118
119 &pcie0 {
120         wifi@0,0 {
121                 reg = <0x0000 0 0 0 0>;
122                 mediatek,mtd-eeprom = <&factory 0x8000>;
123                 ieee80211-freq-limit = <5000000 6000000>;
124
125                 led {
126                         led-sources = <2>;
127                         led-active-low;
128                 };
129         };
130 };
131
132 &pcie1 {
133         wifi@0,0 {
134                 reg = <0x0000 0 0 0 0>;
135                 mediatek,mtd-eeprom = <&factory 0x0000>;
136                 ieee80211-freq-limit = <2400000 2500000>;
137
138                 led {
139                         led-sources = <2>;
140                         led-active-low;
141                 };
142         };
143 };
144
145 &pinctrl {
146         state_default: pinctrl0 {
147                 gpio {
148                         ralink,group = "rgmii2";
149                         ralink,function = "gpio";
150                 };
151         };
152 };