From patchwork Tue Oct 22 13:22:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 177157 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp4858832ill; Tue, 22 Oct 2019 06:23:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCI6jwrlRyT8cuPHVgXhqLdrtonjM6CTSp8gWDDkd5SbiuiUoGTGq3A6K8gPo1ZYkhUdUq X-Received: by 2002:a50:ef0d:: with SMTP id m13mr8442770eds.210.1571750609921; Tue, 22 Oct 2019 06:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571750609; cv=none; d=google.com; s=arc-20160816; b=P/+KH7RI06p3dxpqKv9rnq21brXBU2/HhEIg1e+s/NLug0RyyTZii4PzLDcEBADb40 sBQtDsVjBytgvLeuY/Y3Tl7P87UzWTUCWPIs9fxIRfg6DndW4pU0SJ/18hG/m9Vuu4fa CTmvOGwinNU7+a3+hh1oLlq5Iysq326BcXlZOqH33EYEBlULx1ALGjy2qnutxB2Lc35Y 63ZjmWaJEfJjHflXD8xSVquaqAJPsw4DOw78+543HkAtiZlAbw94tM2KFnU/zGcbz6UG Jk8s0J5Odd45/5vzLGLKKg7Fh+ze2jFC3LePdNA1bMiKaaf6kTEEuFg+eu7/L8XrP4gF 0O4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IjFogRcV5VPblbZbB1hDvqvhqSLBqIveS+AehjX8pis=; b=S4lTJ/RSKGO4RBNQ5+Df/x8gjVyO4XFJlo6pCzgDA+7JtaRPVL6qQ4dQOprqlvLlNc 47FQGWiMw6GIvTWXirL4jPZZ80n6E6leOZxrfJWLhKCg8j+cvhXrF278fNtHDXecN1cK RLkKIW4c1skW433fXVUzeA4RIUyr1b6db1FVMcgUe8N/zb4+xzl8m/XyuOgvv6NQ6Q/d OMwDFXhM4MfCvl6qbUEqgjQSUN2eAuACud+sFYNq/DISj252lgINb5b0V/j6HYXxJ81d PNl2kchdnb6KDNkKXb1k46FKyHohXGNJeI1mkPj0nGm1tI4UKKp7XGPdu8ljAHH2GYR2 /f2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MhoFLSVq; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si12619641edj.354.2019.10.22.06.23.29; Tue, 22 Oct 2019 06:23:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MhoFLSVq; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731900AbfJVNX3 (ORCPT + 8 others); Tue, 22 Oct 2019 09:23:29 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:42626 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728346AbfJVNX3 (ORCPT ); Tue, 22 Oct 2019 09:23:29 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9MDNROO087130; Tue, 22 Oct 2019 08:23:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571750607; bh=IjFogRcV5VPblbZbB1hDvqvhqSLBqIveS+AehjX8pis=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MhoFLSVqvtpPys7QuSBA59p1W8YLj77oQ93Sy2Yhc3QFXGCEYXYUiqpTtkVo06Vec KWjo2LjCONXFgTfmPnmYFdgzvd2aCd3hHnI9ypXfBjNoId94jMGdM+y7F9vw7QeofR PBP9i0f2oa5nwUhTuRRG2790UVfIfPyvZ9xlNXUc= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9MDNC5p068138 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Oct 2019 08:23:12 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 22 Oct 2019 08:23:01 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 22 Oct 2019 08:23:11 -0500 Received: from lta0400828a.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9MDMplZ126427; Tue, 22 Oct 2019 08:22:54 -0500 From: Roger Quadros To: CC: , , , , , , Roger Quadros Subject: [PATCH 1/3] phy: cadence: Sierra: add phy_reset hook Date: Tue, 22 Oct 2019 16:22:47 +0300 Message-ID: <20191022132249.869-2-rogerq@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191022132249.869-1-rogerq@ti.com> References: <20191022132249.869-1-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This is required if type C driver needs to hold global reset on J7ES to perform LN10 swap. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori --- drivers/phy/cadence/phy-cadence-sierra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index affede8c4368..e6d27bdec22a 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -339,10 +339,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, };