From: Kishon Vijay Abraham I <kishon@ti.com>
To: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: Swapnil Jakhade <sjakhade@cadence.com>,
<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
Lokesh Vutla <lokeshvutla@ti.com>
Subject: [PATCH v2 5/5] phy: cadence-torrent: Add delay for PIPE clock to be stable
Date: Tue, 30 Mar 2021 16:31:38 +0530 [thread overview]
Message-ID: <20210330110138.24356-6-kishon@ti.com> (raw)
In-Reply-To: <20210330110138.24356-1-kishon@ti.com>
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>
---
drivers/phy/cadence/phy-cadence-torrent.c | 9 +++++++++
1 file changed, 9 insertions(+)
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,
};
--
2.17.1
next prev parent reply other threads:[~2021-03-30 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 11:01 [PATCH v2 0/5] j721e-wiz/cadence-torrent: Support to skip SERDES configuration Kishon Vijay Abraham I
2021-03-30 11:01 ` [PATCH v2 1/5] phy: ti: j721e-wiz: Do not configure wiz if its already configured Kishon Vijay Abraham I
2021-03-30 11:01 ` [PATCH v2 2/5] phy: cadence-torrent: Group reset APIs and clock APIs Kishon Vijay Abraham I
2021-03-30 11:01 ` [PATCH v2 3/5] phy: cadence-torrent: Do not configure SERDES if it's already configured Kishon Vijay Abraham I
2021-03-30 11:01 ` [PATCH v2 4/5] phy: cadence-torrent: Explicitly request exclusive reset control Kishon Vijay Abraham I
2021-03-30 11:01 ` Kishon Vijay Abraham I [this message]
2021-03-31 11:15 ` [PATCH v2 0/5] j721e-wiz/cadence-torrent: Support to skip SERDES configuration Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210330110138.24356-6-kishon@ti.com \
--to=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lokeshvutla@ti.com \
--cc=p.zabel@pengutronix.de \
--cc=sjakhade@cadence.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®