ramips: fix WiFi MAC addresses for D-Link DIR-810L
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_mir3p.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 = "xiaomi,mir3p", "mediatek,mt7621-soc";
11         model = "Xiaomi Mi Router 3 Pro";
12
13         aliases {
14                 led-boot = &led_status_yellow;
15                 led-failsafe = &led_status_red;
16                 led-running = &led_status_blue;
17                 led-upgrade = &led_status_yellow;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200n8";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_status_red: status_red {
28                         label = "mir3p:red:status";
29                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
30                 };
31
32                 led_status_blue: status_blue {
33                         label = "mir3p:blue:status";
34                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
35                 };
36
37                 led_status_yellow: status_yellow {
38                         label = "mir3p:yellow:status";
39                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
40                 };
41
42                 wan_amber {
43                         label = "mir3p:amber:wan";
44                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
45                 };
46
47                 lan3_amber {
48                         label = "mir3p:amber:lan3";
49                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
50                 };
51
52                 lan2_amber {
53                         label = "mir3p:amber:lan2";
54                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
55                 };
56
57                 lan1_amber {
58                         label = "mir3p:amber:lan1";
59                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
60                 };
61         };
62
63         button {
64                 compatible = "gpio-keys-polled";
65                 poll-interval = <20>;
66
67                 reset {
68                         label = "reset";
69                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
70                         linux,code = <KEY_RESTART>;
71                 };
72         };
73
74         reg_usb_vbus: regulator {
75                 compatible = "regulator-fixed";
76                 regulator-name = "usb_vbus";
77                 regulator-min-microvolt = <5000000>;
78                 regulator-max-microvolt = <5000000>;
79                 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
80                 enable-active-high;
81         };
82 };
83
84 &xhci {
85         vbus-supply = <&reg_usb_vbus>;
86 };
87
88 &nand {
89         status = "okay";
90
91         partitions {
92                 compatible = "fixed-partitions";
93                 #address-cells = <1>;
94                 #size-cells = <1>;
95
96                 partition@0 {
97                         label = "Bootloader";
98                         reg = <0x0 0x40000>;
99                         read-only;
100                 };
101
102                 partition@40000 {
103                         label = "Config";
104                         reg = <0x40000 0x40000>;
105                 };
106
107                 partition@80000 {
108                         label = "Bdata";
109                         reg = <0x80000 0x40000>;
110                         read-only;
111                 };
112
113                 factory: partition@c0000 {
114                         label = "factory";
115                         reg = <0x0c0000 0x40000>;
116                         read-only;
117                 };
118
119                 partition@100000 {
120                         label = "crash";
121                         reg = <0x100000 0x40000>;
122                 };
123
124                 partition@140000 {
125                         label = "crash_syslog";
126                         reg = <0x140000 0x80000>;
127                 };
128
129                 partition@1c0000 {
130                         label = "reserved0";
131                         reg = <0x1c0000 0x40000>;
132                         read-only;
133                 };
134
135                 /* We keep stock xiaomi firmware (kernel0) here */
136                 partition@200000 {
137                         label = "kernel_stock";
138                         reg = <0x200000 0x400000>;
139                 };
140
141                 partition@600000 {
142                         label = "kernel";
143                         reg = <0x600000 0x400000>;
144                 };
145
146                 partition@a00000 {
147                         label = "ubi";
148                         reg = <0xa00000 0xf580000>;
149                 };
150         };
151 };
152
153 &pcie {
154         status = "okay";
155 };
156
157 &pcie0 {
158         wifi@0,0 {
159                 compatible = "mediatek,mt76";
160                 reg = <0x0000 0 0 0 0>;
161                 mediatek,mtd-eeprom = <&factory 0x0000>;
162                 ieee80211-freq-limit = <2400000 2500000>;
163         };
164 };
165
166 &pcie1 {
167         wifi@0,0 {
168                 compatible = "mediatek,mt76";
169                 reg = <0x0000 0 0 0 0>;
170                 mediatek,mtd-eeprom = <&factory 0x8000>;
171                 ieee80211-freq-limit = <5000000 6000000>;
172         };
173 };
174
175 &ethernet {
176         mtd-mac-address = <&factory 0xe000>;
177         mediatek,portmap = "llllw";
178 };
179
180 &pinctrl {
181         state_default: pinctrl0 {
182                 gpio {
183                         ralink,group = "jtag", "uart2", "uart3", "wdt";
184                         ralink,function = "gpio";
185                 };
186         };
187 };