Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ACTLR
ADDAR
ADDRH
ADDRL
ADIN
AFECR
AFSR
AFVALID
Expand Down
25 changes: 25 additions & 0 deletions source/portable/NetworkInterface/Common/phyHandling.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,31 @@ BaseType_t xPhyStartAutoNegotiation( EthernetPhy_t * pxPhyObject,
ulRegValue |= phyPHYSTS_DUPLEX_STATUS;
}
}
else if( ulPhyID == PHY_ID_ADIN1200 )
{
/* ADIN1200 get the resolved speed information from register 0x1A (PHY_STATUS_1)
*/
uint32_t ulControlStatus = 0u;
uint32_t ulPortOperationMode = 0u;
pxPhyObject->fnPhyRead( xPhyAddress, 0x1A, &ulControlStatus );
/* Bits 7-9 indicate the speed and duplex. */
ulPortOperationMode = ( ulControlStatus >> 7u ) & 0x07u;

ulRegValue = 0;

/* Detect 10Mb operation */
if( ( ulPortOperationMode & 0x2 ) == 0 )
{
/* phyPHYSTS_SPEED_STATUS: 1=10Mb, 0=100Mb */
ulRegValue |= phyPHYSTS_SPEED_STATUS;
}

/* Detect full duplex operation */
if( ulPortOperationMode & 0x1 )
{
ulRegValue |= phyPHYSTS_DUPLEX_STATUS;
}
}
else if( xHas_1F_PHYSPCS( ulPhyID ) )
{
/* 31 RW PHY Special Control Status */
Expand Down
2 changes: 2 additions & 0 deletions source/portable/NetworkInterface/include/phyHandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@

#define PHY_ID_MV88E6071 0xFF000710

#define PHY_ID_ADIN1200 0x0283BC20

/* Initialise the struct and assign a PHY-read and -write function. */
void vPhyInitialise( EthernetPhy_t * pxPhyObject,
xApplicationPhyReadHook_t fnPhyRead,
Expand Down