4
\$\begingroup\$

I'm planning to develop an ARM9 based Linux board as an Ethernet wired router device.

I selected EP9302 from Cirrus Logic as the ARM9 CPU and RTL8305 from RealTek as the Ethernet Switch/Hub IC.

But I have a serious problem on designing the router with those things. I need 1*WAN port for Internet and 4*LAN ports for switching on device. For that, RTL8305 should be connected with two MII interfaces. I mean EP9302 should provide two Ethernet Interface (such as eth0, eht1). But, unfortunately, EP9302 has only one Ethernet interface.

Are there any solution for this problem?

I heard I may control Ethernet Switch Chip with GPIO pins. But I don't know how to configure them and how to connect them.

\$\endgroup\$
5
\$\begingroup\$

There are three solutions at least:

I'm surprised seeing this question downvoted because it addresses an architecture very popular even today. And i'm surprised seeing the Xiong's answer downvoted too because except mis-writing "PHY" instead of "SWITCH" (that could be corrected from the context, imo) he was right in full.

\$\endgroup\$
1
\$\begingroup\$

You have to switch to a two Ethernet MCU or setup two VLAN for your only Ethernet port.

Solution 1 (easy): Just buy another MCU with two ethernet port.

Solution 2 (hard): Make sure your PHY support VLAN (802.11q). If the answer is No, just buy another PHY. Now you have confirmed that your PHY support VLAN. Then you need a switch chip which also support VLAN. I have no time to read the datasheet of your switch chip (RTL8305), so I just assume it support VLAN. First of all, configure your switch chip to enable port-based VLAN. Assume you have connected your MCU with port0 of your switch chip, port1 will be configured as WAN and port2-5 will be configured as LAN. So setup your switch chip to set port0 as trunk, port1 as VLAN1 and port2-5 as VLAN2. Then, in your ARM9's Linux, setup two virtual NIC by vconfig. For example, eth0.1 as VLAN1 and eth0.2 as VLAN2. After all, you can use eth0.1 as your WAN and eth0.2 as your LAN.

Sorry for my bad English.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Can you expand on that? \$\endgroup\$
    – Dave Tweed
    Oct 26 '12 at 19:53

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.