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.

am3359 customboard with Micrel PHY ksz9021 link speed always 100MBps

Other Parts Discussed in Thread: AM3359

Dear all,

We have a custom board design using am3359. We are using the Micrel PHY (ksz9021) which is capable of Gigabit speed. We are able to work at 100MBps speed(connected to network through a HUB) but not at 1000MBps because the link speed is always 100MBps even though the PHY supports 1000MBps. We want to be able to connect the board with a PC which is at Gigabit speed using a crossover cable(straight connection) but currently we are not able to ping itself. We need to know if we are missing something in software. We have done the following in the kernel so far.

In linux-3.2, we have set the member variable 'gigabit_en' of cpsw_platform_data structure to 1 as below.

static struct cpsw_platform_data am33xx_cpsw_pdata = {
	.ss_reg_ofs		= 0x1200,
	.channels		= 8,
	.cpdma_reg_ofs		= 0x800,
	.slaves			= 2,
	.slave_data		= am33xx_cpsw_slaves,
	.ale_reg_ofs		= 0xd00,
	.ale_entries		= 1024,
	.host_port_reg_ofs      = 0x108,
	.hw_stats_reg_ofs       = 0x900,
	.cpts_reg_ofs		= 0xc00,
	.cpts_clock_mult	= 0x80000000,
	.cpts_clock_shift	= 29,
	.bd_ram_ofs		= 0x2000,
	.bd_ram_size		= SZ_8K,
	.rx_descs               = 64,
	.mac_control            = BIT(5), /* MIIEN */
	.gigabit_en		= 1,
	.host_port_num		= 0,
	.no_bd_ram		= false,
	.version		= CPSW_VERSION_2,
};

We have set the CPSW slave 0 to phy ID 4 corresponding to our hardware design.

static struct cpsw_slave_data am33xx_cpsw_slaves[] = {
	{
		.slave_reg_ofs  = 0x200,
		.sliver_reg_ofs = 0xd80,
		.phy_id		= "0:04",
		.dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_0,
	},

In board file, arch/arm/mach-omap2/board-am335x.c we are initializing cpsw as follows since we are using RGMII interface.

am33xx_cpsw_init(AM33XX_CPSW_MODE_RGMII, "0:04", "0:01");


Any help is appreciated.