mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
sama5d3xek: run PHY's config
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Bo Shen <voice.shen@atmel.com>
This commit is contained in:
parent
476095772f
commit
b719a08863
1 changed files with 20 additions and 9 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <lcd.h>
|
#include <lcd.h>
|
||||||
#include <atmel_lcdc.h>
|
#include <atmel_lcdc.h>
|
||||||
#include <atmel_mci.h>
|
#include <atmel_mci.h>
|
||||||
|
#include <phy.h>
|
||||||
#include <micrel.h>
|
#include <micrel.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
@ -273,15 +274,25 @@ int dram_init(void)
|
||||||
|
|
||||||
int board_phy_config(struct phy_device *phydev)
|
int board_phy_config(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
|
/* board specific timings for GMAC */
|
||||||
|
if (has_gmac()) {
|
||||||
/* rx data delay */
|
/* rx data delay */
|
||||||
ksz9021_phy_extended_write(phydev,
|
ksz9021_phy_extended_write(phydev,
|
||||||
MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, 0x2222);
|
MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW,
|
||||||
|
0x2222);
|
||||||
/* tx data delay */
|
/* tx data delay */
|
||||||
ksz9021_phy_extended_write(phydev,
|
ksz9021_phy_extended_write(phydev,
|
||||||
MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, 0x2222);
|
MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW,
|
||||||
|
0x2222);
|
||||||
/* rx/tx clock delay */
|
/* rx/tx clock delay */
|
||||||
ksz9021_phy_extended_write(phydev,
|
ksz9021_phy_extended_write(phydev,
|
||||||
MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, 0xf2f4);
|
MII_KSZ9021_EXT_RGMII_CLOCK_SKEW,
|
||||||
|
0xf2f4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* always run the PHY's config routine */
|
||||||
|
if (phydev->drv->config)
|
||||||
|
return phydev->drv->config(phydev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue