ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_mqmaker_witi.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 = "mqmaker,witi", "mediatek,mt7621-soc";
10         model = "MQmaker WiTi";
11
12         chosen {
13                 bootargs = "console=ttyS0,57600";
14         };
15
16         palmbus: palmbus@1E000000 {
17                 i2c@900 {
18                         status = "okay";
19
20                         pcf8563: rtc@51 {
21                                 status = "okay";
22                                 compatible = "nxp,pcf8563";
23                                 reg = <0x51>;
24                         };
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys";
30
31                 reset {
32                         label = "reset";
33                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
34                         linux,code = <KEY_RESTART>;
35                 };
36         };
37 };
38
39 &sdhci {
40         status = "okay";
41 };
42
43 &spi0 {
44         status = "okay";
45
46         m25p80@0 {
47                 compatible = "jedec,spi-nor";
48                 reg = <0>;
49                 spi-max-frequency = <10000000>;
50
51                 partitions {
52                         compatible = "fixed-partitions";
53                         #address-cells = <1>;
54                         #size-cells = <1>;
55
56                         partition@0 {
57                                 label = "u-boot";
58                                 reg = <0x0 0x30000>;
59                                 read-only;
60                         };
61
62                         partition@30000 {
63                                 label = "u-boot-env";
64                                 reg = <0x30000 0x10000>;
65                                 read-only;
66                         };
67
68                         factory: partition@40000 {
69                                 label = "factory";
70                                 reg = <0x40000 0x10000>;
71                         };
72
73                         partition@50000 {
74                                 compatible = "denx,uimage";
75                                 label = "firmware";
76                                 reg = <0x50000 0xfb0000>;
77                         };
78                 };
79         };
80 };
81
82 &pcie {
83         status = "okay";
84 };
85
86 &pcie0 {
87         mt76@0,0 {
88                 reg = <0x0000 0 0 0 0>;
89                 mediatek,mtd-eeprom = <&factory 0x8000>;
90                 ieee80211-freq-limit = <5000000 6000000>;
91                 mtd-mac-address = <&factory 0xe000>;
92         };
93 };
94
95 &pcie1 {
96         mt76@0,0 {
97                 reg = <0x0000 0 0 0 0>;
98                 mediatek,mtd-eeprom = <&factory 0x0000>;
99                 ieee80211-freq-limit = <2400000 2500000>;
100                 mtd-mac-address = <&factory 0xe000>;
101         };
102 };
103
104 &ethernet {
105         mtd-mac-address = <&factory 0xe000>;
106 };
107
108 &pinctrl {
109         state_default: pinctrl0 {
110                 gpio {
111                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
112                         ralink,function = "gpio";
113                 };
114         };
115 };