Skip to content

Commit

Permalink
rockchip: fix stmmc mdio with JLSEMI JL2XX1_PHY
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Aug 19, 2022
1 parent af98ec2 commit b889ab8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions target/linux/rockchip/patches-5.19/801-fix-stmmac_mdio.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
+++ a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -498,6 +498,11 @@ int stmmac_mdio_register(struct net_devi
if (priv->plat->has_xgmac)
stmmac_xgmac2_mdio_read(new_bus, 0, MII_ADDR_C45);

+ stmmac_mdio_write(new_bus,0,31,2627);
+ stmmac_mdio_write(new_bus,0,25,0x1801);
+ stmmac_mdio_write(new_bus,0,31,0);
+ stmmac_mdio_write(new_bus,0,0,0x8000);
+
if (priv->plat->phy_node || mdio_node)
goto bus_register_done;

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2907,6 +2907,8 @@ static int stmmac_init_dma_engine(struct
if (priv->extend_desc && (priv->mode == STMMAC_RING_MODE))
atds = 1;

+ msleep(1500);
+
ret = stmmac_reset(priv, priv->ioaddr);
if (ret) {
dev_err(priv->device, "Failed to reset the dma\n");

0 comments on commit b889ab8

Please sign in to comment.