ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn575a3.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7628an.dtsi"
6
7 / {
8         compatible = "wavlink,wl-wn575a3", "mediatek,mt7628an-soc";
9         model = "Wavlink WL-WN575A3";
10
11         chosen {
12                 bootargs = "console=ttyS0,57600";
13         };
14
15         keys {
16                 compatible = "gpio-keys";
17
18                 reset {
19                         label = "reset";
20                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
21                         linux,code = <KEY_RESTART>;
22                 };
23
24                 wps {
25                         label = "wps";
26                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
27                         linux,code = <KEY_WPS_BUTTON>;
28                 };
29         };
30
31         leds {
32                 compatible = "gpio-leds";
33
34                 wifi-high {
35                         label = "wl-wn575a3:green:wifi-high";
36                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
37                 };
38
39                 wifi-med {
40                         label = "wl-wn575a3:green:wifi-med";
41                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
42                 };
43
44                 wifi-low {
45                         label = "wl-wn575a3:green:wifi-low";
46                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wps {
50                         label = "wl-wn575a3:green:wps";
51                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
52                 };
53         };
54 };
55
56 &pinctrl {
57         state_default: pinctrl0 {
58                 gpio {
59                         ralink,group = "i2c", "wled_an", "gpio", "refclk", "wdt", "p0led_an";
60                         ralink,function = "gpio";
61                 };
62         };
63 };
64
65 &pcie {
66         status = "okay";
67 };
68
69 &pcie0 {
70         mt76@0,0 {
71                 reg = <0x0000 0 0 0 0>;
72                 mediatek,mtd-eeprom = <&factory 0x8000>;
73                 ieee80211-freq-limit = <5000000 6000000>;
74         };
75 };
76
77 &spi0 {
78         status = "okay";
79
80         flash@0 {
81                 compatible = "jedec,spi-nor";
82                 reg = <0>;
83                 spi-max-frequency = <10000000>;
84
85                 partitions {
86                         compatible = "fixed-partitions";
87                         #address-cells = <1>;
88                         #size-cells = <1>;
89
90                         partition@0 {
91                                 label = "u-boot";
92                                 reg = <0x0 0x30000>;
93                                 read-only;
94                         };
95
96                         partition@30000 {
97                                 label = "u-boot-env";
98                                 reg = <0x30000 0x10000>;
99                                 read-only;
100                         };
101
102                         factory: partition@40000 {
103                                 label = "factory";
104                                 reg = <0x40000 0x10000>;
105                                 read-only;
106                         };
107
108                         partition@50000 {
109                                 compatible = "denx,uimage";
110                                 label = "firmware";
111                                 reg = <0x50000 0x7b0000>;
112                         };
113                 };
114         };
115 };
116
117 &wmac {
118         status = "okay";
119 };
120
121 &ethernet {
122         mtd-mac-address = <&factory 0x28>;
123         mediatek,portmap = "llllw";
124 };