]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: ast2600: Add MDIO devices
authorDylan Hung <dylan_hung@aspeedtech.com>
Thu, 9 Dec 2021 02:12:26 +0000 (10:12 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jan 2022 17:48:17 +0000 (12:48 -0500)
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>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
arch/arm/dts/ast2600-evb.dts
arch/arm/dts/ast2600.dtsi

index 05362d19bdc053038d4a5766b658a843fb29dff0..c17988ec3cca1d68dd851ee81b459267795b5e5d 100644 (file)
        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
index 31905fd2085d6daeefafa691e38501d71ea41f9e..98840ce7b0b3e743b09c0e5834c840dd8499d17e 100644 (file)
                        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 {