Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1362572pxf; Fri, 19 Mar 2021 05:46:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk6QIhUI1m3HeKsi4P8rPZqWda1n+zeMhq4P9LqB+qjf5Opt/in4GtNTVrIruyHpCbl3QI X-Received: by 2002:a17:906:814b:: with SMTP id z11mr4067261ejw.290.1616157961648; Fri, 19 Mar 2021 05:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616157961; cv=none; d=google.com; s=arc-20160816; b=fdsz7gHydT3rj+5XhleAN4IgzKQNsImvaaA0aizzQmHPc3Kkdv84V6N9dXhmW4abNz uTFdeX9ZTRQJa55DfsdkKgrdp5YZfJwM3wvXNBX4C/K7Z7hemPaivXWbJSFu0luFpoXt i1lRLs/HRGxcdA/IjuEvZDof/s5VNy10cuVkyxR0JYCGUrWPQIRZVfdaPGFjkQinKZW9 /QoWk02Y4HA1q3f5N2C68sVn5AYoad3amsv19boMi1h/7Jqr1EVujY3N8D27V0vZYrI4 CzyjV12ymNEY7dJu8uAbWsFoZjtVcy8N6XiYKGTEk9BDH71cME4wabNDN0gQ1tokDryv RIBw== 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=lKOTD3NIt2HpqLXDUuuZ84aQYdV/0cTWsNBTRb/qSV5+nH2GUQF6uM/4iG71n3HkhC roJtPGWRjC0u8AcMq+xbeiOn2MwlnIQm0U9mCWy37p8Kh/fStRgNuwlLx95ZlJ3wQe4i rQq78UwXRNVzrbpbPH7SzaVjIHU+bjY/ciuc+PhhjsFsfWFcMrJgIytMoC4rChWQ9lcx QEdprKhqvjBg2k/YFB3ww8vFjlZXAawWr5guPG5NNgRnhpBgFoY4WewiFL7Uqb45llV9 03jQY245jayJW/h0ABTbTZmqU60t0p42A+1XbIfyG5gl7ioY82chqFr/LtlDVOLlAKIM g6bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xm2bSvpR; 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 x27si4229387edi.240.2021.03.19.05.45.39; Fri, 19 Mar 2021 05:46:01 -0700 (PDT) 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=xm2bSvpR; 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 S229912AbhCSMnv (ORCPT + 99 others); Fri, 19 Mar 2021 08:43:51 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:45986 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbhCSMnp (ORCPT ); Fri, 19 Mar 2021 08:43:45 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12JCfb0c107946; Fri, 19 Mar 2021 07:41:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616157697; bh=kDesQPQvYRjN7JUDLg1aWRBB+2K3tXaBtJ48Qzz8gLs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xm2bSvpRogLV8JZQeHziSlhgX16oBQ5OJULnHYWU1S/QH/Xcq9ma2qme/waq3XRgw Q6LXEmANiXwX2tnbQZpgHCT0Nl5MxSHvQvS31awDeAky6/ge93I7JTisx6YGrCndX1 xmiw1wyGXqf40P8mKLmZ7Dg35HkqJ8lyoJN5MH7c= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12JCfbVN124074 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Mar 2021 07:41:37 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) 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.2176.2; Fri, 19 Mar 2021 07:41:37 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) 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; Fri, 19 Mar 2021 07:41:37 -0500 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12JCfTf2011913; Fri, 19 Mar 2021 07:41:34 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , , Lokesh Vutla Subject: [PATCH v7 01/13] phy: cadence: Sierra: Fix PHY power_on sequence Date: Fri, 19 Mar 2021 18:11:16 +0530 Message-ID: <20210319124128.13308-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210319124128.13308-1-kishon@ti.com> References: <20210319124128.13308-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