Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp358654pxf; Wed, 10 Mar 2021 07:48:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY+bs8xm/Y0Kb0M0Qgdhsded87y7vxNEEoVU1+IFVSzL41fyP56BvKqn86Ak8oXkK2pniU X-Received: by 2002:aa7:cf16:: with SMTP id a22mr3971090edy.288.1615391280354; Wed, 10 Mar 2021 07:48:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615391280; cv=none; d=google.com; s=arc-20160816; b=Ar/IXbhZUiQUMeDozIdRfi8uWz5n8RRGkw4xObBlW8z1nLpS1JRo+eZVjiO4kPH4rC C2Cg0I1Bu0fZAr2akhIe8HWC63hNHmBPWKEX9bmC1aKZZNpzbyHxjT/hfF5F/Q5jMcoN buSJrmH67odK+r9g7q2dFcB9w536oGHOhhx4HCgC3eRZl3bRknqfSN6b54WZ0hbgBlQP WZDuNy/kMambdHlmJrIrVdLmR7tzHYP7+3tBQjKNT3513qHY7KopPrZ3MeWg9oqRUcRM VRBsLU+Z3gJwmTRH0HqD5k/YfCawV1AmoFR8vXp52a2fdmXp0C7aGnkZNygc5Ryd4ZTh vILQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kDesQPQvYRjN7JUDLg1aWRBB+2K3tXaBtJ48Qzz8gLs=; b=w1+o75GhhtBKrjgn74Feuf8y0PRogGTILkycAvmYkFrJYBIzdeMhFEbKGQTYb3dMaO oRgvWDGrUGN87agwmPW51BjuBgl1Brz7kzeMmw/GiCOsfJlc3pIKruXZARVX2yEnsCKK VVx0znmZmlYgI0FcfFZW101Vf6xJ7cN2rJQJzKjhGWrPAkd0k28/vzlGfHTSBTNqcc4J bzwDMWsRHBn43RV76wBLhwLNENMoFhpzTw88noEigxRAt4EuIDHuAN+5noM4avCZNnf7 al9gdhUC/nt1JObk+hZIG14RLEJ7ieWsctEB1Lq8/OzHCXV/yDmrp06d0G8lTgpfZO/f cCtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Zi6dQLKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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. [23.128.96.18]) by mx.google.com with ESMTP id p5si11906340edt.50.2021.03.10.07.47.38; Wed, 10 Mar 2021 07:48:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Zi6dQLKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S233214AbhCJPqn (ORCPT + 99 others); Wed, 10 Mar 2021 10:46:43 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43734 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbhCJPqO (ORCPT ); Wed, 10 Mar 2021 10:46:14 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12AFk9DH117219; Wed, 10 Mar 2021 09:46:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615391169; bh=kDesQPQvYRjN7JUDLg1aWRBB+2K3tXaBtJ48Qzz8gLs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Zi6dQLKl6hZG0nmUE3w9cjvn9uXtDX96sMMcPbc3IrJGcUHsMNfG7aXdRZLM46/H1 kV1tnA3wZv3WRc4dMVFKU44h7ojzr1biWXOBHeS4VVj1CSsQ2p5/2YQx2apme/HZzu UJrT+QDWwMyz2g+oatw0ARx07fyt/ayW173wVb+0= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12AFk9YI031399 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Mar 2021 09:46:09 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 10 Mar 2021 09:46:08 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) 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.2176.2 via Frontend Transport; Wed, 10 Mar 2021 09:46:08 -0600 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12AFk2KP066370; Wed, 10 Mar 2021 09:46:06 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , Lokesh Vutla , Subject: [PATCH v6 01/13] phy: cadence: Sierra: Fix PHY power_on sequence Date: Wed, 10 Mar 2021 21:15:46 +0530 Message-ID: <20210310154558.32078-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310154558.32078-1-kishon@ti.com> References: <20210310154558.32078-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") de-asserts PHY_RESET even before the configurations are loaded in phy_init(). However PHY_RESET should be de-asserted only after all the configurations has been initialized, instead of de-asserting in probe. Fix it here. Fixes: 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") Signed-off-by: Kishon Vijay Abraham I Cc: # v5.4+ Reviewed-by: Philipp Zabel --- drivers/phy/cadence/phy-cadence-sierra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 26a0badabe38..19f32ae877b9 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -319,6 +319,12 @@ static int cdns_sierra_phy_on(struct phy *gphy) u32 val; int ret; + ret = reset_control_deassert(sp->phy_rst); + if (ret) { + dev_err(dev, "Failed to take the PHY out of reset\n"); + return ret; + } + /* Take the PHY lane group out of reset */ ret = reset_control_deassert(ins->lnk_rst); if (ret) { @@ -616,7 +622,6 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) pm_runtime_enable(dev); phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); - reset_control_deassert(sp->phy_rst); return PTR_ERR_OR_ZERO(phy_provider); put_child: -- 2.17.1