public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dylan Hung <dylan_hung@aspeedtech.com>
To: <chiawei_wang@aspeedtech.com>, <lukma@denx.de>,
	<seanga2@gmail.com>, <ryan_chen@aspeedtech.com>,
	<joe.hershberger@ni.com>, <rfried.dev@gmail.com>,
	<u-boot@lists.denx.de>
Cc: <BMC-SW@aspeedtech.com>
Subject: [next 3/5] ARM: dts: ast2600: Add MDIO devices
Date: Thu, 9 Dec 2021 10:12:26 +0800	[thread overview]
Message-ID: <20211209021228.27597-4-dylan_hung@aspeedtech.com> (raw)
In-Reply-To: <20211209021228.27597-1-dylan_hung@aspeedtech.com>

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 <dylan_hung@aspeedtech.com>
---
 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 = <&ethphy0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default>;
+};
+
+&mac1 {
+	status = "okay";
+	phy-mode = "rgmii-rxid";
+	phy-handle = <&ethphy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii2_default>;
+};
+
+&mac2 {
+	status = "okay";
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy2>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii3_default>;
+};
+
+&mac3 {
+	status = "okay";
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy3>;
+	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 = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-		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


  parent reply	other threads:[~2021-12-09  2:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  2:12 [next 0/5] Add support of Ethernet for Aspeed AST2600 SoC Dylan Hung
2021-12-09  2:12 ` [next 1/5] net: ftgmac100: Add DM_MDIO support Dylan Hung
2021-12-10 23:08   ` Ramon Fried
2022-01-18 21:09   ` Tom Rini
2021-12-09  2:12 ` [next 2/5] net: ftgmac100: Add Aspeed AST2600 support Dylan Hung
2021-12-10 23:09   ` Ramon Fried
2022-01-18 21:09   ` Tom Rini
2021-12-09  2:12 ` Dylan Hung [this message]
2021-12-10 23:10   ` [next 3/5] ARM: dts: ast2600: Add MDIO devices Ramon Fried
2022-01-18 21:09   ` Tom Rini
2021-12-09  2:12 ` [next 4/5] configs: ast2600: enable DM_MDIO and MDIO driver Dylan Hung
2021-12-10 23:10   ` Ramon Fried
2022-01-18 21:09   ` Tom Rini
2021-12-09  2:12 ` [next 5/5] clk: ast2600: Revise MII interface delay Dylan Hung
2021-12-10 23:10   ` Ramon Fried
2022-01-18 21:10   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211209021228.27597-4-dylan_hung@aspeedtech.com \
    --to=dylan_hung@aspeedtech.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=joe.hershberger@ni.com \
    --cc=lukma@denx.de \
    --cc=rfried.dev@gmail.com \
    --cc=ryan_chen@aspeedtech.com \
    --cc=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox