mediatek: correct address of ethernet PHY
[openwrt/staging/chunkeey.git] / target / linux / mediatek / dts / mt7622-ubnt-unifi-6-lr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/leds/common.h>
7
8 #include "mt7622.dtsi"
9 #include "mt6380.dtsi"
10
11 / {
12 aliases {
13 led-boot = &led_blue;
14 led-failsafe = &led_blue;
15 led-running = &led_blue;
16 led-upgrade = &led_blue;
17 label-mac-device = &gmac0;
18 serial0 = &uart0;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 console=ttyS0,115200n8";
24 };
25
26 cpus {
27 cpu@0 {
28 proc-supply = <&mt6380_vcpu_reg>;
29 sram-supply = <&mt6380_vm_reg>;
30 };
31
32 cpu@1 {
33 proc-supply = <&mt6380_vcpu_reg>;
34 sram-supply = <&mt6380_vm_reg>;
35 };
36 };
37
38 gpio-keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 linux,code = <KEY_RESTART>;
44 gpios = <&pio 62 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 memory {
49 reg = <0 0x40000000 0 0x3f000000>;
50 };
51
52 reg_1p8v: regulator-1p8v {
53 compatible = "regulator-fixed";
54 regulator-name = "fixed-1.8V";
55 regulator-min-microvolt = <1800000>;
56 regulator-max-microvolt = <1800000>;
57 regulator-always-on;
58 };
59
60 reg_3p3v: regulator-3p3v {
61 compatible = "regulator-fixed";
62 regulator-name = "fixed-3.3V";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-boot-on;
66 regulator-always-on;
67 };
68 };
69
70 &pcie0 {
71 pinctrl-names = "default";
72 pinctrl-0 = <&pcie0_pins>;
73 status = "okay";
74 };
75
76
77 &pio {
78 eth_pins: eth-pins {
79 mux {
80 function = "eth";
81 groups = "mdc_mdio", "rgmii_via_gmac2";
82 };
83 };
84
85 pcie0_pins: pcie0-pins {
86 mux {
87 function = "pcie";
88 groups = "pcie0_pad_perst",
89 "pcie0_1_waken",
90 "pcie0_1_clkreq";
91 };
92 };
93
94 pcie1_pins: pcie1-pins {
95 mux {
96 function = "pcie";
97 groups = "pcie1_pad_perst",
98 "pcie1_0_waken",
99 "pcie1_0_clkreq";
100 };
101 };
102
103 pmic_bus_pins: pmic-bus-pins {
104 mux {
105 function = "pmic";
106 groups = "pmic_bus";
107 };
108 };
109
110 spi_nor_pins: spi-nor-pins {
111 mux {
112 function = "flash";
113 groups = "spi_nor";
114 };
115 };
116
117 uart0_pins: uart0-pins {
118 mux {
119 function = "uart";
120 groups = "uart0_0_tx_rx" ;
121 };
122 };
123
124 uart3_pins: uart3-pins {
125 mux {
126 function = "uart";
127 groups = "uart3_1_tx_rx" ;
128 };
129 };
130
131 i2c0_pins: i2c0-pins {
132 mux {
133 function = "i2c";
134 groups = "i2c0";
135 };
136 };
137
138 watchdog_pins: watchdog-pins {
139 mux {
140 function = "watchdog";
141 groups = "watchdog";
142 };
143 };
144 };
145
146 &bch {
147 status = "okay";
148 };
149
150 &btif {
151 status = "disabled";
152 };
153
154 &eth {
155 status = "okay";
156 pinctrl-names = "default";
157 pinctrl-0 = <&eth_pins>;
158
159 gmac0: mac@0 {
160 compatible = "mediatek,eth-mac";
161 reg = <0>;
162
163 phy-mode = "2500base-x";
164
165 fixed-link {
166 speed = <2500>;
167 full-duplex;
168 };
169 };
170
171 mdio: mdio-bus {
172 #address-cells = <1>;
173 #size-cells = <0>;
174
175 ethernet-phy@7 {
176 /* Marvell AQRate AQR112W - no driver */
177 compatible = "ethernet-phy-ieee802.3-c45";
178 reg = <0x7>;
179 };
180 };
181 };
182
183 &pwrap {
184 pinctrl-names = "default";
185 pinctrl-0 = <&pmic_bus_pins>;
186
187 status = "okay";
188 };
189
190 &nor_flash {
191 pinctrl-names = "default";
192 pinctrl-0 = <&spi_nor_pins>;
193
194 status = "okay";
195
196 flash@0 {
197 compatible = "jedec,spi-nor";
198 reg = <0>;
199 spi-max-frequency = <50000000>;
200
201 nor_partitions: partitions {
202 compatible = "fixed-partitions";
203 #address-cells = <1>;
204 #size-cells = <1>;
205
206 };
207 };
208 };
209
210 &uart0 {
211 pinctrl-names = "default";
212 pinctrl-0 = <&uart0_pins>;
213 status = "okay";
214 };
215
216 &uart3 {
217 pinctrl-names = "default";
218 pinctrl-0 = <&uart3_pins>;
219 status = "okay";
220
221 /* MT7915 Bluetooth */
222 };
223
224 &i2c0 {
225 pinctrl-names = "default";
226 pinctrl-0 = <&i2c0_pins>;
227 status = "okay";
228
229 led-controller@30 {
230 compatible = "ubnt,ledbar";
231 reg = <0x30>;
232
233 enable-gpio = <&pio 59 0>;
234
235 red {
236 label = "red";
237 };
238
239 green {
240 label = "green";
241 };
242
243 led_blue: blue {
244 label = "blue";
245 };
246 };
247 };
248
249 &watchdog {
250 pinctrl-names = "default";
251 pinctrl-0 = <&watchdog_pins>;
252 status = "okay";
253 };