summaryrefslogtreecommitdiff
path: root/board/mscc
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2019-05-01 13:16:59 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2019-05-03 16:46:36 +0200
commitbd9216e29b81ff2e35d203668f319aaaf396e018 (patch)
treea092e70134a893d6c43a3f1b8cddf66671035a77 /board/mscc
parent7e323f17829d3cb336d8fa1a07e521f82d45e9f1 (diff)
board: mscc: luton: Update MSCC Luton board
Implement method board_phy_config to configure the external phys on the pcb90. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Diffstat (limited to 'board/mscc')
-rw-r--r--board/mscc/luton/luton.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index 807c717e33..114f7fd9d9 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -6,8 +6,7 @@
#include <common.h>
#include <asm/io.h>
#include <led.h>
-
-DECLARE_GLOBAL_DATA_PTR;
+#include <miiphy.h>
enum {
BOARD_TYPE_PCB090 = 0xAABBCD00,
@@ -36,6 +35,16 @@ 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, 0x80A0);
+ while (phy_read(phydev, 0, 18) & 0x8000)
+ ;
+ phy_write(phydev, 0, 31, 0);
+ return 0;
+}
+
static void do_board_detect(void)
{
u32 chipid = (readl(BASE_DEVCPU_GCB + CHIP_ID) >> 12) & 0xFFFF;