summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSamin Guo <samin.guo@linux.starfivetech.com>2022-10-15 16:25:03 +0300
committerJianlong Huang <jianlong.huang@starfivetech.com>2022-11-03 11:31:42 +0300
commitb249d3bac3ab7524e2c066afdf1fef59d63dad5b (patch)
tree386d391406962ad8a277e15239d0fcb606a9600e /board
parent48c7e4f1d064eb4f7b9493eda70897778a4e115f (diff)
downloadu-boot-b249d3bac3ab7524e2c066afdf1fef59d63dad5b.tar.xz
board:starfive:visionfive2: Modify jh7110_gmac_init
JH7110B(chip_vision B) need switch gmac tx clk to rgmii phy. Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
Diffstat (limited to 'board')
-rwxr-xr-xboard/starfive/visionfive2/starfive_visionfive2.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c
index 3e92a5943c..85db2b53a9 100755
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -188,9 +188,19 @@ static int get_board_type(void)
return type;
}
-static void jh7110_gmac_init(int type)
+static void jh7110_gmac_init(int chip_type, int pcb_type)
{
- switch (type) {
+ switch (chip_type) {
+ case CHIP_A:
+ break;
+ case CHIP_B:
+ default:
+ jh7110_gmac_sel_tx_to_rgmii(0);
+ jh7110_gmac_sel_tx_to_rgmii(1);
+ break;
+ }
+
+ switch (pcb_type) {
case BOARD_1000M_100M:
jh7110_gmac_init_1000M(0);
jh7110_gmac_init_100M(1);
@@ -401,7 +411,8 @@ int board_init(void)
int board_late_init(void)
{
get_boot_mode();
- jh7110_gmac_init(get_board_type());
+
+ jh7110_gmac_init(get_chip_type(), get_board_type());
/*
* save the memory info by environment variable in u-boot,
* It will used to update the memory configuration in dts,