• R/O
  • HTTP
  • SSH
  • HTTPS

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. 58f3dc5c4eac9c6050edda6af2e37d20a2f9586d
大小 6,264 字节
时间 2022-07-14 20:18:33
作者 Tom Rini
Log Message
- MIPS: add drivers and board support for Mediatek MT7621 SoC
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEiQkHUH+J02LLC9InKPlOlyTyXBgFAmLPNDwACgkQKPlOlyTy
XBhkxA//XRRHddUQMoSgVHMgIXY+T3rrcl0jmU5tmpqOUctx/Y2Xw8gXwelfPy1k
YJUQCXyQ/Enk7j9jMxh6Nu+u8oBxR0mpunNS0jX1SnIUK1YHWNTUWOx7VHjRc+vO
0wdGoPATvEOsdLBoBfvSjGVkrugwa4YVLy7/akcVdry2yEQCOomEQW1HqCS5q/Au
Q84rfF5/LfMykNohHCisnsRQga4wGNeqkfG/irVNKyWg2yNGG+qQtIRwMg8XE1Ny
zR/mOctkoxfHckGJgEfvR95w/J/0YDXHXntHAwFYdbbUfJShwXlyAmmz0EkytN+D
zpfZuUWnN+9dSU9EeyqN8wiOxDVoPpaiNZlqdw+Mdpy62efE7W7wxBIqvwi/L1FW
Z+sMAzmLNcsNMkwhm50TYj50rTlZGnhk4KPpyWzM7NiUEznAHdO/CqgJJTwzf5om
h7WcWddnp+jTUUiVi62IdluUVJpCOg2iqASDML9EKPVAgbof+U9ShjAh7847P98L
ySZS37HI07qR9zimzGM2NrP+LDE3i+zuXOSotQFs8Y15YMUUYkToeGA5qJYRw3/G
TAgEQ97SJekz3UOwgzIde+suAnoyB0tkimA8ufDMNz4+0FN4/k9VG3H5VTN9zVmW
IygDuPJL6ooGU8PEo2mW5Ijlfl8dHLxELVzq2psUopID0FgRrHo=
=04k8
-----END PGP SIGNATURE-----

Merge tag 'mips-pull-2022-07-13' of https://source.denx.de/u-boot/custodians/u-boot-mips

- MIPS: add drivers and board support for Mediatek MT7621 SoC

Content

// 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>;
	};
};