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.

am335x- about rmii setting in uboot of SDK8.0

Dears,


Our solution connect with RTL8201 through RMII, but BBB's interface is MII,

I don't know whether the uboot need to modify to RMII setting.

Please provide the suggestion, thanks.


B.R.

Joe

  • Hi Joe,
    Yes, we have to modify the u-boot source code for RMII.
    We need to do pinmux, RMII init etc.,
  • Dears,

    Due to our solution gmac0 is RMII, gmac1 is RGMII, then I modify the

    u-boot-2014.07-g7e537bf/board/ti/am335x/mux.c
    static struct module_pin_mux rmii2_pin_mux[] = {
    {OFFSET(gpmc_wpn), MODE(3) | RXACTIVE}, /* rmii2_rxer*/
    {OFFSET(mii1_col), MODE(1) | RXACTIVE}, /* AM335X_rmii2_refclk*/
    {OFFSET(gpmc_csn3), MODE(2) | RXACTIVE}, /* rmii2_crs_dv */
    {OFFSET(gpmc_a0), MODE(3)}, /* AM335X_RMII2_TXEN*/
    {OFFSET(gpmc_a4), MODE(2)}, /* AM335X_RMII2_TXD1*/
    {OFFSET(gpmc_a5), MODE(2)}, /* AM335X_RMII2_TXD0*/
    {OFFSET(gpmc_a10), MODE(2) | RXACTIVE}, /* AM335X_RMII2_RXD1*/
    {OFFSET(gpmc_a11), MODE(2) | RXACTIVE}, /* AM335X_RMII2_RXD0*/
    {OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* AM335X_MDIO_DATA*/
    {OFFSET(mdio_clk), MODE(0) | PULLUP_EN}, /* AM335X_MDIO_CLK */
    {-1},
    };
    configure_module_pin_mux(rmii2_pin_mux);

    u-boot-2014.07-g7e537bf/board/ti/am335x/board.c
    #if 0
    if (board_is_bone(&header) || board_is_bone_lt(&header) ||
    board_is_idk(&header)) {
    puts("PHY_INTERFACE_MODE_MII\n");
    writel(MII_MODE_ENABLE, &cdev->miisel);
    cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    PHY_INTERFACE_MODE_MII;
    } else {
    writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
    cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    PHY_INTERFACE_MODE_RGMII;
    }
    #else
    writel(RMII_MODE_ENABLE, &cdev->miisel);
    cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
    cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RGMII;
    #endif

    Maybe I miss something in uboot, could you provide others suggestion for setting RMII before I get the our sample, thanks.

    B.R.
    Joe