Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1135281imj; Thu, 14 Feb 2019 01:43:04 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibro9fboqUbC12sG59eupyIovv1xvuRZ/Coo8U82Zcqm4YM7ypSEPhYpdOOZiep72Xtky2k X-Received: by 2002:a17:902:ab84:: with SMTP id f4mr3089729plr.207.1550137384288; Thu, 14 Feb 2019 01:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550137384; cv=none; d=google.com; s=arc-20160816; b=iRNEvWlH59RKcxYHjpNE93aphvq72atgt3lP1iQ++keSAKm7Cz2jRB7H3rP9iN1g44 vUv8Q2S/Hgr9STbiO8smdv0jp0HfgKfIxrbq4vsMhZtDtyqi69j8mdbWNN22rnaf/twl fbPYQ2CyIyegQLZiUJkWMcs0Roys8jlJen8Arc6cEX6XZNljE8PhnbrofihD2RVvR2nC pieZ71zjztTSNa+8NtFAKuBH5X4ufTSZ/RB+UH+MMarR4XpX1QFoATZvz54ObSJUr8cE 40bDI93cIxtHnxdl65GtKOYVyqJene7SW9H0OsmD4AWDnCpR57CQ3lFu/vrr/Az4fPLQ 37YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tTrz5iCREgQGXYUDyQ4vY7F8M1o2Gjn3QDNWgZd/TLo=; b=cOllqOtefKS1lkkEkSQukqznStlSJSke8rlYovVLO2nxmTpXKj+Ay746ljd+Y+RJss 0bBQ0dNfXeYzCO1fR3oAFOlPpXt23bXESAXrSo0Yc/LY+cd8UAn9vAQrtRimlVpfqUPK WbZqlimJUl8xo9l/N+GhBe5BC+qHAZsZDAma3+sdHAkFyMN5aaCGgulkp7L28nJkT7Xe 31VxdnbLbxQ8S0FEpzm8GnADCuFcmtcIyZW5fFX3PJOAGNBVJsXjeh8cThTh/B5g2R0C MzAr5l1NSHviXA1nUTYWRGzhViuEPMhcaSNKjVR+JPhJzLhi0PCj7ZUwiKr4OC9J58on cCkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=axupwHCW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si2318080pfj.222.2019.02.14.01.42.48; Thu, 14 Feb 2019 01:43:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=axupwHCW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390477AbfBMX0X (ORCPT + 99 others); Wed, 13 Feb 2019 18:26:23 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46108 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390067AbfBMX0V (ORCPT ); Wed, 13 Feb 2019 18:26:21 -0500 Received: by mail-pl1-f195.google.com with SMTP id o6so1968090pls.13 for ; Wed, 13 Feb 2019 15:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tTrz5iCREgQGXYUDyQ4vY7F8M1o2Gjn3QDNWgZd/TLo=; b=axupwHCWl0wuJEKGzGgbKByB637wsRkny0N9pdp60VtrWi34+nGnjhpAQSlk3sCdBx aeZzDIkbpfCrnqre4f9l3nhqIBts3uiC/8hMuwFIRdstH7TR4xzfFj8X2H2sECdB6LoO OjjAhCOQfTyMV4i9z+MxqC9hM2URbttTmmZp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tTrz5iCREgQGXYUDyQ4vY7F8M1o2Gjn3QDNWgZd/TLo=; b=uVFe4EE74BJgbhuAwM2wngXgQ+bxnMb5H5iVqIpdpOksqIq7Qt3lx3TeiMMIKVPA/j 9U0bAPvQtBAOObiEq0Rp1vWf22iqu1PB8KUYPmeB3yjAaapkozwJednJEczqhQhZLAmY mNQBw1IUpvLZtF1DQ5XvzbdOMknJlAIqOP5oefntlm4nitgxHKd8wsGsWoqOVOhL0Xad lQihUMq+dMAl/2ABD9EKnSwsnNOl2a56eRTu7orQWlhifbyLi+ZOW4PUFZ1SAycSKvM2 vzyB7Ep1sLoZLgISFf7QMFebzT8x3ccjjteGEVe93uAj0LOe/y0bvewAa0Jyvt+JiIl8 b0aQ== X-Gm-Message-State: AHQUAubYOMcMcY78Mr6lx8IuDSjz/hv7C5WzZ3jPK8GCiscZMi2Mxrj2 jgGr5fE+7nX+O8PiEc3LdHVFWw== X-Received: by 2002:a17:902:ba90:: with SMTP id k16mr784980pls.214.1550100380615; Wed, 13 Feb 2019 15:26:20 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id d129sm560660pfc.31.2019.02.13.15.26.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 15:26:19 -0800 (PST) From: Evan Green To: Andy Gross , Kishon Vijay Abraham I Cc: Stephen Boyd , Marc Gonzalez , Can Guo , Vivek Gautam , Douglas Anderson , Asutosh Das , Evan Green , Rob Herring , devicetree@vger.kernel.org, Mark Rutland , Rob Herring , linux-kernel@vger.kernel.org Subject: [PATCH v4 2/8] dt-bindings: phy-qcom-qmp: Add UFS PHY reset Date: Wed, 13 Feb 2019 15:25:20 -0800 Message-Id: <20190213232526.26995-3-evgreen@chromium.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213232526.26995-1-evgreen@chromium.org> References: <20190213232526.26995-1-evgreen@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- I realize I'm not supposed to add a required property after the fact, but given that the UFS DT nodes that would use this binding are not yet upstream (and this would be the first), I was hoping to squeak by. Changes in v4: None Changes in v3: None Changes in v2: None 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 5d181fc3cc18..4a78ba8b85bc 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