This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to enable RMII mode in u-boot for TI8148

Hi,

We are unable to set RMII mode in CPSW of ti8148. please help on this.  

U-boot version used: u-boot-2010.06-psp04.01.00.05

To set CPSW pad config for RMII mode, we did the following steps:

We do pin muxing for RMII mode based on board/ti/ti8148/mux.h (below code is the RMII pin select part) from function set_muxconf_regs()

          /* -232 */      BIT(0), BIT(0), BIT(0), BIT(0),                  /* 232- EMAC_RMREFCLK */

          /* -236 */      BIT(0), BIT(0), BIT(0), BIT(2),                  /* 236- EMAC[0]_RMRXD[0] */

          /* -240 */      BIT(2), BIT(2), BIT(2), BIT(2),                  /* 237- EMAC[0]_RMRXD[1], 238- EMAC[0]_RMRXER, 239- EMAC[0]_RMCRSDV, 240- EMAC[0]_RMTXD[0] */

          /* -244 */      BIT(2), BIT(2), BIT(0), BIT(0),                 /* 241- EMAC[0]_RMTXD[1], 242- EMAC[0]_RMTXEN */

 

To setup RMII_REFCLK to be sourced from audio_pll, we made CPSW mac clock as given below

 

      if (PG2_1 == get_cpu_rev()) {
                                                /* setup RMII_REFCLK to be sourced from audio_pll */
                __raw_writel(0x5,RMII_REFCLK_SRC);
                                                 /*program GMII_SEL register for RGMII mode */
                /*__raw_writel(0x30a,GMII_SEL);*/                                /* This is removed as per the assumption, it is for RGMII mode */

        }
In the structure cpsw_data (board/ti/ti8148/evm.c), mac_control element is set as given below 

             .mac_control            =  BIT(5)   /* MIIEN      */  
we are using MICREL KSZ8051RNL PHY , so  in the phy_init() function, MICREL supplied init function is used (phy_micrel_init()). 
Thanks and Regards
Jerryn