From patchwork Thu Mar 4 04:41:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 392720 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp348576jai; Thu, 4 Mar 2021 14:16:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7Kh8CQqogswMibKbcSNKiddJG0mxaVOeZpWn3Iq60wYtVrcMb4iY5adHhebPJDQel4flA X-Received: by 2002:a05:6402:1a4f:: with SMTP id bf15mr6768400edb.304.1614896182148; Thu, 04 Mar 2021 14:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614896182; cv=none; d=google.com; s=arc-20160816; b=EIEhoE/VgP6qA9XyoXm9bg3RyzaS9d93WJOB8VqDCYBEzqZ+Yp/HKl3KA3opFKD5lI rR6AMoNzrDgZGFhp2COhkTP3vz+Jh3mbxnMJ6+YtIziNvEJiC4b6fmyMtid/7AsxrNmt jfPSbaDin2kex9/OFDs/W5K+PmxcCfOhKbss3t8Erq7ztJyKvuTkyrTlu2w4J7EU8EST 1rNI1tm4MAPFbHKMezbE/tWS6ifleC5hn2N3MssaS4lwhveIIomag2SU25PwDRwcLJG4 S5fIIYJeerpjDNHNMAdk1vTltPYxHU+dmEeTl4PUiTHS8UMALIalixJFQ8iMImhtK7Gs xc/A== 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=HHTvmMjtTJRPNFpN3zkcx0PIiGXY1RMP1eK0a1ouBO4=; b=slzKtEte8PzgbNGG8yR8ytPjI7rAvHb6wRX4YjN4Ef0T0UimlP7LMcY3YSNJrrdlFz XNr5Bu0WKSdkj3J8CnD8359n8z83zcvzyYdmpiboFDcu962KgmG2VpblSdNwajM6R5iA HjHphlVE6Tl/KMolk5ZgTg7vzltZYl4yk1CHt6pIELdjsnxG3i0/bdxWwKtnNyOWFwsV G8dAh26W3CJDHrnJLHw9g6CUUWgIHHOOAZhNlfGKOxOc18NszssJ1igWZD5N4bjk2PFq vLsWVaVenWwg0TuMYCzYxdun88d1Qirr5k144sVds4PvCZC8X2KHkxCYCeaVGeqnbxxU fXpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Q+sF68pn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id k6si527757edj.545.2021.03.04.14.16.22; Thu, 04 Mar 2021 14:16:22 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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=Q+sF68pn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 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 S233580AbhCDEm5 (ORCPT + 6 others); Wed, 3 Mar 2021 23:42:57 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47100 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233557AbhCDEm3 (ORCPT ); Wed, 3 Mar 2021 23:42:29 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 1244fYKo052726; Wed, 3 Mar 2021 22:41:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1614832894; bh=HHTvmMjtTJRPNFpN3zkcx0PIiGXY1RMP1eK0a1ouBO4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Q+sF68pnb33I4wcR61zZ5mYu/WLg39P07W8zX0Yr1c6t9R9yPkJ3grgvX5MmuCZ3r JOsLBFUk2iBjCO33hkqPatG1XYBNdHpLkbiBJkV36z0kl4pchSrqY9h3Q9JIQKZ2vo nyjgnz3mpktfy7O8sTP/p/5J3z0gSBmOunWVyYVY= 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 1244fY9e087940 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Mar 2021 22:41:34 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) 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.1979.3; Wed, 3 Mar 2021 22:41:34 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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.1979.3 via Frontend Transport; Wed, 3 Mar 2021 22:41:34 -0600 Received: from a0393678-ssd.dhcp.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 1244fQfi042911; Wed, 3 Mar 2021 22:41:31 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , Lokesh Vutla , Subject: [PATCH v4 01/13] phy: cadence: Sierra: Fix PHY power_on sequence Date: Thu, 4 Mar 2021 10:11:10 +0530 Message-ID: <20210304044122.15166-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210304044122.15166-1-kishon@ti.com> References: <20210304044122.15166-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@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+ --- drivers/phy/cadence/phy-cadence-sierra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Philipp Zabel 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: