1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2021 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
5 */
6
7/dts-v1/;
8#include "mt7986a.dtsi"
9
10/ {
11	model = "MediaTek MT7986a RFB";
12	compatible = "mediatek,mt7986a-rfb";
13
14	aliases {
15		serial0 = &uart0;
16	};
17
18	chosen {
19		stdout-path = "serial0:115200n8";
20	};
21
22	memory@40000000 {
23		device_type = "memory";
24		reg = <0 0x40000000 0 0x40000000>;
25	};
26};
27
28&eth {
29	status = "okay";
30
31	gmac0: mac@0 {
32		compatible = "mediatek,eth-mac";
33		reg = <0>;
34		phy-mode = "2500base-x";
35
36		fixed-link {
37			speed = <2500>;
38			full-duplex;
39			pause;
40		};
41	};
42
43	mdio: mdio-bus {
44		#address-cells = <1>;
45		#size-cells = <0>;
46	};
47};
48
49&mdio {
50	switch: switch@0 {
51		compatible = "mediatek,mt7531";
52		reg = <31>;
53		reset-gpios = <&pio 5 0>;
54	};
55};
56
57&switch {
58	ports {
59		#address-cells = <1>;
60		#size-cells = <0>;
61
62		port@0 {
63			reg = <0>;
64			label = "lan0";
65		};
66
67		port@1 {
68			reg = <1>;
69			label = "lan1";
70		};
71
72		port@2 {
73			reg = <2>;
74			label = "lan2";
75		};
76
77		port@3 {
78			reg = <3>;
79			label = "lan3";
80		};
81
82		port@4 {
83			reg = <4>;
84			label = "lan4";
85		};
86
87		port@6 {
88			reg = <6>;
89			label = "cpu";
90			ethernet = <&gmac0>;
91			phy-mode = "2500base-x";
92
93			fixed-link {
94				speed = <2500>;
95				full-duplex;
96				pause;
97			};
98		};
99	};
100};
101
102&uart0 {
103	status = "okay";
104};
105
106&uart1 {
107	pinctrl-names = "default";
108	pinctrl-0 = <&uart1_pins>;
109	status = "okay";
110};
111
112&uart2 {
113	pinctrl-names = "default";
114	pinctrl-0 = <&uart2_pins>;
115	status = "okay";
116};
117
118&wifi {
119	status = "okay";
120	pinctrl-names = "default", "dbdc";
121	pinctrl-0 = <&wf_2g_5g_pins>;
122	pinctrl-1 = <&wf_dbdc_pins>;
123};
124
125&pio {
126	uart1_pins: uart1-pins {
127		mux {
128			function = "uart";
129			groups = "uart1";
130		};
131	};
132
133	uart2_pins: uart2-pins {
134		mux {
135			function = "uart";
136			groups = "uart2";
137		};
138	};
139
140	wf_2g_5g_pins: wf-2g-5g-pins {
141		mux {
142			function = "wifi";
143			groups = "wf_2g", "wf_5g";
144		};
145		conf {
146			pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
147			       "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
148			       "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
149			       "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
150			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
151			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
152			       "WF1_TOP_CLK", "WF1_TOP_DATA";
153			drive-strength = <4>;
154		};
155	};
156
157	wf_dbdc_pins: wf-dbdc-pins {
158		mux {
159			function = "wifi";
160			groups = "wf_dbdc";
161		};
162		conf {
163			pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
164			       "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
165			       "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
166			       "WF0_TOP_CLK", "WF0_TOP_DATA";
167			drive-strength = <4>;
168		};
169	};
170};
171