Project

General

Profile

Ethernet Phy Reset in UBoot

With the release of our MitySOM-335x Development Board Revision 6 we have replaced the Vitesse VSC8061 phy with the Micrel KSZ9031 RGMII phy. Part of this modification involved the handling of the RGMII_RESETN GPIO tied to the Micrel Phy's reset input. The previous Vitesse phy latched the address and mode settings on power-up without a secondary reset assertion needed. The Micrel phy requires that the reset input be toggled to properly latch the address and mode pull-ups for the phy to be setup properly.

Phy Reset GPIO Modification Information

The MitySOM-335x Development board uses module pin 120 which is GPIO3_10. The information below outlines the changes that would need to be made if you have moved that reset GPIO to another pin in your custom baseboard design but continue to use the RGMII2 interface.

som.c Modification

Before UBoot is built you would need to take the latest GIT pull and tweak the GPIO number in "board/cl/mityarm335x/som.c" from number 106 to your new GPIO location. For this example we will use module pin 84 which is GPIO2_1.

Currently:

100 /* 
101  * Phy Reset GPIO 3[10]
102  */
103 #define GPIO_PHY_RESET_N        106
also
 973         gpio_request(GPIO_PHY_RESET_N, "gpio3_10");

Would become:
100 /* 
101  * Phy Reset GPIO 2[1]
102  */
103 #define GPIO_PHY_RESET_N        65
also
 973         gpio_request(GPIO_PHY_RESET_N, "gpio2_1");

mux.c Modification

In addition to the changes in the "som.c" file you also need to make a change to the "board/cl/mityarm335x/mux.c" file to properly setup the reset GPIO in a GPIO mode. In this example pin 84 of the module is identified by the zero'th mode, gpmc_clk, and mode 7 is the GPIO mode setting.

Currently:

 109         {OFFSET(mii1_rxclk), MODE(7) | PULLUP_EN | PULLUDEN},   /* PHY RESET N on MITYARM3359 EVM */

Would become:
 109         {OFFSET(gpmc_clk), MODE(7) | PULLUP_EN | PULLUDEN},   /* PHY RESET N on MitySOM-335x Pin  84*/

Note that you need to confirm that your new reset signal is not already defined elsewhere for another function, if so you should remove the "old" mux setting for the pin.

Go to top
Add picture from clipboard (Maximum size: 600 MB)