[PATCH v2 3/3] riscv: dts: thead: Add TH1520 ethernet nodes
Andrew Lunn
andrew at lunn.ch
Fri Sep 27 04:53:09 PDT 2024
> > Vendor kernel [2] that Sipeed uses has:
> >
> > mdio0 {
> > #address-cells = <1>;
> > #size-cells = <0>;
> > compatible = "snps,dwmac-mdio";
> >
> > phy_88E1111_0: ethernet-phy at 0 {
> > reg = <0x1>;
> > };
> >
> > phy_88E1111_1: ethernet-phy at 1 {
> > reg = <0x2>;
> > };
> > };
> >
> > so I think that does mean they are on the same MDIO bus.
>
> It depends how you look at it. The SoC has two MACs and they can both
> control their own MDIO bus. However MDIO of both MACs are pinmux'ed to
> the same pins on the SoC.
Ah. That is unusual.
> So the solution above just mux the pins to GMAC0 and let that
> control both PHYs.
That makes sense. Using both MDIO bus controllers and playing with the
pinmux on each transaction would be a lot more complex.
Andrew
More information about the linux-riscv
mailing list