ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-acx5p.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         aliases {
10                 led-boot = &led_power;
11                 led-failsafe = &led_power;
12                 led-running = &led_power;
13                 led-upgrade = &led_power;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600";
18         };
19
20         palmbus: palmbus@1E000000 {
21                 i2c@900 {
22                         status = "okay";
23                 };
24         };
25
26         keys {
27                 compatible = "gpio-keys";
28
29                 reset {
30                         label = "reset";
31                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_RESTART>;
33                 };
34
35                 wps {
36                         label = "wps";
37                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_WPS_BUTTON>;
39                 };
40         };
41
42         leds {
43                 compatible = "gpio-leds";
44
45                 led_power: power {
46                         label = "rt-ac85p:blue:power";
47                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
48                 };
49                 wlan2g {
50                         label = "rt-ac85p:blue:wlan2g";
51                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
52                         linux,default-trigger = "phy0radio";
53                 };
54
55                 wlan5g {
56                         label = "rt-ac85p:blue:wlan5g";
57                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
58                         linux,default-trigger = "phy1radio";
59                 };
60         };
61 };
62
63 &sdhci {
64         status = "okay";
65 };
66
67 &nand {
68         status = "okay";
69
70         partitions {
71                 compatible = "fixed-partitions";
72                 #address-cells = <1>;
73                 #size-cells = <1>;
74
75                 partition@0 {
76                         label = "u-boot";
77                         reg = <0x0 0xe0000>;
78                         read-only;
79                 };
80
81                 partition@e0000 {
82                         label = "u-boot-env";
83                         reg = <0xe0000 0x100000>;
84                         read-only;
85                 };
86
87                 factory: partition@1e0000 {
88                         label = "factory";
89                         reg = <0x1e0000 0x100000>;
90                         read-only;
91                 };
92
93                 factory2: partition@2e0000 {
94                         label = "factory2";
95                         reg = <0x2e0000 0x100000>;
96                         read-only;
97                 };
98
99                 partition@3e0000 {
100                         label = "kernel";
101                         reg = <0x3e0000 0x400000>;
102                 };
103
104                 partition@7e0000 {
105                         label = "ubi";
106                         reg = <0x7e0000 0x2e00000>;
107                 };
108
109                 partition@35e0000 {
110                         label = "firmware2";
111                         reg = <0x35e0000 0x3200000>;
112                 };
113         };
114 };
115
116 &pcie {
117         status = "okay";
118 };
119
120 &pcie0 {
121         wifi0: wifi@0,0 {
122                 compatible = "pci14c3,7615";
123                 reg = <0x0000 0 0 0 0>;
124                 mediatek,mtd-eeprom = <&factory 0x0000>;
125                 ieee80211-freq-limit = <2400000 2500000>;
126         };
127 };
128
129 &pcie1 {
130         wifi1: wifi@0,0 {
131                 compatible = "pci14c3,7615";
132                 reg = <0x0000 0 0 0 0>;
133                 mediatek,mtd-eeprom = <&factory 0x8000>;
134                 ieee80211-freq-limit = <5000000 6000000>;
135         };
136 };
137
138 &ethernet {
139         mtd-mac-address = <&factory 0xe000>;
140         mediatek,portmap = "wllll";
141         port@5 {
142                 status = "disabled";
143         };
144 };
145
146 &i2c {
147         status = "disabled";
148 };
149
150 &pinctrl {
151         state_default: pinctrl0 {
152                 gpio {
153                         ralink,group = "uart2", "uart3", "i2c";
154                         ralink,function = "gpio";
155                 };
156         };
157 };