ramips: fix mtd partition node names for Phicomm PSG1208
[openwrt/openwrt.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 mediatek,nmbm;
67 mediatek,bmt-remap-range =
68 <0x000000 0x7e0000>,
69 <0x35e0000 0x7800000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x80000>;
79 read-only;
80 };
81
82 /*
83 * u-boot gets split here while keeping u-boot read-only,
84 * which allows safe usage of fw_setenv
85 */
86 partition@80000 {
87 label = "u-boot-env";
88 reg = <0x80000 0x60000>;
89 };
90
91 partition@e0000 {
92 label = "nvram";
93 reg = <0xe0000 0x100000>;
94 read-only;
95 };
96
97 factory: partition@1e0000 {
98 compatible = "nvmem-cells";
99 label = "factory";
100 reg = <0x1e0000 0x100000>;
101 #address-cells = <1>;
102 #size-cells = <1>;
103 read-only;
104
105 eeprom_factory_0: eeprom@0 {
106 reg = <0x0 0xe00>;
107 };
108
109 macaddr_factory_4: macaddr@4 {
110 reg = <0x4 0x6>;
111 };
112 };
113
114 factory2: partition@2e0000 {
115 label = "factory2";
116 reg = <0x2e0000 0x100000>;
117 read-only;
118 };
119
120 partition@3e0000 {
121 label = "firmware";
122 reg = <0x3e0000 0x3200000>;
123
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 partition@0 {
129 label = "kernel";
130 reg = <0x0 0x400000>;
131 };
132
133 partition@400000 {
134 label = "ubi";
135 reg = <0x400000 0x2e00000>;
136 };
137 };
138
139 partition@35e0000 {
140 label = "firmware2";
141 reg = <0x35e0000 0x3200000>;
142 };
143
144 partition@67e0000 {
145 label = "jffs2";
146 reg = <0x67e0000 0x1020000>;
147 };
148
149 /* Last 8M are reserved for NMBM management (bad blocks) */
150 };
151 };
152
153 &pcie {
154 status = "okay";
155 };
156
157 &pcie1 {
158 wifi@0,0 {
159 compatible = "mediatek,mt76";
160 reg = <0x0000 0 0 0 0>;
161 nvmem-cells = <&eeprom_factory_0>;
162 nvmem-cell-names = "eeprom";
163 mediatek,disable-radar-background;
164 };
165 };
166
167 &gmac0 {
168 nvmem-cells = <&macaddr_factory_4>;
169 nvmem-cell-names = "mac-address";
170 };
171
172 &gmac1 {
173 status = "okay";
174 label = "wan";
175 phy-handle = <&ethphy0>;
176
177 nvmem-cells = <&macaddr_factory_4>;
178 nvmem-cell-names = "mac-address";
179 };
180
181 &mdio {
182 ethphy0: ethernet-phy@0 {
183 reg = <0>;
184 };
185 };
186
187 &switch0 {
188 ports {
189 port@1 {
190 status = "okay";
191 label = "lan1";
192 };
193
194 port@2 {
195 status = "okay";
196 label = "lan2";
197 };
198
199 port@3 {
200 status = "okay";
201 label = "lan3";
202 };
203 };
204 };
205
206 &state_default {
207 gpio {
208 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
209 function = "gpio";
210 };
211 };
212