From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3B86C433F5 for ; Thu, 9 Dec 2021 02:13:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15035833B8; Thu, 9 Dec 2021 03:13:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 6C05F82F91; Thu, 9 Dec 2021 03:13:07 +0100 (CET) Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EE9898317A for ; Thu, 9 Dec 2021 03:12:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dylan_hung@aspeedtech.com Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 1B91lTGt023132; Thu, 9 Dec 2021 09:47:29 +0800 (GMT-8) (envelope-from dylan_hung@aspeedtech.com) Received: from DylanHung-PC.aspeed.com (192.168.2.216) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Dec 2021 10:12:30 +0800 From: Dylan Hung To: , , , , , , CC: Subject: [next 3/5] ARM: dts: ast2600: Add MDIO devices Date: Thu, 9 Dec 2021 10:12:26 +0800 Message-ID: <20211209021228.27597-4-dylan_hung@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211209021228.27597-1-dylan_hung@aspeedtech.com> References: <20211209021228.27597-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [192.168.2.216] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 1B91lTGt023132 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean There are 4 MDIO bus controllers in AST2600 SOC. Each of them can connect to one or more PHY chips and is flexible to work with the 4 MAC devices in AST2600. On AST2600 EVB, MDIO 0,1,2,3 connect to the PHY chips used by MAC 0,1,2,3 respectively. Signed-off-by: Dylan Hung --- arch/arm/dts/ast2600-evb.dts | 68 ++++++++++++++++++++++++++++++++++++ arch/arm/dts/ast2600.dtsi | 46 +++++++++++++++++++++--- 2 files changed, 109 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/ast2600-evb.dts b/arch/arm/dts/ast2600-evb.dts index 2abd31341c11..4e256d1e2b4e 100644 --- a/arch/arm/dts/ast2600-evb.dts +++ b/arch/arm/dts/ast2600-evb.dts @@ -163,6 +163,74 @@ pinctrl-0 = <&pinctrl_i2c9_default>; }; +&mdio0 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +&mdio1 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + ethphy1: ethernet-phy@0 { + reg = <0>; + }; +}; + +&mdio2 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + ethphy2: ethernet-phy@0 { + reg = <0>; + }; +}; + +&mdio3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + ethphy3: ethernet-phy@0 { + reg = <0>; + }; +}; + +&mac0 { + status = "okay"; + phy-mode = "rgmii-rxid"; + phy-handle = <ðphy0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default>; +}; + +&mac1 { + status = "okay"; + phy-mode = "rgmii-rxid"; + phy-handle = <ðphy1>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii2_default>; +}; + +&mac2 { + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <ðphy2>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii3_default>; +}; + +&mac3 { + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <ðphy3>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii4_default>; +}; + &scu { mac0-clk-delay = <0x1d 0x1c 0x10 0x17 diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi index f121f547e6d4..bdcca69e060d 100644 --- a/arch/arm/dts/ast2600.dtsi +++ b/arch/arm/dts/ast2600.dtsi @@ -193,11 +193,47 @@ interrupts = ; }; - mdio: ethernet@1e650000 { - compatible = "aspeed,aspeed-mdio"; - reg = <0x1e650000 0x40>; - resets = <&rst ASPEED_RESET_MII>; - status = "disabled"; + mdio: bus@1e650000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x1e650000 0x100>; + + mdio0: mdio@0 { + compatible = "aspeed,ast2600-mdio"; + reg = <0 0x8>; + resets = <&rst ASPEED_RESET_MII>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mdio1_default>; + status = "disabled"; + }; + + mdio1: mdio@8 { + compatible = "aspeed,ast2600-mdio"; + reg = <0x8 0x8>; + resets = <&rst ASPEED_RESET_MII>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mdio2_default>; + status = "disabled"; + }; + + mdio2: mdio@10 { + compatible = "aspeed,ast2600-mdio"; + reg = <0x10 0x8>; + resets = <&rst ASPEED_RESET_MII>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mdio3_default>; + status = "disabled"; + }; + + mdio3: mdio@18 { + compatible = "aspeed,ast2600-mdio"; + reg = <0x18 0x8>; + resets = <&rst ASPEED_RESET_MII>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mdio4_default>; + status = "disabled"; + }; }; mac0: ftgmac@1e660000 { -- 2.25.1