From patchwork Wed Feb 13 23:25:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10811311 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 3AFA01575 for ; Wed, 13 Feb 2019 23:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C612D698 for ; Wed, 13 Feb 2019 23:27:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C80F2DD88; Wed, 13 Feb 2019 23:27:03 +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 AB19C2DD72 for ; Wed, 13 Feb 2019 23:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390590AbfBMX00 (ORCPT ); Wed, 13 Feb 2019 18:26:26 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45262 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390067AbfBMX00 (ORCPT ); Wed, 13 Feb 2019 18:26:26 -0500 Received: by mail-pf1-f195.google.com with SMTP id j3so1936577pfi.12 for ; Wed, 13 Feb 2019 15:26:25 -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=3GYIBtzh9YUlSNloRNN96QL04Mij/ii9fAITHcdb0eI=; b=mCFnT7ynNfsC0XD9+/w/rH71ZIEM4K5r54CbaN6ztzgaIRNbct0sTvbr1AJP5YsnJN dAG3q0qTPnWwXWkR3lFA3l9RZy4mPaPUZCH3JXwNLHGbRI7sAk+0hgLFrniJpUgFtaKN /JGdEmPHK912xa/8hDaPYMrbEVPrKdX0DN6iY= 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=3GYIBtzh9YUlSNloRNN96QL04Mij/ii9fAITHcdb0eI=; b=mlQRMl14VnLNZ68rr1Y0mTtU6cHmTfPtr83LVsx4uDi+WiGtiJwHvAl8hQRXz8xtlI QHIp46l/TEQIrikTg3h4+xBTrLEYIYTJMqFDnEzbUwtGzFMsXy48ZrFc7qhAYNECobLd XV64QsrFRkiQGHpNaTMj6jvMnyUYn8/TXY0XQTjwgAG2zeXLCk0soL/qWwAAne4rpNbr ywi3hu6oQWDa3EQoK9bOGR3+3nfS+Qb8UO0RPk8b49Sfem2R00PSVIn8vl0vxkWmTyWH MBdxB90yj/WZhHBlvSNda9zvsJSW6E3AJW1IYiwZafDKirrQBAVes5k9BdTYna7DyRfx 61Ig== X-Gm-Message-State: AHQUAuay8XrJW4FjYO/JUSgMhCrTNqV/lUJ5NvAYTDKoVuPPxFX7slRE EE5QrOBo5CsOBypCrRAD/5tlOg== X-Google-Smtp-Source: AHgI3Iav4MsQlnkHWZkAD6VtSrwqFmw2DpwEdiv5VjSSKg2hm9qKjBKb3v7mlSGX8S5YxFYAmPq8Sg== X-Received: by 2002:a62:55c4:: with SMTP id j187mr710186pfb.129.1550100385290; Wed, 13 Feb 2019 15:26:25 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 15:26:24 -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 , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , David Brown , Mark Rutland Subject: [PATCH v4 4/8] arm64: dts: sdm845: Add UFS PHY reset Date: Wed, 13 Feb 2019 15:25:22 -0800 Message-Id: <20190213232526.26995-5-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 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 v4: None Changes in v3: None 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 b29332b265d9..029ab66405cf 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 Feb 13 23:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10811309 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 2668C14E1 for ; Wed, 13 Feb 2019 23:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160412D698 for ; Wed, 13 Feb 2019 23:27:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0933B2DD81; Wed, 13 Feb 2019 23:27:03 +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 B8CCD2DCF4 for ; Wed, 13 Feb 2019 23:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390589AbfBMX02 (ORCPT ); Wed, 13 Feb 2019 18:26:28 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44287 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390681AbfBMX02 (ORCPT ); Wed, 13 Feb 2019 18:26:28 -0500 Received: by mail-pl1-f194.google.com with SMTP id p4so1973002plq.11 for ; Wed, 13 Feb 2019 15:26:27 -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=z1ZzbSMaLkcrujFXMVmUGhZGSWFapd4E02x4M5Q5CXM=; b=LiZLNlqJcuFSlZ2KM8smAvyO33KbhXwgO53Y9ocn/IQrEHfKsl7H9jVO59Go8ACKKn RpH8rSh5pH8WE51+kT0jMjdtLI5kDRJZbrV/IHtguKCKxJF5bKxzC2WgOQqZvN3B2krZ s7UgOYhDmzLkbunRDxqNkUwLLMI9yMVPVNcmA= 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=z1ZzbSMaLkcrujFXMVmUGhZGSWFapd4E02x4M5Q5CXM=; b=RbeiJvEQegFk7+gqasXH5zv8n+v9d3wX8RYmO8CM/CNgVatucnxke4av5XlxRHHJFn 1HnaJXdsBt6e4qn8JUsbfC/GMrA8MjvStyDPrUDJYzD5Ljvuf4exSqwfoxkx/lmmEgU0 1BVLDO/RFzxrjBmokbA05lEMKYdbvtc/EvzSQS3gkUuMTn+89EMXSKklp6hvKvD43Fd2 dU0SjUZdgwKBGzRdJ6I+yI6KCWAQ2pe+vj058dynY3mCHtSv9c2Sy7KXSduUxNI9CSEh g4G8+ZSvTlZS4LIlu+YA4yL2Hq+kNQj+X5LS/dB/6KxXigbriyo6jPMl2H53GDQA9/HP 8AHw== X-Gm-Message-State: AHQUAua3xSsSDvYca3ofKUFck7QyUR6Lpcw5iW4SKzAjQL092C/QK+xk 14crinErDe54R3JCjb6k97JyMA== X-Google-Smtp-Source: AHgI3IbPGCJAsPZdqVVOt69EZjNuubGM3/7szxlvMu9oyudavwb1c/rPG4J9DaLt8bcNX6apXbIqoA== X-Received: by 2002:a17:902:8d8d:: with SMTP id v13mr740991plo.121.1550100387494; Wed, 13 Feb 2019 15:26:27 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 15:26:26 -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 , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , David Brown , Mark Rutland Subject: [PATCH v4 5/8] arm64: dts: msm8996: Add UFS PHY reset controller Date: Wed, 13 Feb 2019 15:25:23 -0800 Message-Id: <20190213232526.26995-6-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 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 v4: None Changes in v3: None 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 99b7495455a6..179f1988d45c 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 {