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.

RMII2 of AM3359 in linux-3.2.0-psp04.06.00.11

Other Parts Discussed in Thread: AM3359

Hello everyone 

I'm using AM3359 connect to the LAN8710A PHY through RMII2,

Now I can ping in uboot through  some configure;

but it can't work in linux kernel.The board very like BBB

I did some configurations like this:

the pinmux

/*Module pin mux for rmii2*/
static struct pinmux_config rmii2_pin_mux[] = {
{"gpmc_wait0.rmii2_crs_dv", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_wpn.rmii2_rxerr", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a0.rmii2_txen", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT},
{"gpmc_a5.rmii2_txd0", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT},
{"gpmc_a4.rmii2_txd1", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT},
{"gpmc_a10.rmii2_rxd1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a11.rmii2_rxd0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLDOWN},
{"mii1_col.rmii2_refclk", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP},
{NULL, 0},
};

the GMII_SEL:

static void setup_beagleboneblack(void)
{
pr_info("The board is a AM335x Beaglebone Black.\n");

.....

am33xx_cpsw_init(AM33XX_CPSW_MODE_RMII, NULL, NULL);
}

int am33xx_cpsw_init(enum am33xx_cpsw_mac_mode mode, unsigned char *phy_id0,

{

   ........

switch (mode) {
case AM33XX_CPSW_MODE_MII:
gmii_sel = AM33XX_MII_MODE_EN;
break;
case AM33XX_CPSW_MODE_RMII:
gmii_sel = AM33XX_RMII_MODE_EN;
break;
case AM33XX_CPSW_MODE_RGMII:
gmii_sel = AM33XX_RGMII_MODE_EN;
am33xx_cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
am33xx_cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RGMII;
break;
default:
return -EINVAL;
}

}

#define AM33XX_RMII_MODE_EN ((1 << 0) | (1 << 2) | (1<<6) | (1<<7))

My PHY ID is 0,so I configure like this

static struct cpsw_slave_data am33xx_cpsw_slaves[] = {
{
.slave_reg_ofs = 0x300,
.sliver_reg_ofs = 0xdc0,
.phy_id = "0:00",
.dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_1,
},
{
.slave_reg_ofs = 0x200,
.sliver_reg_ofs = 0xd80,
.phy_id = "0:01",
.dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_0,
},

};

The phy doesn't work,and the TX pins have no data transmission,so I suspect that

there have some configuration I have ignored.

can anyone help me?

thanks.