ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_xiaomi_mir4a-100m.dts
1 //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "xiaomi,mir4a-100m", "mediatek,mt7628an-soc";
11 model = "Xiaomi Mi Router 4A (100M Edition)";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 aliases {
18 led-boot = &power_yellow;
19 led-failsafe = &power_yellow;
20 led-running = &power_blue;
21 led-upgrade = &power_yellow;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power_blue: power_blue {
28 label = "mir4a-100m:blue:power";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 };
31
32 power_yellow: power_yellow {
33 label = "mir4a-100m:yellow:power";
34 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <10000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "bootloader";
64 reg = <0x0 0x20000>;
65 read-only;
66 };
67
68 partition@20000 {
69 label = "config";
70 reg = <0x20000 0x10000>;
71 read-only;
72 };
73
74 factory: partition@30000 {
75 label = "factory";
76 reg = <0x30000 0x10000>;
77 read-only;
78 };
79
80 partition@40000 {
81 label = "crash";
82 reg = <0x40000 0x10000>;
83 read-only;
84 };
85
86 partition@50000 {
87 label = "cfg_bak";
88 reg = <0x50000 0x10000>;
89 read-only;
90 };
91
92 partition@60000 {
93 label = "overlay";
94 reg = <0x60000 0x100000>;
95 read-only;
96 };
97
98 partition@160000 {
99 label = "firmware";
100 reg = <0x160000 0xea0000>;
101 compatible = "denx,uimage";
102 };
103 };
104 };
105 };
106
107 &pcie {
108 status = "okay";
109 };
110
111 &pcie0 {
112 wifi@0,0 {
113 compatible = "mediatek,mt76";
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x8000>;
116 ieee80211-freq-limit = <5000000 6000000>;
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "gpio", "wdt", "wled_an";
123 function = "gpio";
124 };
125 };
126
127 &ethernet {
128 mtd-mac-address = <&factory 0x4>;
129 mtd-mac-address-increment = <(-1)>;
130 };
131
132 &esw {
133 mediatek,portmap = <0x2f>;
134 mediatek,portdisable = <0x2a>;
135 };
136
137 &wmac {
138 status = "okay";
139 };