From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98C7BC072B1 for ; Thu, 30 May 2019 04:41:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68518259D2 for ; Thu, 30 May 2019 04:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559191262; bh=aq+pFlzRX86VxARbygEbyQtzAqJ7YxsGDMBDyJmYGes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hTBCySNKcmW04fZCe/LcZaTldjDcLDkdzemqku1Fg7p9sfMmdFezQsGeaL9ulXRgJ MsDY4CfAAXb3M6RxvZ+4D2ZLj/3WnifMzm0hPdsy11FoYD5586Se8lCdaSB11f+M5U 5H20HNXMSZ+uuzravstnKgR/oZWxLjuFbzBTeeaw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbfE3DM2 (ORCPT ); Wed, 29 May 2019 23:12:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727732AbfE3DKz (ORCPT ); Wed, 29 May 2019 23:10:55 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68324244BB; Thu, 30 May 2019 03:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559185855; bh=aq+pFlzRX86VxARbygEbyQtzAqJ7YxsGDMBDyJmYGes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQXpQGrTPA7jsb5Mn/7HRqc1oytncEUOvxqJ64SOeSP1nTS92ZmKZYNO0pyhJ4YbX 2/d9bLRwu9hmVOmD3k9bJR/ZcwIsYuEYGIlIWgV/gAmHUVtFChU9ShvyPQ3wseAu/b kD2LRNhYSsMCYk96AtuVK6emBhXyX0CIP4q7VU8w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Green , Rob Herring , Stephen Boyd , Kishon Vijay Abraham I , Sasha Levin Subject: [PATCH 5.1 182/405] dt-bindings: phy-qcom-qmp: Add UFS PHY reset Date: Wed, 29 May 2019 20:03:00 -0700 Message-Id: <20190530030550.286418608@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030540.291644921@linuxfoundation.org> References: <20190530030540.291644921@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 95cee0b4e30a09a411a17e9a3bc6b72ed92063da ] Add a required reset to the SDM845 UFS phy to express the PHY reset bit inside the UFS controller register space. Before this change, this reset was not expressed in the DT, and the driver utilized two different callbacks (phy_init and phy_poweron) to implement a two-phase initialization procedure that involved deasserting this reset between init and poweron. This abused the two callbacks and diluted their purpose. That scheme does not work as regulators cannot be turned off in phy_poweroff because they were turned on in init, rather than poweron. The net result is that regulators are left on in suspend that shouldn't be. This new scheme gives the UFS reset to the PHY, so that it can fully initialize itself in a single callback. We can then turn regulators on during poweron and off during poweroff. Signed-off-by: Evan Green Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt index 5d181fc3cc182..4a78ba8b85bc0 100644 --- a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +++ b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt @@ -59,7 +59,8 @@ Required properties: one for each entry in reset-names. - reset-names: "phy" for reset of phy block, "common" for phy common block reset, - "cfg" for phy's ahb cfg block reset. + "cfg" for phy's ahb cfg block reset, + "ufsphy" for the PHY reset in the UFS controller. For "qcom,ipq8074-qmp-pcie-phy" must contain: "phy", "common". @@ -74,7 +75,8 @@ Required properties: "phy", "common". For "qcom,sdm845-qmp-usb3-uni-phy" must contain: "phy", "common". - For "qcom,sdm845-qmp-ufs-phy": no resets are listed. + For "qcom,sdm845-qmp-ufs-phy": must contain: + "ufsphy". - vdda-phy-supply: Phandle to a regulator supply to PHY core block. - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block. -- 2.20.1