mediatek: filogic: fix nvmem cell names of the GL.iNet MT-2500
[openwrt/staging/stintel.git] / target / linux / mediatek / dts / mt7981b-glinet-gl-mt2500.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2
3 /dts-v1/;
4 #include "mt7981.dtsi"
5
6 / {
7 model = "GL.iNet GL-MT2500";
8 compatible = "glinet,gl-mt2500", "mediatek,mt7981";
9
10 aliases {
11 label-mac-device = &gmac0;
12 led-boot = &led_sys_white;
13 led-failsafe = &led_sys_blue;
14 led-running = &led_sys_white;
15 led-upgrade = &led_sys_blue;
16 serial0 = &uart0;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 bootargs-append = " root=PARTLABEL=rootfs rootwait";
22 };
23
24 gpio-keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led-vpn {
38 label = "white:vpn";
39 gpios = <&pio 31 GPIO_ACTIVE_LOW>;
40 };
41
42 led_sys_white: led-system-white {
43 label = "white:system";
44 gpios = <&pio 30 GPIO_ACTIVE_LOW>;
45 };
46
47 led_sys_blue: led-system-blue {
48 label = "blue:system";
49 gpios = <&pio 29 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 usb_vbus: regulstor-usb {
54 compatible = "regulator-fixed";
55
56 regulator-name = "usb-vbus";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
59
60 gpio = <&pio 12 GPIO_ACTIVE_HIGH>;
61 enable-active-high;
62 regulator-boot-on;
63 };
64
65 reg_3p3v: regulator-3p3v {
66 compatible = "regulator-fixed";
67 regulator-name = "fixed-3.3V";
68 regulator-min-microvolt = <3300000>;
69 regulator-max-microvolt = <3300000>;
70 regulator-boot-on;
71 regulator-always-on;
72 };
73 };
74
75 &pio {
76 mmc0_pins_default: mmc0-pins-default {
77 mux {
78 function = "flash";
79 groups = "emmc_45";
80 };
81 };
82 mmc0_pins_uhs: mmc0-pins-uhs {
83 mux {
84 function = "flash";
85 groups = "emmc_45";
86 };
87 };
88 };
89
90 &uart0 {
91 status = "okay";
92 };
93
94 &watchdog {
95 status = "okay";
96 };
97
98 &eth {
99 status = "okay";
100
101 pinctrl-names = "default";
102 pinctrl-0 = <&mdio_pins>;
103
104 gmac0: mac@0 {
105 compatible = "mediatek,eth-mac";
106 nvmem-cells = <&macaddr_boot1_a 0>;
107 nvmem-cell-names = "mac-address";
108 reg = <0>;
109
110 phy-mode = "2500base-x";
111 phy-handle = <&phy5>;
112 };
113
114 gmac1: mac@1 {
115 compatible = "mediatek,eth-mac";
116 nvmem-cells = <&macaddr_boot1_a 1>;
117 nvmem-cell-names = "mac-address";
118 reg = <1>;
119 phy-mode = "gmii";
120 phy-handle = <&int_gbe_phy>;
121 };
122 };
123
124 &mdio_bus {
125 reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
126 reset-delay-us = <600>;
127 reset-post-delay-us = <20000>;
128
129 phy5: ethernet-phy@5 {
130 reg = <5>;
131 compatible = "ethernet-phy-ieee802.3-c45";
132 };
133 };
134
135 &usb_phy {
136 status = "okay";
137 };
138
139 &xhci {
140 status = "okay";
141 vbus-supply = <&usb_vbus>;
142 };
143
144 &mmc0 {
145 status = "okay";
146
147 pinctrl-names = "default", "state_uhs";
148 pinctrl-0 = <&mmc0_pins_default>;
149 pinctrl-1 = <&mmc0_pins_uhs>;
150 bus-width = <8>;
151 max-frequency = <52000000>;
152 vmmc-supply = <&reg_3p3v>;
153 cap-mmc-highspeed;
154 non-removable;
155
156 card@0 {
157 compatible = "mmc-card";
158 reg = <0>;
159
160 block {
161 compatible = "block-device";
162
163 partitions {
164 block-partition-u-boot-env {
165 partname = "u-boot-env";
166 nvmem-layout {
167 compatible = "u-boot,env-layout";
168 };
169 };
170 };
171 };
172
173 boot1 {
174 compatible = "block-device";
175
176 nvmem-layout {
177 compatible = "fixed-layout";
178 #address-cells = <1>;
179 #size-cells = <1>;
180
181 macaddr_boot1_a: macaddr@a {
182 compatible = "mac-base";
183 reg = <0xa 0x6>;
184 #nvmem-cell-cells = <1>;
185 };
186
187 ddns@10 {
188 reg = <0x10 0x10>;
189 };
190
191 sn-bak@20 {
192 reg = <0x20 0x10>;
193 };
194
195 sn@30 {
196 reg = <0x30 0x10>;
197 };
198
199 country-code@88 {
200 reg = <0x88 0x10>;
201 };
202 };
203 };
204 };
205 };