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.

Davinci Emac Driver

Davinci Emac Generic PHY Driver in ability to create a link or ping in UBOOT, and unable to use the generic PHY driver with the TLK100PHP

I have used the code provided by TI to verify I can make a link with the TLK100PHP, as provided http://www.ti.com/tool/tlk100sample-code

When I attempt to use the generic PHY driver in the kernel the link is dropped and I am unable to communicate.

I have used the XDS510 USB emulator to load the Diagnostic IPNC code as provided by,  http://www.appropho.com/NewWeb/Product_DM368MT5.php#a which has been modified to contain the Ethernet TLK100PHP code to test the PHY I am able to generate a link and configure the PHY using this code as described in the datasheet for the TLK100PHP. As defined here http://www.ti.com/product/tlk100,

I was able to test the TLK100PHP using the code prvided by TI, This has validated the schematic and configuration of the clocks on the DM368, When I attempt use the generic PHY, driver contained in Uboot the link is dropped and I am unable to get traffic external to the TLK, I believe this is a configuration issue within the davinci_emac.c and emac_defs.h files.

 

I am looking for ways to modify the Davinci Emac Driver and the Emac Definitions file to insure I have configured the ethernet PHY correctly any advice this forum can provide will be greatly appreciated. I can provide code and examples of how I have attempted this if this will help you help me.

Thanks

  • Matthew,  as per the direct feedback but to document on the forum a few things to look at:

     1.       You mention that you were able to test the TLK100PHP using the code attached, do you refer to the EthernetTlk.c of  "ethernetTLK100PHP"?

    2.       Looking at this file ("EthernetTlk.c")  I see that phy_id =1;  which is not necessarily the right phy addr on your board, need to verify that.

    3.       Referring to "EthernetTlk.c" I observe that  the "loopback(phy_id,loopback_mode);" function was enabled, it should be commented (I attached the file with comment on the loopback). Because the loopback  function will not enable you to send /  receive packets from outside the device.

    4.       Referring to "davinci_emac.c", there is a function that detects PHY's addr/id " davinci_eth_phy_detect(void)" it sets  variable " active_phy_addr" to the correct phy address But to the best of my understanding this " active_phy_addr" is not being used by functions: " davinci_eth_phy_read(u_int8_t phy_addr, u_int8_t reg_num, u_int16_t *data)", "davinci_eth_phy_write(u_int8_t phy_addr, u_int8_t reg_num, u_int16_t data)" They use "phy_addr", other functions use the  "active_phy_addr" which is correct?,  am I missing something?

     -- Scott