public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <kishon@ti.com>
Cc: <aniljoy@cadence.com>, <adouglas@cadence.com>, <nsekhar@ti.com>,
	<jsarha@ti.com>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH v5 1/3] phy: cadence: Sierra: add phy_reset hook
Date: Mon, 6 Jan 2020 15:06:20 +0200	[thread overview]
Message-ID: <20200106130622.29703-2-rogerq@ti.com> (raw)
In-Reply-To: <20200106130622.29703-1-rogerq@ti.com>

Some platforms e.g. J721e need lane swap register
to be programmed before reset is deasserted.
This patch ensures that we propagate the phy_reset
back to the reset controller driver.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/phy/cadence/phy-cadence-sierra.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index eb87f1a0a596..a66bea4c557f 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -341,10 +341,20 @@ static int cdns_sierra_phy_off(struct phy *gphy)
 	return reset_control_assert(ins->lnk_rst);
 }
 
+static int cdns_sierra_phy_reset(struct phy *gphy)
+{
+	struct cdns_sierra_phy *sp = dev_get_drvdata(gphy->dev.parent);
+
+	reset_control_assert(sp->phy_rst);
+	reset_control_deassert(sp->phy_rst);
+	return 0;
+};
+
 static const struct phy_ops ops = {
 	.init		= cdns_sierra_phy_init,
 	.power_on	= cdns_sierra_phy_on,
 	.power_off	= cdns_sierra_phy_off,
+	.reset		= cdns_sierra_phy_reset,
 	.owner		= THIS_MODULE,
 };
 
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


  reply	other threads:[~2020-01-06 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 13:06 [PATCH v5 0/3] phy: cadence: j721e-wiz: Add Type-C plug flip support Roger Quadros
2020-01-06 13:06 ` Roger Quadros [this message]
2020-01-06 13:06 ` [PATCH v5 2/3] dt-bindings: phy: ti,phy-j721e-wiz: Add Type-C dir GPIO Roger Quadros
2020-01-06 13:06 ` [PATCH v5 3/3] phy: ti: j721e-wiz: Manage typec-gpio-dir Roger Quadros
2020-01-06 13:07 ` [PATCH v5 0/3] phy: cadence: j721e-wiz: Add Type-C plug flip support Roger Quadros
2020-01-08  7:42   ` Kishon Vijay Abraham I

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=20200106130622.29703-2-rogerq@ti.com \
    --to=rogerq@ti.com \
    --cc=adouglas@cadence.com \
    --cc=aniljoy@cadence.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jsarha@ti.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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