aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/dts/mt7621.dtsi
blob: c32b6095e99dac21caf605d59fa81a7d12d56f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2022 MediaTek Inc. All rights reserved.
 *
 * Author: Weijie Gao <weijie.gao@mediatek.com>
 */

#include <dt-bindings/clock/mt7621-clk.h>
#include <dt-bindings/reset/mt7621-reset.h>
#include <dt-bindings/phy/phy.h>

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "mediatek,mt7621-soc";

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			device_type = "cpu";
			compatible = "mips,mips1004Kc";
			reg = <0>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "mips,mips1004Kc";
			reg = <1>;
		};
	};

	clk48m: clk48m {
		compatible = "fixed-clock";

		clock-frequency = <48000000>;

		#clock-cells = <0>;
	};

	clk50m: clk50m {
		compatible = "fixed-clock";

		clock-frequency = <50000000>;

		#clock-cells = <0>;
	};

	sysc: sysctrl@1e000000 {
		compatible = "mediatek,mt7621-sysc", "syscon";
		reg = <0x1e000000 0x100>;

		clkctrl: clock-controller@1e000030 {
			compatible = "mediatek,mt7621-clk";
			mediatek,memc = <&memc>;

			#clock-cells = <1>;
		};
	};

	rstctrl: reset-controller@1e000034 {
		compatible = "mediatek,mtmips-reset";
		reg = <0x1e000034 0x4>;
		#reset-cells = <1>;
	};

	reboot: resetctl-reboot {
		compatible = "resetctl-reboot";

		resets = <&rstctrl RST_SYS>;
		reset-names = "sysreset";
	};

	memc: memctrl@1e005000 {
		compatible = "mediatek,mt7621-memc", "syscon";
		reg = <0x1e005000 0x1000>;
	};

	pinctrl: pinctrl@1e000060 {
		compatible = "mediatek,mt7621-pinctrl";
		reg = <0x1e000048 0x30>;

		pinctrl-names = "default";
		pinctrl-0 = <&state_default>;

		state_default: pin_state {
		};

		uart1_pins: uart1_pins {
			groups = "uart1";
			function = "uart";
		};

		uart2_pins: uart2_pins {
			groups = "uart2";
			function = "uart";
		};

		uart3_pins: uart3_pins {
			groups = "uart3";
			function = "uart";
		};

		sdxc_pins: sdxc_pins {
			groups = "sdxc";
			function = "sdxc";
		};

		spi_pins: spi_pins {
			groups = "spi";
			function = "spi";
		};

		eth_pins: eth_pins {
			mdio_pins {
				groups = "mdio";
				function = "mdio";
			};

			rgmii1_pins {
				groups = "rgmii1";
				function = "rgmii";
			};

			esw_pins {
				groups = "esw int";
				function = "esw int";
			};

			mdio_pconf {
				groups = "mdio";
				drive-strength = <2>;
			};
		};
	};

	watchdog: watchdog@1e000100 {
		compatible = "mediatek,mt7621-wdt";
		reg = <0x1e000100 0x40>;

		resets = <&rstctrl RST_TIMER>;
		reset-names = "wdt";

		status = "disabled";
	};

	gpio: gpio@1e000600 {
		#address-cells = <1>;
		#size-cells = <0>;

		compatible = "mtk,mt7621-gpio";
		reg = <0x1e000600 0x100>;

		resets = <&rstctrl RST_PIO>;
		reset-names = "pio";

		gpio0: bank@0 {
			reg = <0>;
			compatible = "mtk,mt7621-gpio-bank";
			gpio-controller;
			#gpio-cells = <2>;
		};

		gpio1: bank@1 {
			reg = <1>;
			compatible = "mtk,mt7621-gpio-bank";
			gpio-controller;
			#gpio-cells = <2>;
		};

		gpio2: bank@2 {
			reg = <2>;
			compatible = "mtk,mt7621-gpio-bank";
			gpio-controller;
			#gpio-cells = <2>;
		};
	};

	spi: spi@1e000b00 {
		compatible = "ralink,mt7621-spi";
		reg = <0x1e000b00 0x40>;

		status = "disabled";

		pinctrl-names = "default";
		pinctrl-0 = <&spi_pins>;

		resets = <&rstctrl RST_SPI>;
		reset-names = "spi";

		clocks = <&clkctrl MT7621_CLK_SPI>;

		#address-cells = <1>;
		#size-cells = <0>;
	};

	uart0: uart1@1e000c00 {
		compatible = "mediatek,hsuart", "ns16550a";
		reg = <0x1e000c00 0x100>;

		pinctrl-names = "default";
		pinctrl-0 = <&uart1_pins>;

		clocks = <&clkctrl MT7621_CLK_UART1>;

		resets = <&rstctrl RST_UART1>;

		reg-shift = <2>;
	};

	uart1: uart2@1e000d00 {
		compatible = "mediatek,hsuart", "ns16550a";
		reg = <0x1e000d00 0x100>;

		pinctrl-names = "default";
		pinctrl-0 = <&uart2_pins>;

		clocks = <&clkctrl MT7621_CLK_UART2>;

		resets = <&rstctrl RST_UART2>;

		reg-shift = <2>;

		status = "disabled";
	};

	uart2: uart3@1e000e00 {
		compatible = "mediatek,hsuart", "ns16550a";
		reg = <0x1e000e00 0x100>;

		pinctrl-names = "default";
		pinctrl-0 = <&uart3_pins>;

		clocks = <&clkctrl MT7621_CLK_UART3>;

		resets = <&rstctrl RST_UART3>;

		reg-shift = <2>;

		status = "disabled";
	};

	eth: eth@1e100000 {
		compatible = "mediatek,mt7621-eth";
		reg = <0x1e100000 0x20000>;
		mediatek,ethsys = <&sysc>;

		pinctrl-names = "default";
		pinctrl-0 = <&eth_pins>;

		resets = <&rstctrl RST_FE>, <&rstctrl RST_GMAC>, <&rstctrl RST_MCM>;
		reset-names = "fe", "gmac", "mcm";

		clocks = <&clkctrl MT7621_CLK_GDMA>,
			 <&clkctrl MT7621_CLK_ETH>;
		clock-names = "gmac", "fe";

		#address-cells = <1>;
		#size-cells = <0>;

		mediatek,gmac-id = <0>;
		phy-mode = "rgmii";
		mediatek,switch = "mt7530";
		mediatek,mcm;

		fixed-link {
			speed = <1000>;
			full-duplex;
		};
	};

	mmc: mmc@1e130000 {
		compatible = "mediatek,mt7621-mmc";
		reg = <0x1e130000 0x4000>;

		status = "disabled";

		bus-width = <4>;
		builtin-cd = <1>;
		r_smpl = <1>;

		pinctrl-names = "default";
		pinctrl-0 = <&sdxc_pins>;

		clocks = <&clk50m>, <&clkctrl MT7621_CLK_SHXC>;
		clock-names = "source", "hclk";

		resets = <&rstctrl RST_SDXC>;
	};

	ssusb: usb@1e1c0000 {
		compatible = "mediatek,mt7621-xhci", "mediatek,mtk-xhci";
		reg = <0x1e1c0000 0x1000>, <0x1e1d0700 0x100>;
		reg-names = "mac", "ippc";

		clocks = <&clk48m>, <&clk48m>;
		clock-names = "sys_ck", "ref_ck";

		phys = <&u2port0 PHY_TYPE_USB2>,
		       <&u3port0 PHY_TYPE_USB3>,
		       <&u2port1 PHY_TYPE_USB2>;

		status = "disabled";
	};

	u3phy: usb-phy@1e1d0000 {
		compatible = "mediatek,mt7621-u3phy",
			     "mediatek,generic-tphy-v1";
		reg = <0x1e1d0000 0x700>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		status = "disabled";

		u2port0: usb-phy@1e1d0800 {
			reg = <0x1e1d0800 0x0100>;
			#phy-cells = <1>;
			clocks = <&clk48m>;
			clock-names = "ref";
		};

		u3port0: usb-phy@1e1d0900 {
			reg = <0x1e1d0900 0x0100>;
			#phy-cells = <1>;
		};

		u2port1: usb-phy@1e1d1000 {
			reg = <0x1e1d1000 0x0100>;
			#phy-cells = <1>;
			clocks = <&clk48m>;
			clock-names = "ref";
		};
	};

	i2c: i2c@1e000900 {
		compatible = "i2c-gpio";

		status = "disabled";

		i2c-gpio,delay-us = <3>;

		gpios = <&gpio0 3 1>, /* PIN3 as SDA */
			<&gpio0 4 1>; /* PIN4 as CLK */

		#address-cells = <1>;
		#size-cells = <0>;
	};
};