summaryrefslogtreecommitdiff
path: root/board/mscc
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2019-04-11 14:11:33 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2019-05-03 16:42:23 +0200
commitd2691b4af2cd2c3cb7f385938fcd63af7de74fca (patch)
tree3ad5e7f94af0656a76ebfbcd18086cf4acfd602b /board/mscc
parent8cf9473288dc4f35858d8267b7b4ed0702c89209 (diff)
downloadu-boot-d2691b4af2cd2c3cb7f385938fcd63af7de74fca.tar.gz
u-boot-d2691b4af2cd2c3cb7f385938fcd63af7de74fca.tar.bz2
u-boot-d2691b4af2cd2c3cb7f385938fcd63af7de74fca.zip
board: mscc: serval: Update MSCC Serval boards
In Serval SoC family there are 2 different pcb, both of them have the same phy, but with different version. Therefore implement board_phy_config and set all the phys in the same way. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Diffstat (limited to 'board/mscc')
-rw-r--r--board/mscc/serval/serval.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c
index ade041e118..da7f55620d 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/io.h>
#include <led.h>
+#include <miiphy.h>
enum {
BOARD_TYPE_PCB106 = 0xAABBCD00,
@@ -27,6 +28,17 @@ int board_early_init_r(void)
return 0;
}
+int board_phy_config(struct phy_device *phydev)
+{
+ phy_write(phydev, 0, 31, 0x10);
+ phy_write(phydev, 0, 18, 0x80F0);
+ while (phy_read(phydev, 0, 18) & 0x8000)
+ ;
+ phy_write(phydev, 0, 14, 0x800);
+ phy_write(phydev, 0, 31, 0);
+ return 0;
+}
+
static void do_board_detect(void)
{
u16 gpio_in_reg;