ramips: reset mt7620 ethernet phy via reset controller
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-ax54.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-ax54", "mediatek,mt7621-soc";
11 model = "ASUS RT-AX54";
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 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 key-restart {
42 label = "reset";
43 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 key-wps {
48 label = "wps";
49 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53 };
54
55 &nand {
56 status = "okay";
57
58 mediatek,nmbm;
59 mediatek,bmt-max-ratio = <1>;
60 mediatek,bmt-max-reserved-blocks = <64>;
61 mediatek,bmt-remap-range = <0x000000 0x7e0000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x80000>;
71 read-only;
72 };
73
74 /*
75 * u-boot gets split here while keeping u-boot read-only,
76 * which allows safe usage of fw_setenv
77 */
78 partition@80000 {
79 label = "u-boot-env";
80 reg = <0x80000 0x60000>;
81 };
82
83 partition@e0000 {
84 label = "nvram";
85 reg = <0xe0000 0x100000>;
86 read-only;
87 };
88
89 factory: partition@1e0000 {
90 label = "factory";
91 reg = <0x1e0000 0x100000>;
92 read-only;
93
94 nvmem-layout {
95 compatible = "fixed-layout";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 macaddr_factory_4: macaddr@4 {
100 reg = <0x4 0x6>;
101 };
102 };
103 };
104
105 factory2: partition@2e0000 {
106 label = "factory2";
107 reg = <0x2e0000 0x100000>;
108 read-only;
109 };
110
111 partition@3e0000 {
112 label = "kernel";
113 reg = <0x3e0000 0x400000>;
114 };
115
116 partition@7e0000 {
117 label = "ubi";
118 reg = <0x7e0000 0x7020000>;
119 };
120
121 /* Last 8M are reserved for NMBM management (bad blocks) */
122 };
123 };
124
125 &pcie {
126 status = "okay";
127 };
128
129 &pcie1 {
130 wifi@0,0 {
131 compatible = "mediatek,mt76";
132 reg = <0x0000 0 0 0 0>;
133 mediatek,mtd-eeprom = <&factory 0x0000>;
134 mediatek,disable-radar-background;
135 };
136 };
137
138 &gmac0 {
139 nvmem-cells = <&macaddr_factory_4>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &gmac1 {
144 status = "okay";
145 label = "wan";
146 phy-handle = <&ethphy4>;
147
148 nvmem-cells = <&macaddr_factory_4>;
149 nvmem-cell-names = "mac-address";
150 };
151
152 &mdio {
153 ethphy4: ethernet-phy@4 {
154 reg = <4>;
155 };
156 };
157
158 &switch0 {
159 ports {
160 port@0 {
161 status = "okay";
162 label = "lan4";
163 };
164
165 port@1 {
166 status = "okay";
167 label = "lan3";
168 };
169
170 port@2 {
171 status = "okay";
172 label = "lan2";
173 };
174
175 port@3 {
176 status = "okay";
177 label = "lan1";
178 };
179 };
180 };
181
182 &state_default {
183 gpio {
184 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
185 function = "gpio";
186 };
187 };
188