Design ethernet switch for multiple devices on pcb?
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.