[U-Boot-Users] PATCH: add support for MII-connected ethernet switch for IPX42x

Michael Schwingen
2007-12-09T16:45:13Z

Jean-Christophe PLAGNIOL-VILLARD wrote:
> You're right the speed depends on the switch, and as example for the marvell
> 88E6031/88E6060 this speed/duplex is determine by pull-up at the switch reset
> (CPU port) and could be read through the MDIO bus but not modify.
>
> You could also have a tree of switch that need to be configured and not
> only forced the cpu port speed/duplex at 100/FULL.
>
I have one of these - the MII bus is forced to 100/FULL, and the switch
configuration happens in the reset_phy function.
I could imagine some setup where the MII bus needs to be set to
100/HALF, but probably only for PHYs that lack MDIO configuration and
not for switches.

>> Change the CONFIG_MII_ETHSWITCH to CONFIG_FIXED_PHY (as done in Linux)
>> and I'll be happy. Later on we need to change things to have port-wise
>> granularity, but we're not there yet.
>>
>
> As I said before each as it's own way to determine the speed/duplex do
> it as hard-code is not the best way.
> I will prefer an external function that take care of the switch that
> could me merge with the new phylib after.
>
Now I understand what you wanted. Lets just decide which way it whould
be done for now (before we have the PHY library), so I can modify the
patch accordingly.

For the general case, the code will need to pass the number of the
ethernet port - there may be configurations with one MII connected to a
switch with hardwired speed, and one MII connedted to a normal
single-port PHY.

cu
Michael