From patchwork Tue Feb 5 18:58:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10798099 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 C7E9213BF for ; Tue, 5 Feb 2019 18:59:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B62B72C88F for ; Tue, 5 Feb 2019 18:59:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9C792C8A2; Tue, 5 Feb 2019 18:59:40 +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 5812A2C88F for ; Tue, 5 Feb 2019 18:59:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729356AbfBES7h (ORCPT ); Tue, 5 Feb 2019 13:59:37 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45163 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730606AbfBES7g (ORCPT ); Tue, 5 Feb 2019 13:59:36 -0500 Received: by mail-pg1-f194.google.com with SMTP id y4so1760094pgc.12 for ; Tue, 05 Feb 2019 10:59:36 -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=pvPGDk0MYEUJat4AWVry/938UIVI5hfg1gRfbgdxD78=; b=LxjqOT2QAYJwd2Ht0s9cRUf9eMshGYaOmr8+TwSjnFDjc8kRVnelqyl4DJqNpXA53A qM2B1qggwiKD2VugxIgHAq5PN0RkhDNkUPQCaqoEDM9oNQlssSwBQRlQOVpJEza8/3f5 Qnju5DuCz8buu5fgyoUmg6+ard1jv3MEUYYTg= 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=pvPGDk0MYEUJat4AWVry/938UIVI5hfg1gRfbgdxD78=; b=MmL5ghI4naEMRQB3K/2J4Xz0iKzemjVFyUcZHvAAR6DGszZnLtx1au+S3kRbI6NSw3 /FH4jmePHUfU4H0gNjI41oqSDAn5rGPakM/BNhwXujpicfH4mNL/wO5f2w+4dh95HLNg GIhvPw0PSpxSgjIA3p98cMnPyjCOevkwdcuTWh/fdh1Xx+gGnC8jlRy9fDcE+jkbpyiw bFxI6+0b2yPDqhd6uGMpiASTuq5fUg8SeO0q2Psp8GOc1prhaLVq+JySZAf1m2qfBiuc aFV1mx0TNXx8lTm4o3LDS5NzZxpByKNE/lXF/PUJdO9QYRzGPQbnusnZ2djmrdYk9V5A q6og== X-Gm-Message-State: AHQUAubQjCIqp+BCXuo2W5FPbm8RP0CVsnkm6ouzNf66KOjRbjl2/jOu 1RWHuZueSB52GhJ6LgvTzh8e5A== X-Google-Smtp-Source: AHgI3IYpkYxN/5RBsZxy2k7Wgov4+uLA1hpFyktUcaDVQSvpDu+avApH15Q5oTlxhyrDc0efcdB1WA== X-Received: by 2002:aa7:8802:: with SMTP id c2mr6453769pfo.20.1549393176039; Tue, 05 Feb 2019 10:59:36 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Feb 2019 10:59:35 -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 v3 4/8] arm64: dts: sdm845: Add UFS PHY reset Date: Tue, 5 Feb 2019 10:58:58 -0800 Message-Id: <20190205185902.106085-5-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 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 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 Tue Feb 5 18:58:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10798109 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 C744C13BF for ; Tue, 5 Feb 2019 19:00:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B81802C88F for ; Tue, 5 Feb 2019 19:00:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC7232C8D1; Tue, 5 Feb 2019 19:00:16 +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 9F4D92C88F for ; Tue, 5 Feb 2019 19:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728905AbfBES7k (ORCPT ); Tue, 5 Feb 2019 13:59:40 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:35798 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729757AbfBES7j (ORCPT ); Tue, 5 Feb 2019 13:59:39 -0500 Received: by mail-pl1-f193.google.com with SMTP id p8so1903472plo.2 for ; Tue, 05 Feb 2019 10:59:38 -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=Ub6DMVr4auSHNs1xLpJC+apup1Uo439lpEy/vO5ywDY=; b=DfnWzRMonVA0OeASO4zDOEk8t8plHWBjUQ+vMco631djwRv0aC0pADpBoAabvaQOt/ o3j38P+w8Sa4V6tbn0UmGlgKxkGco5rQH/ircQWzsEqFYdSfcd4reRD9h/8E4BMQgCBQ 5bovwsHNmTTvYkVuHJqKnVVDUOt2a8yk+mDNQ= 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=Ub6DMVr4auSHNs1xLpJC+apup1Uo439lpEy/vO5ywDY=; b=QXZ5zccG7hnlhl+pH+L527FcIAlBzXfz7wQGNyWWMcZPQ/BFa1MesBAkrXquWpZJDp KTv8ylHsjpck1aZ+3TIxL0mmzMQP7w0G/iHeMrcEnHbFA9XK9ds9qAv5gOQ9x8z0rX4v 4efySuDowYkd7P237UawEAs2I/EOcxWZGmmeCbppWhzLMiISgJbvC2u8Ih4yxGI1QwRa 7mKGGrbwztm3eQkNmH8Z6DEJjseWN5+u5iTzX1Q7M8IwitrYylKnvlhuYAR9oFPywj79 jVgmzmCYN6KkvIS/1oYks3A8eIoh+sJiQIlxROZ6rvTlAJuGIi7TzaRf1xwgIlaBH6kq aK1Q== X-Gm-Message-State: AHQUAuaWD5sYCZ9pmmEntPNpv0H8wzgzTMmhX6nCLJb90YaJlDvQdEG+ iIBRkE1of/bpd19sA8Btsf236g== X-Google-Smtp-Source: AHgI3IYb1R/p8CwVIea6SCHsqavmyj3O4mqtCGIMvLIq3WapP0ONUuIuag46MD8/x64Zpp5uqP0UXQ== X-Received: by 2002:a17:902:4503:: with SMTP id m3mr6637325pld.23.1549393178491; Tue, 05 Feb 2019 10:59:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Feb 2019 10:59:37 -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 v3 5/8] arm64: dts: msm8996: Add UFS PHY reset controller Date: Tue, 5 Feb 2019 10:58:59 -0800 Message-Id: <20190205185902.106085-6-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 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 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 {