ramips: improve Xiaomi mi-mini indications
[openwrt/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 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24
25 wps {
26 label = "wps";
27 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_WPS_BUTTON>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power: power {
36 label = "blue:power";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 };
39
40 wlan5g {
41 label = "blue:wlan5g";
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 wlan2g {
47 label = "blue:wlan2g";
48 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51 };
52 };
53
54 &i2c {
55 status = "okay";
56 };
57
58 &sdhci {
59 status = "okay";
60 };
61
62 &nand {
63 status = "okay";
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0xe0000>;
73 read-only;
74 };
75
76 partition@e0000 {
77 label = "u-boot-env";
78 reg = <0xe0000 0x100000>;
79 read-only;
80 };
81
82 factory: partition@1e0000 {
83 label = "factory";
84 reg = <0x1e0000 0x100000>;
85 read-only;
86 };
87
88 factory2: partition@2e0000 {
89 label = "factory2";
90 reg = <0x2e0000 0x100000>;
91 read-only;
92 };
93
94 partition@3e0000 {
95 label = "kernel";
96 reg = <0x3e0000 0x400000>;
97 };
98
99 partition@7e0000 {
100 label = "ubi";
101 reg = <0x7e0000 0x2e00000>;
102 };
103
104 partition@35e0000 {
105 label = "firmware2";
106 reg = <0x35e0000 0x3200000>;
107 };
108 };
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &pcie0 {
116 wifi0: wifi@0,0 {
117 compatible = "pci14c3,7615";
118 reg = <0x0000 0 0 0 0>;
119 mediatek,mtd-eeprom = <&factory 0x0000>;
120 ieee80211-freq-limit = <2400000 2500000>;
121 };
122 };
123
124 &pcie1 {
125 wifi1: wifi@0,0 {
126 compatible = "pci14c3,7615";
127 reg = <0x0000 0 0 0 0>;
128 mediatek,mtd-eeprom = <&factory 0x8000>;
129 ieee80211-freq-limit = <5000000 6000000>;
130 };
131 };
132
133 &gmac0 {
134 nvmem-cells = <&macaddr_factory_e000>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 &gmac1 {
139 status = "okay";
140 label = "wan";
141 phy-handle = <&ethphy0>;
142
143 nvmem-cells = <&macaddr_factory_e000>;
144 nvmem-cell-names = "mac-address";
145 };
146
147 &mdio {
148 ethphy0: ethernet-phy@0 {
149 reg = <0>;
150 };
151 };
152
153 &switch0 {
154 ports {
155 port@1 {
156 status = "okay";
157 label = "lan1";
158 };
159
160 port@2 {
161 status = "okay";
162 label = "lan2";
163 };
164
165 port@3 {
166 status = "okay";
167 label = "lan3";
168 };
169
170 port@4 {
171 status = "okay";
172 label = "lan4";
173 };
174 };
175 };
176
177 &state_default {
178 gpio {
179 groups = "uart2", "uart3", "i2c";
180 function = "gpio";
181 };
182 };
183
184 &factory {
185 compatible = "nvmem-cells";
186 #address-cells = <1>;
187 #size-cells = <1>;
188
189 macaddr_factory_e000: macaddr@e000 {
190 reg = <0xe000 0x6>;
191 };
192 };