ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc";
11         model = "I-O DATA WNPR2600G";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_power;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "wnpr2600g:green:power";
29                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
30                         default-state = "on";
31                 };
32
33                 notification {
34                         label = "wnpr2600g:green:notification";
35                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
36                 };
37
38                 wlan2g {
39                         label = "wnpr2600g:green:wlan2g";
40                         gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
41                         linux,default-trigger = "phy0radio";
42                 };
43
44                 wlan5g {
45                         label = "wnpr2600g:green:wlan5g";
46                         gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
47                         linux,default-trigger = "phy1radio";
48                 };
49         };
50
51         keys {
52                 compatible = "gpio-keys";
53
54                 auto {
55                         label = "auto";
56                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
57                         linux,code = <BTN_0>;
58                         linux,input-type = <EV_SW>;
59                 };
60
61                 reset {
62                         label = "reset";
63                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
64                         linux,code = <KEY_RESTART>;
65                 };
66
67                 wps {
68                         label = "wps";
69                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
70                         linux,code = <KEY_WPS_BUTTON>;
71                 };
72         };
73 };
74
75 &spi0 {
76         status = "okay";
77
78         flash@0 {
79                 compatible = "jedec,spi-nor";
80                 reg = <0>;
81                 spi-max-frequency = <40000000>;
82
83                 partitions {
84                         compatible = "fixed-partitions";
85                         #address-cells = <1>;
86                         #size-cells = <1>;
87
88                         partition@0 {
89                                 label = "u-boot";
90                                 reg = <0x000000 0x030000>;
91                                 read-only;
92                         };
93
94                         partition@30000 {
95                                 label = "u-boot-env";
96                                 reg = <0x030000 0x010000>;
97                                 read-only;
98                         };
99
100                         factory: partition@40000 {
101                                 label = "factory";
102                                 reg = <0x040000 0x010000>;
103                                 read-only;
104                         };
105
106                         partition@50000 {
107                                 compatible = "denx,uimage";
108                                 label = "firmware";
109                                 reg = <0x050000 0xda0000>;
110                         };
111
112                         partition@df0000 {
113                                 label = "manufacture";
114                                 reg = <0xdf0000 0x190000>;
115                                 read-only;
116                         };
117
118                         partition@f80000 {
119                                 label = "storage";
120                                 reg = <0xf80000 0x080000>;
121                                 read-only;
122                         };
123                 };
124         };
125 };
126
127 &ethernet {
128         mtd-mac-address = <&factory 0x4>;
129         mediatek,portmap = "wllll";
130 };
131
132 &pinctrl {
133         state_default: pinctrl0 {
134                 gpio {
135                         ralink,group = "uart2", "uart3", "jtag", "wdt";
136                         ralink,function = "gpio";
137                 };
138         };
139 };
140
141 &pcie {
142         status = "okay";
143 };
144
145 &pcie0 {
146         wifi@0,0 {
147                 compatible = "mediatek,mt76";
148                 reg = <0x0000 0 0 0 0>;
149                 mediatek,mtd-eeprom = <&factory 0x0>;
150                 ieee80211-freq-limit = <2400000 2500000>;
151         };
152 };
153
154 &pcie1 {
155         wifi@0,0 {
156                 compatible = "mediatek,mt76";
157                 reg = <0x0000 0 0 0 0>;
158                 mediatek,mtd-eeprom = <&factory 0x8000>;
159                 ieee80211-freq-limit = <5000000 6000000>;
160         };
161 };
162
163 &xhci {
164         status = "disabled";
165 };