diff options
author | Samin Guo <samin.guo@starfivetech.com> | 2022-11-01 04:59:05 +0300 |
---|---|---|
committer | Samin Guo <samin.guo@starfivetech.com> | 2022-11-01 13:54:21 +0300 |
commit | bd7deb0588459f36cf774ed58a419a7efbc9d5e4 (patch) | |
tree | db3939676589cd3852ab48ec57908ccacb918ac1 /board/starfive/evb | |
parent | 460fe5dd0b3a288eb58bee6874683288bef671ce (diff) | |
download | u-boot-bd7deb0588459f36cf774ed58a419a7efbc9d5e4.tar.xz |
board:starfive:evb: add jh7110_gmac_sel_tx_to_rgmii
JH7110B needs switch gmac0/1 tx to rgmii phy.
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Diffstat (limited to 'board/starfive/evb')
-rw-r--r-- | board/starfive/evb/starfive_evb.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/starfive/evb/starfive_evb.c b/board/starfive/evb/starfive_evb.c index effc987de1..63fa24e3b1 100644 --- a/board/starfive/evb/starfive_evb.c +++ b/board/starfive/evb/starfive_evb.c @@ -50,6 +50,24 @@ static void jh7110_timer_init(void) SYS_CRG_RESET_STATUS3_SHIFT, TIMER_RSTN_TIMER3_SHIFT); } +static void jh7110_gmac_sel_tx_to_rgmii(int id) +{ + switch (id) { + case 0: + clrsetbits_le32(AON_CRG_BASE + GMAC5_0_CLK_TX_SHIFT, + GMAC5_0_CLK_TX_MASK, + BIT(GMAC5_0_CLK_TX_BIT) & GMAC5_0_CLK_TX_MASK); + break; + case 1: + clrsetbits_le32(SYS_CRG_BASE + GMAC5_1_CLK_TX_SHIFT, + GMAC5_1_CLK_TX_MASK, + BIT(GMAC5_1_CLK_TX_BIT) & GMAC5_1_CLK_TX_MASK); + break; + default: + break; + } +} + static void jh7110_gmac_init(int id) { switch (id) { |