summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2021-03-30 14:01:38 +0300
committerVinod Koul <vkoul@kernel.org>2021-03-31 14:15:47 +0300
commitb20da3c6b9dd0787e3eec996de806829e1bcaad1 (patch)
tree2a890851558f7ece4fc8303168f3bfdfe76b02f3 /drivers/phy
parente0611d6d9639b79bd2605a9eb2e5cae28edc3e85 (diff)
downloadlinux-b20da3c6b9dd0787e3eec996de806829e1bcaad1.tar.xz
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: Kishon Vijay Abraham I <kishon@ti.com> Link: https://lore.kernel.org/r/20210330110138.24356-6-kishon@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/cadence/phy-cadence-torrent.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index ff8bb4b724c0..0477e7beebbf 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -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,
};