From patchwork Wed Oct 23 08:49:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 177247 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp416323ill; Wed, 23 Oct 2019 01:49:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6Tzjjb5VBddgQlrUVIMYrIJCQ1W+Ed9AwnSvdA5/6ULs0iA3D1faPzMBGsYw8/TztwPm3 X-Received: by 2002:a05:6402:149a:: with SMTP id e26mr35798386edv.123.1571820567446; Wed, 23 Oct 2019 01:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571820567; cv=none; d=google.com; s=arc-20160816; b=TTpHyxI7WC4gpXECmR5w8UPY/H6Iu+tgoCqBIul/iDWuiyOvX/aB5hCt4llY/PEgyg /6iZSBwsdTdsHD+E+faNAvkWx0oHTY2EMwYbNwa9m3OmXM5oeLL9IGS5c3/jqeg5v7iy 2W9X9DjbY9ElowB0OUXI2NasLgqmpNUwMBCknBM418196rD9sAvGdohRWdUkp7agKrZK AATiOdRknxUEx086AwxYOIRgflr1sv6ErVaBoGGjOr19Gp7iEvx69yh+FkunEekcHoJD Xu1i/uWKHtQRaz0EsboI2W8e0ktQVPltKSZdWi57exSSOyQUyVpVTYlio4FeHiE9paKo G18w== 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=Vg5p/9UukhFhBnfEC9XZnlFxpQ+4sUdE5PCioPm1To8=; b=i5fNeKWoLrrPpE8qcidZ2a5W3C9kMA5nY0P5SIV81Lx06dybdwSRnd6r6ubMJDOgZj d+tVhsNffOISB2lPAgCRo/JNSKYASHe8oCaMjTZhO8YNyvJwuAbmTU2bzaNg6FiowMbc uA2Y2SJ4Njr9ldM763WSqz1oAY0ho73h+C8URpuCR+7KQmp0PwHh99GqlHqmVd6wsM6P 9EVkgGIET283sgvW4C3the7zT7bIuj4lEePpLpQ8S3B60xd2Gtf19BO3EWqIUqZo0Ug5 C6bwmykIEdrm6aNICFDbajuDHzqrNDJh17633KKZFA0suZVRttYI6dCQCswl8tUQQWpW HbEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=veHln+b8; 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 q56si944048eda.38.2019.10.23.01.49.27; Wed, 23 Oct 2019 01:49:27 -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=veHln+b8; 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 S2390380AbfJWIt0 (ORCPT + 8 others); Wed, 23 Oct 2019 04:49:26 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:47746 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390331AbfJWIt0 (ORCPT ); Wed, 23 Oct 2019 04:49:26 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9N8nOFc093697; Wed, 23 Oct 2019 03:49:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571820564; bh=Vg5p/9UukhFhBnfEC9XZnlFxpQ+4sUdE5PCioPm1To8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=veHln+b8aWMlD1JjoyyZnRwTAYw7/7ZJ9V88dcI17pE6QJKZtu1Wbb0PBEUxsPN99 gBF5MWZxsfG+WpVGDh32G0/5gM8Hvyw3vTb52trhdKdd/qDouCVpkiVhTnxkZmLUcw IX/yA0VS9sptF8RqohqOckiBIAUnQMGnEnxjcrkE= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9N8nNQE127748 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 23 Oct 2019 03:49:24 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 23 Oct 2019 03:49:12 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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; Wed, 23 Oct 2019 03:49:21 -0500 Received: from lta0400828a.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9N8nHVu061069; Wed, 23 Oct 2019 03:49:19 -0500 From: Roger Quadros To: CC: , , , , , , Roger Quadros Subject: [PATCH v2 1/3] phy: cadence: Sierra: add phy_reset hook Date: Wed, 23 Oct 2019 11:49:14 +0300 Message-ID: <20191023084916.26895-2-rogerq@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191023084916.26895-1-rogerq@ti.com> References: <20191023084916.26895-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 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 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, };