Commit b20da3c6 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Vinod Koul
Browse files

phy: cadence-torrent: Add delay for PIPE clock to be stable



The Torrent spec specifies delay of 660.5us after phy_reset is
asserted by the controller. To be on the safe side provide a delay
of 5ms to 10ms in ->phy_on() callback where the SERDES is already
configured in bootloader.

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20210330110138.24356-6-kishon@ti.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent e0611d6d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -371,7 +371,16 @@ static const struct phy_ops cdns_torrent_phy_ops = {
	.owner		= THIS_MODULE,
};

static int cdns_torrent_noop_phy_on(struct phy *phy)
{
	/* Give 5ms to 10ms delay for the PIPE clock to be stable */
	usleep_range(5000, 10000);

	return 0;
}

static const struct phy_ops noop_ops = {
	.power_on	= cdns_torrent_noop_phy_on,
	.owner		= THIS_MODULE,
};