1

What is the proper way to connect multiple ethernet devices via MDIO bus?

I know that MDIO (similarly to I2C) is open drain, so I think that I need (just as in I2C) two 1-4, 7 kOhm pull-ups both for MDIO and MDC pins (Do I actually need a pull-up for MDC pin as long as it is a clock output?).

So, my question is the following: if I want to connect 8 devices, what is the proper choice for nominals (1 kOhm or 4.7 kOhm) and is it sufficient to have only one pull-up on the bus or do I need multiple pull-ups (for each IC)? Thanks.

Andy
  • 327
  • 3
  • 14
  • If you want to connect multiple MAC of a processor to each other it is impossible! "The bus only supports a **single MAC** as the master, and can have up to 32 **PHY slaves**. " https://en.wikipedia.org/wiki/Management_Data_Input/Output. If you have one MAC and multiple PHY, one pullup is ok. – M KS Nov 24 '18 at 13:08
  • Thank you for the response!) I want to connect KSZ9477STXI (Ethernet switch IC), five DP83849IFVS (Media Converter IC), DP83620SQ/NOPB (Ethernet PHY IC) and MAX24287ETK+ (SerDes) via single MDIO bus to AM3358 SoC. I'm a little bit confused about MAC/physical addresses of this ICs. DP83849IFVS and DP83620SQ/NOPB appear to have their own physical address (is it MAC address?), besides KSZ9477STXI should have separate MAC address for each port (our maybe I'm wrong and it'll have only single MAC address). So, is it possible to connect all this ICs to AM3358 SoC via MDIO to control their settings? – Andy Nov 26 '18 at 06:34
  • you should have(buy) one MAC address for each physical layer, https://en.wikipedia.org/wiki/MAC_address. On other hands above your PHY layer, you have a MAC that controls that PHY(https://en.wikipedia.org/wiki/Medium_access_control). It is better to add your connection diagram. – M KS Nov 26 '18 at 07:20
  • I've added my connection diagram above. – Andy Nov 26 '18 at 08:25
  • It's a complicated design. The whole is ok. What is "MDI"? It should be PHY or Port. each PHY should be set with own address so the MDIO can ping them. I think it is better to design a network with a building block, we have a router, LAN/SFP converter, etc. Breaking the project to a building block makes the project easier. – M KS Nov 26 '18 at 10:48
  • I slightly edited the connection diagramm. There was a mistake - DP83849I is working in media convertion mode. So MDI is media dependent interface. The case is that KSZ9477STXI switch has embedded PHYs, but they only supports copper mode so we decided to use DP83849I as media converter to convert 100BASE-TX signal to 100BASE-FX signal. – Andy Nov 26 '18 at 12:25
  • We also need one additional PHY for MII port of KSZ9477STXI switch and one SerDes to convert SGMII to RGMII to be able to connect KSZ9477STXI switch to SoC because we are lack of ports (we need 7 ports in total). It's indeed a complicated design and I'm starting to wonder if it is even an implementable idea? – Andy Nov 26 '18 at 12:25
  • As for MAC addresses as far as I understand each IC that we are using need to have its own MAC address to be controlled via MDIO? – Andy Nov 26 '18 at 12:27
  • Yes all PHY need their own MAC address else the network will crash. – M KS Nov 26 '18 at 14:10

1 Answers1

1

There is no need for multiple pull-ups on MDIO as that would amount to a single pull-up resistance anyway. You would look at MAC or PHY requirements for pull-up resistance and take a value that is compatible with all devices and can provide the timings that are necessary, as bus capacitance will slow down the rising edges.

MDC is an output. Basically, it does not need a pull-up. It might need a pull-down, but again, that is dependent on the MAC and PHY devices you are using.

Justme
  • 127,425
  • 3
  • 97
  • 261