Page 1 of 1

About to change the PHY

Posted: Tue Nov 26, 2013 1:35 pm
by DaveBest
Hi there,

In my last project we used the XC-2 boards which use the LAN8700 chip.

Now finally we got around to create our own board with ethernet capabilities but it was decided to use LAN8710A.

Now i am having a problem with using the ethernet connection.

As the new PHY is slightly different i guess I have to create/modify the ethernet_board_conf.h. The previously used one was the XC-2 one, provided by the module_ethernet_board_support.

Any hints how to do this properly would be greatly appreciated.

Dave

Re: About to change the PHY

Posted: Tue Nov 26, 2013 2:56 pm
by Andy
Hi Dave,

Did you copy a particular XMOS board schematic with the 8710a? Take a look at the AVB board support, which uses 8710a:

https://github.com/xcore/sc_ethernet/bl ... ard_conf.h

The key parameter change is the ETHERNET_DEFAULT_PHY_ADDRESS.

Re: About to change the PHY

Posted: Wed Nov 27, 2013 9:35 am
by DaveBest
Okay, changed the ETHERNET_DEFAULT_PHY_ADDRESS to 0.

Still not working.

If that is the main difference between LAN8700 and LAN8710 and everything else should work as before with no other change necessary than there has to be another problem somewhere, i guess.

Re: About to change the PHY

Posted: Fri Nov 29, 2013 9:48 am
by DaveBest
I still can't put my finger on why this doesn't work.

Green LED works as intended but the yellow LED is always on.

There seem to be issues with the new layout.

Re: About to change the PHY

Posted: Wed Dec 11, 2013 2:07 pm
by DaveBest
Changing the internal phy address on the new board and on the xc-2 board proves futile.

Neither board/phy seems to care which address is used.

XC-2 takes 0x1F or 0x00 and works but the new board refuses to work.
But the whole hardware design and layout aren't really my cup of tea and i sincerly hope the problem has to do with an easy to solve layout/design issue.

I browsed the LAN87xx datasheets and migration guide but i can't quite make heads or tails from this issue.

Re: About to change the PHY

Posted: Mon Jan 13, 2014 4:57 pm
by DaveBest
The issue has come up again after the holidays.

Trying every address brought no clue on the reason for my dilemma.

I found an older topic on this board with seemingly the same problem:
http://www.xcore.com/forum/viewtopic.ph ... &hilit=phy

Ethernet_board_conf.h used looks like this:

Code: Select all

#ifndef __ethernet_board_defaults_h__
#define __ethernet_board_defaults_h__

#define ETHERNET_DEFAULT_TILE tile[2]
#define ETHERNET_DEFAULT_PHY_ADDRESS 0x0
//0x0 //LAN8710A ? //0x1f //LAN8700

#define SMI_MDIO_BIT 7
#define SMI_MDIO_REST (~(1<<7))
#define SMI_MDIO_RESET_MUX 1



#endif // __ethernet_board_defaults_h__
My main uses

Code: Select all

// OTP Core
#ifndef ETHERNET_OTP_CORE
	#define ETHERNET_OTP_CORE 2
#endif

// OTP Ports
on tile[ETHERNET_OTP_CORE]: otp_ports_t otp_ports = OTP_PORTS_INITIALIZER;

on stdcore[2]: clock clk_mii_ref = XS1_CLKBLK_REF;

// Here are the port definitions required by ethernet
// The intializers are taken from the ethernet_board_support.h header for
// XMOS dev boards. If you are using a different board you will need to
// supply explicit port structure intializers for these values
smi_interface_t smi = ETHERNET_DEFAULT_SMI_INIT;
mii_interface_t mii = ETHERNET_DEFAULT_MII_INIT;
ethernet_reset_interface_t eth_rst = ETHERNET_DEFAULT_RESET_INTERFACE_INIT;

on stdcore[2]: clock clk_smi = XS1_CLKBLK_5;

and

Code: Select all

  par {

	  on tile[2]:
	      {
	  		char mac_address[6];
	  		
	  		otp_board_info_get_mac(otp_ports, 0, mac_address);
	  		eth_phy_reset(eth_rst);
	  		smi_init(smi);
	  		eth_phy_config(1, smi);
	  		printint(smi.phy_address); //check address used
	  		ethernet_server(mii,
	  						null,
	  						mac_address,
	  						mac_rx_chan_array, 2,
	  						mac_tx_chan_array, 7 );

	      }
for init purposes.

Re: About to change the PHY

Posted: Tue Jan 21, 2014 11:01 am
by DaveBest
Okay,

The address is definitly correct. If we don't config the phy, no status leds are lighting up.
Further testing revealed that if eth100 is chosen, the network stays unworkable.
If eth10 is chosen, everything works again, albeit at a reduced network speed.
It stays quite mysterious.