Skip to content

Commit 776245a

Browse files
montjoiemripard
authored andcommitted
ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent 4b236a0 commit 776245a

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

arch/arm/boot/dts/sunxi-h3-h5.dtsi

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,34 @@
413413
mdio: mdio {
414414
#address-cells = <1>;
415415
#size-cells = <0>;
416-
int_mii_phy: ethernet-phy@1 {
417-
compatible = "ethernet-phy-ieee802.3-c22";
416+
compatible = "snps,dwmac-mdio";
417+
};
418+
419+
mdio-mux {
420+
compatible = "allwinner,sun8i-h3-mdio-mux";
421+
#address-cells = <1>;
422+
#size-cells = <0>;
423+
424+
mdio-parent-bus = <&mdio>;
425+
/* Only one MDIO is usable at the time */
426+
internal_mdio: mdio@1 {
427+
compatible = "allwinner,sun8i-h3-mdio-internal";
418428
reg = <1>;
419-
clocks = <&ccu CLK_BUS_EPHY>;
420-
resets = <&ccu RST_BUS_EPHY>;
429+
#address-cells = <1>;
430+
#size-cells = <0>;
431+
432+
int_mii_phy: ethernet-phy@1 {
433+
compatible = "ethernet-phy-ieee802.3-c22";
434+
reg = <1>;
435+
clocks = <&ccu CLK_BUS_EPHY>;
436+
resets = <&ccu RST_BUS_EPHY>;
437+
};
438+
};
439+
440+
external_mdio: mdio@2 {
441+
reg = <2>;
442+
#address-cells = <1>;
443+
#size-cells = <0>;
421444
};
422445
};
423446
};

0 commit comments

Comments
 (0)