board: milkv_duo: Add init code for Milk-V Duo ethernet
Initialize register in cv1800b ethernet phy to make it compatible with
generic phy driver
Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
diff --git a/board/sophgo/milkv_duo/board.c b/board/sophgo/milkv_duo/board.c
index e7e28fe..9adbb08 100644
--- a/board/sophgo/milkv_duo/board.c
+++ b/board/sophgo/milkv_duo/board.c
@@ -3,11 +3,17 @@
* Copyright (c) 2024, Kongyang Liu <seashell11234455@gmail.com>
*/
- #include <dm/lists.h>
+#include <dm/lists.h>
+
+#include "ethernet.h"
int board_init(void)
{
if (IS_ENABLED(CONFIG_SYSRESET_CV1800B))
device_bind_driver(gd->dm_root, "cv1800b_sysreset", "sysreset", NULL);
+
+ if (IS_ENABLED(CONFIG_NET))
+ cv1800b_ephy_init();
+
return 0;
}