Skip to content

Commit

Permalink
net: ks8851: Add delay after vdd regulator enable
Browse files Browse the repository at this point in the history
The reset gpio of KSZ8851 on the RevPi Core and RevPi Connect is
inverted. The reset circuit also has a buffer which keeps the KSZ8851
upto 80ms in reset even if the reset pin was released. To workaround
the issue without totally breaking the driver on other boards the reset
is implemented as a fixed regulator. This makes it possible to
workaround the inverted polarity and the 80ms of the buffer. The actuall
reset of at least 10ms is not reached with this workaround. So we add an
extra delay after the vdd regulator is enabled.

Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com>
  • Loading branch information
Philipp Rosenberger committed Oct 25, 2021
1 parent 48191ce commit 20ee10b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/micrel/ks8851_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,8 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev,
if (IS_ERR(ks->vdd_reg)) {
ret = PTR_ERR(ks->vdd_reg);
goto err_reg;
} else if (ks->vdd_reg) {
usleep_range(10000, 11000);
}

ret = regulator_enable(ks->vdd_reg);
Expand Down

0 comments on commit 20ee10b

Please sign in to comment.