From patchwork Wed Jan 23 22:11:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10777961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FABB91E for ; Wed, 23 Jan 2019 22:12:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00C4B2D7FE for ; Wed, 23 Jan 2019 22:12:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8F392D82E; Wed, 23 Jan 2019 22:12:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B6F32D7FE for ; Wed, 23 Jan 2019 22:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfAWWMO (ORCPT ); Wed, 23 Jan 2019 17:12:14 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33164 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbfAWWMN (ORCPT ); Wed, 23 Jan 2019 17:12:13 -0500 Received: by mail-pl1-f193.google.com with SMTP id z23so1866310plo.0 for ; Wed, 23 Jan 2019 14:12:13 -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; bh=pVl7bCsOHzkGeahZhY8Ncz7NfrTGxcO0q/yglLjGzmw=; b=IQrE4LPvV57mlfzrCUdebjEHm4BLIp6vl3r8n/Jja7hGmEzhP6TYSfSaO2RNkODs66 +Bs6r9aRJwNeeKI4NjIXuVPpz3Y8Z/tZ2R2SWQJWjCnuFEYNSmYUTMsvKlo+Zq/OoQ6k D7YyOzTvMIXCJzJJehPiQdYHVJ/8FtXnSVknM= 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; bh=pVl7bCsOHzkGeahZhY8Ncz7NfrTGxcO0q/yglLjGzmw=; b=iNHkS0aHAoGxLwr8bAp6Q585pgTM+h8PcC8xmhNq6n6eYza3A+bOdz3MzubHrumTRQ MaBANqFpeSbOLffCML4USk9Z0cMFEOCuChtJoBcHmuZVpvnAPhONcrzHI83cw/KDYvQX MuxXKfveVhnHQjsV5eLkqyzJL3nYKfS/VitpuqfktTmjzcRkNB+GInHxaN06AgBsN/n9 G1wCjeP9789Sq5t8NYvz44gG3jKe2tToaEHIG814nVt+2jfaAkv1Er7gmqGxgbDrQWs7 o+oFCezfnR2cuBSPD3GFqj9r6KnpEdG06S5+gS86Za14W1LkTdO18lSgi8HEYPZLOgdx xmjg== X-Gm-Message-State: AJcUukfqdaLGUGy4/l1jSWrT5xHd89MCUJUZyvjZ5J0ccXha0X2qgqiA qfBdgkk3O4+zgHv2CHZnm7T1kQ== X-Google-Smtp-Source: ALg8bN5b0HWWlE6LmfnU3YA89tZwb7Ig3jAhpvPv+fGuRgg9nB0q4tx5F41wp02HLcXL63DKTbB8OA== X-Received: by 2002:a17:902:e18d:: with SMTP id cd13mr4067085plb.262.1548281532616; Wed, 23 Jan 2019 14:12:12 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id d18sm27927943pfj.47.2019.01.23.14.12.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jan 2019 14:12:11 -0800 (PST) From: Evan Green To: Andy Gross , Rob Herring , Kishon Vijay Abraham I Cc: Can Guo , Douglas Anderson , Asutosh Das , Stephen Boyd , Vivek Gautam , Evan Green , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, David Brown , Mark Rutland Subject: [PATCH v2 4/9] arm64: dts: sdm845: Add UFS PHY reset Date: Wed, 23 Jan 2019 14:11:32 -0800 Message-Id: <20190123221137.41722-5-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190123221137.41722-1-evgreen@chromium.org> References: <20190123221137.41722-1-evgreen@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Wire up the reset controller in the Qcom UFS controller for the PHY. This will be used to toggle PHY reset during initialization of the PHY. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd --- This commit is based atop the series at [1]. Patches 1 and 2 of that series have landed, but 3, 4, and 5 are still outstanding. [1] https://lore.kernel.org/lkml/20181210192826.241350-1-evgreen@chromium.org/ Changes in v2: None arch/arm64/boot/dts/qcom/sdm845.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index b29332b265d9e..029ab66405cf4 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -990,6 +990,7 @@ phy-names = "ufsphy"; lanes-per-direction = <2>; power-domains = <&gcc UFS_PHY_GDSC>; + #reset-cells = <1>; clock-names = "core_clk", @@ -1033,6 +1034,8 @@ clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + resets = <&ufs_mem_hc 0>; + reset-names = "ufsphy"; status = "disabled"; ufs_mem_phy_lanes: lanes@1d87400 { From patchwork Wed Jan 23 22:11:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10777957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 683AF91E for ; Wed, 23 Jan 2019 22:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 589A62D7CE for ; Wed, 23 Jan 2019 22:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 497142D812; Wed, 23 Jan 2019 22:12:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF1A92D7CE for ; Wed, 23 Jan 2019 22:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfAWWMQ (ORCPT ); Wed, 23 Jan 2019 17:12:16 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34195 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbfAWWMQ (ORCPT ); Wed, 23 Jan 2019 17:12:16 -0500 Received: by mail-pl1-f196.google.com with SMTP id w4so1869062plz.1 for ; Wed, 23 Jan 2019 14:12:16 -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; bh=mqCwH6BIZivVe3OBbc+81a+uEmmjQXROxVrtJyv9BP8=; b=oS7IHi/ahKWj1O2zk8olDYsFbSOV2lPf3wgYi4rcR6aQZnnN8kYYMxApHPPl9TdQeE fP0W1TToPxIfMtIftN+TaGT+NCY121Y3oTS6dyJzwJZ4j+/rBeUg642ZnV4xR56BBK1R AmX4/odaTnbL8dbgn+87y/aBsE4VvA+ztr768= 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; bh=mqCwH6BIZivVe3OBbc+81a+uEmmjQXROxVrtJyv9BP8=; b=IL+DmFmgG1u6/df/eX3SFle0pLmow67xwMlrzpTp1JSFcBuhzElwEYTft+Qb8qba1c bgdkV6ETYNPEK1/UJ9hE/XIpNBbbflEWxJDkJ2fyxLMZwayVTL6BRzrbaK3JY8J6g8af OypeGW+mqA7/ZUpuP4IZL9uDbOXqru8EHka3EIBKf9GGvzIEQiXLOfpm+cIGEQ5SkDCd FvKnxbMdpTx9LN6i3Oi/nayMUHOecy5f2jbjAHRHZOnXtxzqtEP0Ec4TZqRx158vxlHo Bol7V841pVC2Z384iKdPhBI6LP68B4Nx8vxM0zIVcOcwkx6vKK6Z2zjpo6203KtPXmf8 2VMg== X-Gm-Message-State: AJcUukdiISIIr1dRAiPcZyI+UruSoGkT8+O5LlT24QvPOBn3UvK6izHn 4rEbceTr0nFR5X22hoi1ILZwmQ== X-Google-Smtp-Source: ALg8bN6Gx0VtoKhooyDor85zWU3uENefVxO5rJlF+cwRYkAKJnegkl9+At6p5EyuEa4utFV45Y7L5g== X-Received: by 2002:a17:902:720c:: with SMTP id ba12mr4062677plb.79.1548281535641; Wed, 23 Jan 2019 14:12:15 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id d18sm27927943pfj.47.2019.01.23.14.12.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jan 2019 14:12:14 -0800 (PST) From: Evan Green To: Andy Gross , Rob Herring , Kishon Vijay Abraham I Cc: Can Guo , Douglas Anderson , Asutosh Das , Stephen Boyd , Vivek Gautam , Evan Green , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, David Brown , Mark Rutland Subject: [PATCH v2 5/9] arm64: dts: msm8996: Add UFS PHY reset controller Date: Wed, 23 Jan 2019 14:11:33 -0800 Message-Id: <20190123221137.41722-6-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190123221137.41722-1-evgreen@chromium.org> References: <20190123221137.41722-1-evgreen@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the reset controller for the UFS controller, and wire it up so that the UFS PHY can initialize itself without relying on implicit sequencing between the two drivers. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd --- Changes in v2: None arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 99b7495455a62..179f1988d45c5 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -663,10 +663,11 @@ clock-names = "ref_clk_src", "ref_clk"; clocks = <&rpmcc RPM_SMD_LN_BB_CLK>, <&gcc GCC_UFS_CLKREF_CLK>; + resets = <&ufshc 0>; status = "disabled"; }; - ufshc@624000 { + ufshc: ufshc@624000 { compatible = "qcom,ufshc"; reg = <0x624000 0x2500>; interrupts = ; @@ -722,6 +723,7 @@ <0 0>; lanes-per-direction = <1>; + #reset-cells = <1>; status = "disabled"; ufs_variant {