Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5397350ima; Tue, 5 Feb 2019 11:03:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IY+I2s6XM5De/DmZczCd5wkvDFJ67VJg0KonAA+DcgNSXYwHabuuuKUQvr9bRSsypIBgOvy X-Received: by 2002:a63:c503:: with SMTP id f3mr5745342pgd.431.1549393433708; Tue, 05 Feb 2019 11:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549393433; cv=none; d=google.com; s=arc-20160816; b=LVbDXt6MolzvMCdUyDFuUghU7qpcSetIkEYWXYZvoo4HjZwONiU1YeHnh53fhRsgM0 0Womz3LBO80NmpM8NDAh1LkQnmuI6+Fzz0NdcpstV9HHVX05rSw1FMu6BSa3V46nDlAB meIeUnR0otSvs/KW7EXsa+uv6aNsL3nlcHXNcK4ejiz2TfM3qtf0ydxtPUcPSCfXteP8 qtw111iI0yakGS+bs3eZXvTlUALdWs2SLscXGPLsFjM/rc3GH6bC1SKahF6jVmCt602H TR9U18mwXUDquYpyVagFhX8npwDJm1taFWpkDRBx8Z/+KeHLsjZTviN5ooyn7BjYGUWl U06g== 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=mvo9vkE2z4ukp0XCRY8v+Ly8mGLi9zihvjjjcTgDx70=; b=JC9yzIqol2lDty9ItBH+HgebWKekpPn8SNK0mMVMULkbUYo7R4AoVHHQLcyaYVkBYR aDisbYvq4Qb5IQrrcPpIZaWDEFgH/KltuQIThBku8SgYCHQNM7E75FEVrtBbWK0F/tir N+gH9WffA7qUe7eW8cSSrXFu8alyuRGLqndRw1SIIoU4SRos4uvQ9fKbYOjSAEtzrP4/ e9mscBGZ64ICiuOzi4ufDF+mXkuPVKLBU1JnQzSTyHEYFTNfoJyEb8eEwD5Xs3T+B9js FHVC879/sI7I8BxXpB4HYnn8Euhl8JVFWrJ4X5JUlTVIeJvpLiMneuqGRTHrcjRvRquS lH+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Aas1a+AI; 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 f4si3676278pfc.234.2019.02.05.11.03.37; Tue, 05 Feb 2019 11:03:53 -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=Aas1a+AI; 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 S1730584AbfBES7c (ORCPT + 99 others); Tue, 5 Feb 2019 13:59:32 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:47034 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729356AbfBES7b (ORCPT ); Tue, 5 Feb 2019 13:59:31 -0500 Received: by mail-pl1-f194.google.com with SMTP id o6so1880026pls.13 for ; Tue, 05 Feb 2019 10:59:31 -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=mvo9vkE2z4ukp0XCRY8v+Ly8mGLi9zihvjjjcTgDx70=; b=Aas1a+AIRTx2Uo7LT4d5xTmzN2/j1ee5NoEOj+vB5IhpdSbOgRj9nF8fNSyEExQ0zd Nltl3NYwE5mjKnr1ujKE//bJezVYYPjiLWEjBi8f2X+Rq1w9k2sVGKMGfkj/Te3FBbMC gScjNNo8dCicWYwXAV/htmNH/ovLbtmFd7sf0= 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=mvo9vkE2z4ukp0XCRY8v+Ly8mGLi9zihvjjjcTgDx70=; b=PMFuKDm2pF+AKHeRb0LkU5wa8SOgbIVFA3ghIIyKUglGTjt0WooP9DkITH7I/yC3v2 jlknBdo4um9FOKrieMu23P+Y1kOApUejrMAmLQctsnaUIPHi4v09vQ/6t7qC0aUHt7ot sx3j2jhnIO+25pt9RnCbuvQdIne4Ej4qTYvPBXqBz0/DPJDM69tyyYgvpUWlqXDRtCVx /eMC4YaKHSLwUaW1jk3Z7bR61rr2NVs2gNtX3D90lM5OiwwvegPX2p/FqMW4jZNi84KA Jc3MxuMQ5ZsycEZ1i0KE+33ffZrGnnUXxPKjt2FhYzc+GOg1sVzoBdOJH9jhK0Ar4wjk Viog== X-Gm-Message-State: AHQUAuaNHIJ/IWr/3hROil12jWlxQlta4xIFNG04X01fyuor8U7cHMtT vIWlBGfs+kg2+SIDYSZ8v6KbxA== X-Received: by 2002:a17:902:9a9:: with SMTP id 38mr6498039pln.204.1549393171250; Tue, 05 Feb 2019 10:59:31 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id m3sm6424435pfi.102.2019.02.05.10.59.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Feb 2019 10:59:30 -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 v3 2/8] dt-bindings: phy-qcom-qmp: Add UFS PHY reset Date: Tue, 5 Feb 2019 10:58:56 -0800 Message-Id: <20190205185902.106085-3-evgreen@chromium.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205185902.106085-1-evgreen@chromium.org> References: <20190205185902.106085-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 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 4ff26dbf4310..49b8a5eed3cd 100644 --- a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +++ b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt @@ -56,7 +56,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". @@ -70,7 +71,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