From patchwork Fri Oct 21 11:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 6646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp636039wrr; Fri, 21 Oct 2022 04:13:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Nm4SWEgChhP4lslYbFSwjp8GC8qjyz9uhZFN7s7xmOhmtlZyFj14es4BDLEmt0aSjz499 X-Received: by 2002:aa7:c60a:0:b0:458:d707:117 with SMTP id h10-20020aa7c60a000000b00458d7070117mr16908860edq.258.1666350825732; Fri, 21 Oct 2022 04:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666350825; cv=none; d=google.com; s=arc-20160816; b=dGL/9ib8in7EJROqUDUFRI1nTxYlQ+cVodRWottZL56JttHxam2ojkbat8FY+B9X1m 4d43eP01Flw0Knwyvj2W4vGlLOcYIDInVQOwOerGQQdvTcBSFIFrc3/L+TPv0Go+JC5S RAcoodwyxIry/ikRO2hNYO01bxe70sJkmMjAdJlyX5uMMmwvF81fxPqNT89X/n3NRcM3 ZK8Vu3NdmqehreFTRkQDeF87muRVL1qdRQ8LCLnCOC5bMq8hftiB6SL22OYocwC5NEw3 PAlQBDDZarxIX+GF4m3iLrLmjQrrSZgAKwrSCQaVn9/mEfovsCMjGSyqXty7tUJl/m7w +RIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S2aZ10XddYViPMvP2wnRw0b7CFM1AgqB3O1GuYKD30k=; b=Isrh+wVl7s6erbB4oKNsXe/mlGTKPxGo8egjZjLdS5uZLoCIuWYvTRv0ezW4R61ZrK y3EDaasmcTk35fnJj1doe17J1gUmsy1PdHG4r8Q08zToP89h7Z5NT8n4zJDUYM177oaV ep6FJIhIAbu+P9yFgIZqilsT0/r8A1iMoaMeZix/SNc3VxK3VIjh3m8CXVzjrW89r5R6 n0/eMAaYVuE3KVr71f8qU/zIFG8DIpzk7HqOHI6b/cu7WSQPtUKoZiNdQfju9iIgTbcO H7yyyWnobRDE8wQRi22Act3ZdjkHUDFeA3eFIE0jDojDVslzuR/JBfs5DjJllJ5jTZ2s sYFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EgoH7za8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc32-20020a17090716a000b0078df3bd80b9si19515722ejc.46.2022.10.21.04.13.20; Fri, 21 Oct 2022 04:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EgoH7za8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbiJULLb (ORCPT + 99 others); Fri, 21 Oct 2022 07:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiJULKt (ORCPT ); Fri, 21 Oct 2022 07:10:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF6718A51D; Fri, 21 Oct 2022 04:10:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E5D4D61E6A; Fri, 21 Oct 2022 11:10:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C68CC4FF13; Fri, 21 Oct 2022 11:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666350644; bh=4mnICkBWbb6C7gqpfuGXYvIo4Kc1xOnaotX3R6uU03c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EgoH7za8sz786V4nqJTLo+I4tOwD3zorzNjWLwHe89zBYLp8K3dCjEVdZdR7k2wF0 MnfguBzgJUMYeNBtwM+UMeHcNsVZ1+j70saKgTvFmzdQV6rBMfrQA4XZynmyY5B89q FeyH213LuZ/MEOBIkbr5eyiV9R7ZA+WdO89u3++5NQjjdqgVTvtGa7U+JIYz3Fsgz1 UiDK+xDPIlXQb6wKF0Dc3BG5ArZV1nsWKi/ql+KMwEfQqO8EowLV1teyMs9jwhpIuL /kQ+X74CevvDI6AW05mFoHBpM7048u0lLac4LlwonWa3+0QyLPznxwobtpvGsm8fQJ MZDGQLBcwezvw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1olpv5-0007Kz-CB; Fri, 21 Oct 2022 13:10:31 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 12/15] phy: qcom-qmp-pcie: fix initialisation reset Date: Fri, 21 Oct 2022 13:09:44 +0200 Message-Id: <20221021110947.28103-13-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221021110947.28103-1-johan+linaro@kernel.org> References: <20221021110947.28103-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747295483534086058?= X-GMAIL-MSGID: =?utf-8?q?1747295483534086058?= Add the missing delay after asserting reset. This is specifically needed for the reset to have any effect on SC8280XP. The vendor driver uses a 1 ms delay, but that seems a bit excessive. Instead use a 200 us delay which appears to be more than enough and also matches the UFS reset delay added by commit 870b1279c7a0 ("scsi: ufs-qcom: Add reset control support for host controller"). Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 2f4bdef73395..9c8e009033f1 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1866,6 +1866,8 @@ static int qmp_pcie_init(struct phy *phy) goto err_disable_regulators; } + usleep_range(200, 300); + ret = reset_control_bulk_deassert(cfg->num_resets, qmp->resets); if (ret) { dev_err(qmp->dev, "reset deassert failed\n");