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.

AM2432: how to implement custom driver for a new PHY, and its effort estimate

Part Number: AM2432
Other Parts Discussed in Thread: DP83869HM, DP83869, DP83826E, DP83822H, SYSCONFIG

Hi Expert,

In SDK, I can see that DP83869HM is used for EVM. In our product, LAN8740A will be used for MII and 3rd party Ethernet/IP.

Could you give me a guide on how to implement this PHY driver for LAN8740A? I could refer to TI documents below,

https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_12/exports/docs/api_guide_am243x/BOARD_ETHPHY_PAGE.html#autotoc_md640

Is this the correct starting point? or Is there any other information you can guide?

And as a first step, I need to estimate the effort, like whether or not it is a simple change or not.

I would appreciate it if you share your experience and knowledge about the required effort/steps as well.

Regards,

Moonil

  • Hi Moonil,

    Are you using icss-emac or Enet lld? I will come back on effort required based on this.

    For adding PHY support in icss-emac, the link you shared is correct.

    For adding PHY support in enet-lld, you can refer to - AM243x MCU+ SDK: Ethernet PHY Integration Guide

    Regards,

    Prasad

  • Hi Prasad,

    icss-emac will be used for our project since we will run a custom ethernet/pi stack.

    please check the effort based on this information.

    Regards,

    Moonil

  • Moonil
    Adding Support for Custom PHY page is the correct page which shows how to add custom PHY support.

    Quoting from the page; "Essentially one needs to write code similar to a supported PHY device (For an example, see ${SDK_INSTALL_PATH}/source/board/ethphy/ethphy_dp83869.c)".

    So the main effort will be to create a similar file corresponding to your PHY. Also, the TI driver supports a lot of commands (See ETHPHY Commands). You may not need all of them for your PHY, and you can start by adding support for the commands which you will need.

    Regards
    Dhaval Khandla

  • Hi Dhaval,

    Thank you for your guide.

    I have one quick question about the effort estimate.

    We are also considering another option, DP83826 PHY. 

    so, if we choose TI DP83826 instead of LAN8740, I wonder whether the effort to implement the driver of PHY can be very simple compared to LAN8740 or, it is almost the same.

    Can we expect that our driver change from the existing driver of DP83869 is more simple when we use this TI family, DP83826 PHY?

    I would appreciate it if you share your opinion and knowledge on this comparison.

    Regards,

    Moonil

  • Moonil
    Actually DP83826E is present in our AM263x Control Card EVM, so AM263x MCU+ SDK has the support for this PHY already available. So the same code can work as-is on AM243x as well. You can refer to it by downloading MCU-PLUS-SDK-AM263X

    Regards
    Dhaval Khandla

  • Hi Dhaval,

    Thank you for your information.

    Q1) I can find the DP83826E driver source file in AM243x SDK as well. However, it is not shown in syscfg. When I checked this in AM263x, both DP83826E and DP83869 are shown in syscfg.

    Can you let me know how to make DP83826E to be shown in syscfg with AM243x SDK?

    Q2) For temperature requirement (-40° to +125°C), we are also considering DP83822H instead of DP83826E.

    Can we still use the DP83826E driver for DP83822H? Could you let me know how many parts should be changed in the driver? I don't think many parts we have to change. Can you share your experience about this estimate as well?

    Regards,

    Moonil

  • Hi

    Q1) I can find the DP83826E driver source file in AM243x SDK as well. However, it is not shown in syscfg. When I checked this in AM263x, both DP83826E and DP83869 are shown in syscfg.

    Can you let me know how to make DP83826E to be shown in syscfg with AM243x SDK?

    You will have to update the .js files for SysConfig. I can share the steps if you are okay with making that change.


    Q2) For temperature requirement (-40° to +125°C), we are also considering DP83822H instead of DP83826E.

    Can we still use the DP83826E driver for DP83822H? Could you let me know how many parts should be changed in the driver? I don't think many parts we have to change. Can you share your experience about this estimate as well?

    We need to compare the register compatibility of D083826E and DP83822H. For all the registers which are not same, the driver needs to handle that difference. About the estimate, we need to check the differences in register and write new code based on the differences.

    Regards
    Dhaval