From patchwork Fri Jan 11 23:01:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10760789 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 86B766C5 for ; Fri, 11 Jan 2019 23:02:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76AD92A0B5 for ; Fri, 11 Jan 2019 23:02:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AB682A120; Fri, 11 Jan 2019 23:02:36 +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 1703D2A0B5 for ; Fri, 11 Jan 2019 23:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbfAKXCC (ORCPT ); Fri, 11 Jan 2019 18:02:02 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:37723 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfAKXCB (ORCPT ); Fri, 11 Jan 2019 18:02:01 -0500 Received: by mail-pg1-f193.google.com with SMTP id c25so6916629pgb.4 for ; Fri, 11 Jan 2019 15:02:01 -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=FFa9dZDnTlLUNw3LxfKJLjg60R1d6M30gGhExTiakGk=; b=RwKY65J/VJ93YHg/tGNlaLOUUGvs3zeg2oNpSJOx8yi9NAxvfK5Q5BtrSEWM+3RoDT 2+0ns8S6rOJnAvZbmKj8H9DeuCv9qoLTTOYpDHWUHwgBTSoKIpq1xTnlhH0/wpONmQZe mke3Ft52VAce87ouK2LL9ZIOOSlQS7uLbM93g= 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=FFa9dZDnTlLUNw3LxfKJLjg60R1d6M30gGhExTiakGk=; b=j2AHQ+7ro3bJfsyN8af93b3XeSOXmoCiozoMy6Uod4iPPI633pwmaGQNDsT9YEk9Bp 3Ejti4OxMtTYg81gUilliVvJX8LWYQSe1a14pNANPs4HkpW25dEubr87jQPWP2Byoct1 Exl/1g23ikKVlg/iI4RCWXYRQXJjQxPdbOkpavTMVf5Vqghb2xJaOE+C9jmgUywmRqSr ZWTiC84qiS8rMXqroPj/eJ2816t2IZHUf+IOTbl71iOb4n+sNEQjTfDdU9ZW4BVMNpg2 KXohjMs3ZOtlp7b53uO5XoB0lwOW4XjNe7Lau/AtbV2/JULUo3UtyjiuRuXmiN9SZYPC utiQ== X-Gm-Message-State: AJcUukf0S60zmFNPo7mibiA69yDf2rygALcO87V8shKAuBtcjKBB20B/ u9IR7VNWFHa236VxjLJ7p3Mmjg== X-Google-Smtp-Source: ALg8bN7xCso6B959PPpGN8vAw5jbMldMZ7tJnqf0ulNZSNPAQFoD8mv6PHiszu2yOOFQbRGwIh5x7w== X-Received: by 2002:a63:a553:: with SMTP id r19mr14971240pgu.53.1547247721044; Fri, 11 Jan 2019 15:02:01 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id 15sm116045186pfr.55.2019.01.11.15.01.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jan 2019 15:02:00 -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 v1 3/8] arm64: dts: sdm845: Add UFS PHY reset Date: Fri, 11 Jan 2019 15:01:24 -0800 Message-Id: <20190111230129.127037-4-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190111230129.127037-1-evgreen@chromium.org> References: <20190111230129.127037-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/ 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 Fri Jan 11 23:01:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10760785 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 9F0DF746 for ; Fri, 11 Jan 2019 23:02:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DE022A0F7 for ; Fri, 11 Jan 2019 23:02:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81E7D2A128; Fri, 11 Jan 2019 23:02:12 +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 37F1B2A0F7 for ; Fri, 11 Jan 2019 23:02:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbfAKXCH (ORCPT ); Fri, 11 Jan 2019 18:02:07 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33195 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfAKXCG (ORCPT ); Fri, 11 Jan 2019 18:02:06 -0500 Received: by mail-pg1-f193.google.com with SMTP id z11so6928836pgu.0 for ; Fri, 11 Jan 2019 15:02:06 -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=Ulw7GmeZQfl8VV/7kr1fBqzdA+8zFDUimIIDwT+KzKY=; b=h6k4pgWEdJ5oK3yMBqb5gdNSOR6ouHGcQEeQfQU1zh2PvmPrHOR9JOblfanrrzx4bn WpBE97hFNbGlt2gICd15nKVydaWKyd0fftS2hNP5SJ3Yo3+5GfbI1U0HDetqyxxEY8u0 OMaZAPtwyS3O3/siKM0h1tmwPj1Twi2AWOEbE= 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=Ulw7GmeZQfl8VV/7kr1fBqzdA+8zFDUimIIDwT+KzKY=; b=IXURbdv4SAL2vkO+KRnLV3fbn22Pk+A+p+BPazeIUHxl3JNdq8AubNkBWOBNsNLgvm 0lCRDVYPfobIALreawKE4awqaA1HDWXy0sBigoAfsOwYezMT1ARpUFo8ocI4cTBM6INg onLEJcx0i8iTwuMQDot8wq9FXGoTTSiGAC2CgVaxLwjpOJ0SdOwxqROx9pl+uJ78m+aY JMgeXDoh0dAkXd2w1nT87yBWo96b66K147zIjijp42aHNcgavUsv/522nIqbL15GmUMn NUyVMupB4wmMynrLaC2atcl8bQXk4emiO7hochiLJMkSkn9DbbuTtuQRWWZYbPVIt1w9 t5sw== X-Gm-Message-State: AJcUukdsKBt3G4oOsexQAeJEfMX4tQI24f+J6bVVo2WPelDODg0AX7V3 fsGoCCC6wMCg5s4fy4Uu9g1G8w== X-Google-Smtp-Source: ALg8bN5qAQ3iBHoJ0wFHaD2bHkeLfhuykgOD9ZUlCxPaubz/cKkbAhf9RecUAUn0NGgXIC11YT6o+Q== X-Received: by 2002:a63:24c2:: with SMTP id k185mr14552455pgk.406.1547247725865; Fri, 11 Jan 2019 15:02:05 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id 15sm116045186pfr.55.2019.01.11.15.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jan 2019 15:02:05 -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 v1 4/8] arm64: dts: msm8996: Add UFS PHY reset controller Date: Fri, 11 Jan 2019 15:01:25 -0800 Message-Id: <20190111230129.127037-5-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190111230129.127037-1-evgreen@chromium.org> References: <20190111230129.127037-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 --- 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 {