3
\$\begingroup\$

I'm working on a pcb design with a Raspberry Pi CM module and a microcontroller with ethernet capacity. The goal is to connect the devices to the internet.

I'm currently using a normal ethernet switch, where I connect the CAT5e cables to the different devices. Using normal RJ45 connectors, magnetics, PHY and MAC. The standard setup.

I'd like to try to integrate the switch in the pcb design, while still maintaining the LAN as it should be normally. I did find a few Switch IC's like the KSZ8794 and I think I can create a working switch with this, but only with a regular setup. That is with magnetics and connectors. The IC has integrated MAC and PHY modules.

When I'm trying to wrap my head around the switch concept and with not using cables I end up with a 'maybe' possibility where I'd use the switch as normal, then link a PHY and MAC IC to one of the ports and connect the MAC with an (R)MII interface to the Pi or microcontroller.

I then have very short 100BASE-T traces between the two PHY IC's instead of a cable and connector. While this does seem like a viable solution, it also feels like jumping through unnecessary hoops.

Is there a possibility of still maintaining a LAN network on my PCB, with 1 connector going to the outside world and with not 'simulating' a mini 100BASE-T network between the switch IC and other devices?

EDIT: Added a diagram to hopefully make it a bit more obvious. enter image description here

\$\endgroup\$
  • \$\begingroup\$ Do you really need to connect both devices independently to ethernet? Could you just not use another much simpler but high speed connection between the mcu and Pi and have just the Pi connect to the network? \$\endgroup\$ – Terry Gould Feb 16 at 13:28
  • \$\begingroup\$ Yeah, ideally every component needs to be connected to ethernet. (slight addition, there is another Pi in the design that needs ethernet acces too) \$\endgroup\$ – pascal0312 Feb 16 at 13:33
2
\$\begingroup\$

Find a switch/PHY chip that has dual (R)MII interfaces. For example: http://www.farnell.com/datasheets/2175960.pdf.

One MII to the compute module, the second RMII to the microcontroller and you have 2 ports left that you can connect to regular magnetics and bring outside.

\$\endgroup\$
  • \$\begingroup\$ This is almost what I'm looking for. I have a hard time searching correct switching IC's and never found one with more than 1 MAC port. I need 3 MAC ports for my design to connect with my devices. But this definitely gave me a push in the right direction. \$\endgroup\$ – pascal0312 Feb 16 at 14:11
  • \$\begingroup\$ If you need more ports than get a second switch IC and connect two PHYs back-to-back with capacitors ("ethernet capacitive coupling"). \$\endgroup\$ – filo Feb 16 at 14:15
  • \$\begingroup\$ I'll keep that in mind. As far as I'm concerned, your answer + comment answered my question for designing a LAN on my pcb. \$\endgroup\$ – pascal0312 Feb 16 at 14:17
  • \$\begingroup\$ You can also get MCUs with built-in MAC+PHY: TM4C1294, some Coldfire V2 and PIC18J60 to spare the second switch IC. \$\endgroup\$ – filo Feb 16 at 14:20
  • \$\begingroup\$ I already have a MCU with built in MAC from the STM32F2 Series ready. Also, I think a built-in PHY creates the same kind of problem I have now, where I don't want to trace a whole 100BASE-T interface through my PCB while still maintaining 1 RJ45 connector. \$\endgroup\$ – pascal0312 Feb 16 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.