ramips: add missing LEDs to Asus RT-AX53U
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_asus_rt-ax53u.dts
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "asus,rt-ax53u", "mediatek,mt7621-soc";
11 model = "ASUS RT-AX53U";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 bootargs-override = "console=ttyS0,115200";
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_power: power {
30 label = "blue:power";
31 color = <LED_COLOR_ID_BLUE>;
32 function = LED_FUNCTION_POWER;
33 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
34 };
35
36 led_usb {
37 label = "blue:usb";
38 color = <LED_COLOR_ID_BLUE>;
39 function = LED_FUNCTION_USB;
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 trigger-sources = <&ehci_port2>;
42 linux,default-trigger = "usbport";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 key-restart {
50 label = "reset";
51 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 key-wps {
56 label = "wps";
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60 };
61 };
62
63 &nand {
64 status = "okay";
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x80000>;
74 read-only;
75 };
76
77 /*
78 * u-boot gets split here while keeping u-boot read-only,
79 * which allows safe usage of fw_setenv
80 */
81 partition@80000 {
82 label = "u-boot-env";
83 reg = <0x80000 0x60000>;
84 };
85
86 partition@e0000 {
87 label = "nvram";
88 reg = <0xe0000 0x100000>;
89 read-only;
90 };
91
92 factory: partition@1e0000 {
93 label = "factory";
94 reg = <0x1e0000 0x100000>;
95 read-only;
96
97 compatible = "nvmem-cells";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 macaddr_factory_4: macaddr@4 {
102 reg = <0x4 0x6>;
103 };
104 };
105
106 factory2: partition@2e0000 {
107 label = "factory2";
108 reg = <0x2e0000 0x100000>;
109 read-only;
110 };
111
112 partition@3e0000 {
113 label = "kernel";
114 reg = <0x3e0000 0x400000>;
115 };
116
117 partition@7e0000 {
118 label = "ubi";
119 reg = <0x7e0000 0x2e00000>;
120 };
121
122 partition@35e0000 {
123 label = "firmware2";
124 reg = <0x35e0000 0x3200000>;
125 };
126
127 /* Last 8M possibly store the bad block table */
128 };
129 };
130
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie1 {
136 wifi@0,0 {
137 compatible = "mediatek,mt76";
138 reg = <0x0000 0 0 0 0>;
139 mediatek,mtd-eeprom = <&factory 0x0000>;
140 mediatek,disable-radar-background;
141 };
142 };
143
144 &gmac0 {
145 nvmem-cells = <&macaddr_factory_4>;
146 nvmem-cell-names = "mac-address";
147 };
148
149 &gmac1 {
150 status = "okay";
151 label = "wan";
152 phy-handle = <&ethphy0>;
153
154 nvmem-cells = <&macaddr_factory_4>;
155 nvmem-cell-names = "mac-address";
156 };
157
158 &mdio {
159 ethphy0: ethernet-phy@0 {
160 reg = <0>;
161 };
162 };
163
164 &switch0 {
165 ports {
166 port@1 {
167 status = "okay";
168 label = "lan1";
169 };
170
171 port@2 {
172 status = "okay";
173 label = "lan2";
174 };
175
176 port@3 {
177 status = "okay";
178 label = "lan3";
179 };
180 };
181 };
182
183 &state_default {
184 gpio {
185 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
186 function = "gpio";
187 };
188 };
189