From patchwork Tue Nov 3 03:55:52 2020 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: 320391 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp4261300ilc; Mon, 2 Nov 2020 19:56:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxubraAlegGQ0VzTrwUz2qnyYEbcsdZnm1xIifm5nqjDDycZYfF3RVlpLFK6hyKY3q62pCu X-Received: by 2002:a05:6402:4d:: with SMTP id f13mr19905192edu.306.1604375814494; Mon, 02 Nov 2020 19:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604375814; cv=none; d=google.com; s=arc-20160816; b=z9fxud4O9QOabnDo2AScuqjqPNCtyGqIPuNFBLGePaPRfId4xE4wnTbwvt8TsOBf5e C6uZwo1//7DhAhnHrFgP/uBrxVyVqdffe+n7+ZoqVoBpxSIfm0Vv8pbGlIXKtdc2RhKt qpAeZfaTHD9KhXW3A4BXeZmH5BsB54ya+9FO6QGciTZetRF9UY2qm81IdBG538pKDtqw qScQnsGsi83moWB2fGoXY+nmao15yDwjcNMihIYYOw/hztS6BPNdy8u1oHgh640G6N7m swlOvdBZNe+C8cxrrdT0g0V/p6UitcnKn3VAG0EZ7YqPi2U22N1KwYpODAUbv1DnAUcY pAvQ== 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=hZea0eYsVNvA04vqZbladeZtJPWX5S3T1/tgGYMH90w=; b=kjKJ3dhKlWuq/k6D8HoX4inxIb+Jd+Jym32MWQPbNhOQf5MaxlSiCVRkffkP/jQhkM aMLTn41d0k4R5eGTKhv2M1YQEj/vqbfMS8cw1Nw3dKkKk1R7uhMz5ITo6bFrcXsKhQ3d byd1AKd05GVi2fpIrJaUO4oFC+uhkb/c0PqNqCdtE3dxB2NKdr+gnWUYfXqFoHCIuJN0 IiZWleiFofZC0oBfLqFh4SMYe1EPatYYGCql0JBEJq3uhs6oAxu3OHOhCXB2A7IwxzTy AaMf3bdqYevwuBTiCmyVRfpKIoKwsz7zQCgOP3Gndru/8e4qUwyMlmZleC8F+DzGuvPv 9vWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FObGxQAB; 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 a13si7044536edm.538.2020.11.02.19.56.54; Mon, 02 Nov 2020 19:56:54 -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=FObGxQAB; 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 S1727525AbgKCD4n (ORCPT + 6 others); Mon, 2 Nov 2020 22:56:43 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41936 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727524AbgKCD4h (ORCPT ); Mon, 2 Nov 2020 22:56:37 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A33uVKo034219; Mon, 2 Nov 2020 21:56:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604375791; bh=hZea0eYsVNvA04vqZbladeZtJPWX5S3T1/tgGYMH90w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FObGxQAB0JTtsgi1LopWVW5t6V+naJ6Y5+uakrUI0wlbaps3dl1xV8qVpbBt3AOdP 0Yl5XVLbOc+lGlxhyJgMiiU40CuA52HRCtfFQ3M0dqIG8HZeJ+SpgLC3bs+mgG4o4S pJH6bozlvDbIxJbKxhRjWzFi4WPSVbR45hx+YuGs= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A33uVrE112400 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Nov 2020 21:56:31 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 2 Nov 2020 21:56:19 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) 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; Mon, 2 Nov 2020 21:56:19 -0600 Received: from a0393678-ssd.dal.design.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 0A33tuqQ101157; Mon, 2 Nov 2020 21:56:15 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel CC: Swapnil Kashinath Jakhade , Milind Parab , Yuti Suresh Amonkar , , Subject: [PATCH 5/9] phy: cadence: Sierra: Fix PHY power_on sequence Date: Tue, 3 Nov 2020 09:25:52 +0530 Message-ID: <20201103035556.21260-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201103035556.21260-1-kishon@ti.com> References: <20201103035556.21260-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 --- drivers/phy/cadence/phy-cadence-sierra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 4429f41a8f58..e08548417bce 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) { @@ -621,7 +627,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: