Hi guys,
We have a hardware with 2 ethernet ports:
PORT 0: RGMII, phy adress 0
PORT 1: RMII, phy adress 3
I changed kernel to accept them, but only PORT 0 works. Bellow the modifications:
-----------> in arch/arm/mach-omap2/board-am335xevm.c
/* Module pin mux for rmii1 */
static struct pinmux_config rmii1_pin_mux[] = {
//df db
{"gpmc_csn3.rmii2_crs_dv", OMAP_MUX_MODE2 | 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_a4.rmii2_txd1", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT},
{"gpmc_a5.rmii2_txd0", 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},
};
static void rmii1_init(int evm_id, int profile)
{
setup_pin_mux(rmii1_pin_mux);
return;
}
/* Industrial Auto Motor Control EVM */
static struct evm_dev_cfg ind_auto_mtrl_evm_dev_cfg[] = {
{am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{clkout2_enable, DEV_ON_BASEBOARD, PROFILE_ALL},
{evm_nand_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{lcdc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{gpio_ddr_vtt_enb_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{rgmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{rmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{spi1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{matrix_keypad_init, DEV_ON_BASEBOARD, PROFILE_ALL},
// {volume_keys_init, DEV_ON_DGHTR_BRD, PROFILE_0},
// {haptics_init, DEV_ON_BASEBOARD, (PROFILE_4)},
{sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{NULL, 0, 0},
};
static void setup_ind_auto_motor_ctrl_evm(void)
{
...
am33xx_cpsw_init(AM33XX_CPSW_MODE_RMII, "0:00", "0:03");
}
-----------> in arch/arm/mach-omap2/devices.c
static struct cpsw_slave_data am33xx_cpsw_slaves[] = {
{
.slave_reg_ofs = 0x200,
.sliver_reg_ofs = 0xd80,
.phy_id = "0:00",
.dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_0,
},
{
.slave_reg_ofs = 0x300,
.sliver_reg_ofs = 0xdc0,
.phy_id = "0:03", // <------------------------- CHANGED HERE
.dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_1,
},
};
-----------> in arch/arm/mach-omap2/mux33xx.c
... ORIGINAL:
// _AM33XX_MUXENTRY(GPMC_CSN3, 0, "gpmc_csn3", NULL, NULL, "mmc2_cmd", NULL, NULL, NULL, "gpio2_0"),
... CHANGED HERE:
_AM33XX_MUXENTRY(GPMC_CSN3, 0, "gpmc_csn3", "rmii2_crs_dv", NULL, "mmc2_cmd", NULL, NULL, NULL, "gpio2_0"),
I can configure an IP and Mask, Linux identify signal UP and signal DOWN, but ping or any other comunication command doesn't work for PORT 1.
Am I missing something or coded in wrong way PORT 1?
Note that AM33XX_CPSW_MODE_RMII configures RMII for both ports. How can I configure CPSW to RMII -> port 1 and RGMII port 0??
thanks for your help in advanced.
daniel.