Tool/software:
Hi,
I am designing my custom board using AM64x/AM243x + MCUSDK. But not using PHY provided on EVM/LP board.
Can you provide guidance how to do this?
Regards
Tool/software:
Hi,
I am designing my custom board using AM64x/AM243x + MCUSDK. But not using PHY provided on EVM/LP board.
Can you provide guidance how to do this?
Regards
Hi,
AM64x/AM243x-EVM have DP83867IRRGZ and DP83869HMRGZT PHY on board. So MCUSDK out of example are written to work with these 2 PHY only.
If you want to use some other PHY instead of these 2, you need to follow below steps:
Custom Driver for Custom PHY
The very first step is to create driver (.c, .h) files for specific (custom) PHY.
In-case you are using a TI PHY, you can find some RTOS and linux drivers at: https://github.com/TexasInstruments/ti-ethernet-software/blob/main/README.md.
If you don't find the required driver here, please raise an E2E for the same and TI experts will guide you.
To integrate your PHY driver follow the steps below:
# TO CLEAN gmake -s -f makefile.am243x enet-cpsw_r5f.ti-arm-clang_clean # TO BUILD gmake -s -f makefile.am243x enet-cpsw_r5f.ti-arm-clang
Now the PHY driver for DP83TC812 has been integrated in the enet library to work with CPSW. Please note that not all the features of the PHY are supported.
Configuring your board to Integrate custom PHY
Define a Cfg struct (DP8xxxx_Cfg in this case) for the PHY driver. (refer the phy driver include file for the structure)
#include <networking/enet/core/include/phy/dp83tc812.h>
/* PHY drivers */
extern EnetPhy_Drv gEnetPhyDrvGeneric;
extern EnetPhy_Drv gEnetPhyDrvDp83tc812;
/*! \brief All the registered PHY specific drivers. */
static const EnetPhyDrv_Handle gEnetPhyDrvs[] =
{
&gEnetPhyDrvDp83tc812,
&gEnetPhyDrvGeneric, /* Generic PHY - must be last */
};
/* Create a config struct for the PHY */
/*!
* \brief Common Processor Board (CPB) board's DP83tc812 PHY configuration.
*/
static const Dp83tc812_Cfg gEnetCpbBoard_dp83tc812PhyCfg =
{
.txClkShiftEn = true,
.rxClkShiftEn = true,
.interruptEn = false,
.sgmiiAutoNegEn = true,
.MasterSlaveMode = DP83TC812_MASTER_SLAVE_STRAP,
};
/*
* AM263x board configuration.
*
* 1 x RGMII PHY connected to AM263x CPSW_3G MAC port.
*/
static const EnetBoard_PortCfg gEnetCpbBoard_am263xEthPort[] =
{
{ /* "CPSW3G" */
.enetType = ENET_CPSW_3G,
.instId = 0U,
.macPort = ENET_MAC_PORT_1,
.mii = { ENET_MAC_LAYER_GMII, ENET_MAC_SUBLAYER_REDUCED },
.phyCfg =
{
.phyAddr = 0,
.isStrapped = false,
.skipExtendedCfg = false,
.extendedCfg = &gEnetCpbBoard_dp83tc812PhyCfg,
.extendedCfgSize = sizeof(gEnetCpbBoard_dp83tc812PhyCfg),
},
.flags = 0U,
},
{ /* "CPSW3G" */
.enetType = ENET_CPSW_3G,
.instId = 0U,
.macPort = ENET_MAC_PORT_2,
.mii = { ENET_MAC_LAYER_GMII, ENET_MAC_SUBLAYER_REDUCED },
.phyCfg =
{
.phyAddr = 3,
.isStrapped = false,
.skipExtendedCfg = false,
.extendedCfg = &gEnetCpbBoard_dp83tc812PhyCfg,
.extendedCfgSize = sizeof(gEnetCpbBoard_dp83tc812PhyCfg),
},
.flags = 0U,
},
};
Now compile your application with this custom board config file
Regards
Ashwani