From patchwork Thu Dec 6 23:32:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10717243 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 21F9A109C for ; Thu, 6 Dec 2018 23:32:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EE902EF3E for ; Thu, 6 Dec 2018 23:32:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00C592EF55; Thu, 6 Dec 2018 23:32:30 +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 8AA962EF3E for ; Thu, 6 Dec 2018 23:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726356AbeLFXcZ (ORCPT ); Thu, 6 Dec 2018 18:32:25 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41678 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726347AbeLFXcY (ORCPT ); Thu, 6 Dec 2018 18:32:24 -0500 Received: by mail-pl1-f194.google.com with SMTP id u6so887094plm.8 for ; Thu, 06 Dec 2018 15:32:24 -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=F36H2yFwmgGDNBfcZxCvb5Zmw+1JrX+IJ0TMEgz6BGY=; b=SZfDT2YyMoznP+45Ot7gW7PSDNHkLXoXKLT271i/Hi+9+a8dTVb2qsV549lMOy1bBA IK1scs1jioSFTEdgEvUlZG5nuCb4G+1DAK9VpzOKGOQ89taroolmNW2bYLgxKDP/KlIw zyliwmGDhj8RJLt+2tXDEMQP1ofDdwbdeBp6Y= 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=F36H2yFwmgGDNBfcZxCvb5Zmw+1JrX+IJ0TMEgz6BGY=; b=Dh9JjwwE5euyKIF08MNNt1Lf+iNbRKVrE+E4qXN6hbjNevADqN7Gwp68FWGZVsQ94K GFSyWEpy2DiYd9xRzZ52kSrSZ0Y123a2ppZPv8YcWVUQeYJiZRFfFTdbgyA4qmKJN6rO 9okY0MY/m1Sd29Ku5WBZzg7QSlp7Dn8WKUR6QW/MTq+j7yWWSgxZywvWWQqkaWERTHnU uzxR0bV1wdAVVTfCp6C8Cp/oKk94I14zJ4ZmwPVapHSJo4HFixO6W/ZPNdNlX+uqd68o 95CPvxq0vOryUtdXY6E9aWr97Tcsv2hevcZsUKSMRomJyay41b4rKIfnSftvVjhsWXNM FHMw== X-Gm-Message-State: AA+aEWb0DWb+DT71RQ9T1wdmWyR9csaVuMTZ0W6yYea7EBGEgnsVgWOh 8ggvouo15knAmuEX5JHHQGbbJw== X-Google-Smtp-Source: AFSGD/U4lPLOPNyEF9BrOeMbgYKkAJNaHWt2gwo7ycPa1wiY17d4DxNllSoO60q5ylJWQNR/dSlCdw== X-Received: by 2002:a17:902:4c85:: with SMTP id b5mr28830814ple.226.1544139143452; Thu, 06 Dec 2018 15:32:23 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id s190sm2100875pfb.103.2018.12.06.15.32.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 15:32:22 -0800 (PST) From: Evan Green To: Rob Herring , Andy Gross , Kishon Vijay Abraham I Cc: Douglas Anderson , Stephen Boyd , 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 v6 3/5] arm64: dts: qcom: sdm845: add UFS controller Date: Thu, 6 Dec 2018 15:32:02 -0800 Message-Id: <20181206233205.193244-4-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181206233205.193244-1-evgreen@chromium.org> References: <20181206233205.193244-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 UFS controller and PHY to SDM845. Signed-off-by: Evan Green Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- As Doug mentioned in v2, this should land after (or with) the driver fix in this series. Changes in v6: - Removed resets and reset-names (Bjorn) - Renamed nodes (Bjorn) Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: - Renamed ufsphy to phy (Vivek) - Removed #clock-cells (Vivek) arch/arm64/boot/dts/qcom/sdm845.dtsi | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 1419b0098cb38..9e4ad805d2936 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -816,6 +816,70 @@ }; }; + ufs_mem_hc: ufshc@1d84000 { + compatible = "qcom,sdm845-ufshc", "qcom,ufshc", + "jedec,ufs-2.0"; + reg = <0x1d84000 0x2500>; + interrupts = ; + phys = <&ufs_mem_phy_lanes>; + phy-names = "ufsphy"; + lanes-per-direction = <2>; + power-domains = <&gcc UFS_PHY_GDSC>; + + clock-names = + "core_clk", + "bus_aggr_clk", + "iface_clk", + "core_clk_unipro", + "ref_clk", + "tx_lane0_sync_clk", + "rx_lane0_sync_clk", + "rx_lane1_sync_clk"; + clocks = + <&gcc GCC_UFS_PHY_AXI_CLK>, + <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, + <&gcc GCC_UFS_PHY_AHB_CLK>, + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, + <&rpmhcc RPMH_CXO_CLK>, + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>; + freq-table-hz = + <50000000 200000000>, + <0 0>, + <0 0>, + <37500000 150000000>, + <0 0>, + <0 0>, + <0 0>, + <0 0>; + + status = "disabled"; + }; + + ufs_mem_phy: phy@1d87000 { + compatible = "qcom,sdm845-qmp-ufs-phy"; + reg = <0x1d87000 0x18c>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-names = "ref", + "ref_aux"; + clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + + status = "disabled"; + + ufs_mem_phy_lanes: lanes@1d87400 { + reg = <0x1d87400 0x108>, + <0x1d87600 0x1e0>, + <0x1d87c00 0x1dc>, + <0x1d87800 0x108>, + <0x1d87a00 0x1e0>; + #phy-cells = <0>; + }; + }; + tcsr_mutex_regs: syscon@1f40000 { compatible = "syscon"; reg = <0x1f40000 0x40000>; From patchwork Thu Dec 6 23:32:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10717245 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 B8DE3109C for ; Thu, 6 Dec 2018 23:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FCE2EF3E for ; Thu, 6 Dec 2018 23:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CA5A2EF53; Thu, 6 Dec 2018 23:32:37 +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 C6A5E2EF3E for ; Thu, 6 Dec 2018 23:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726392AbeLFXc2 (ORCPT ); Thu, 6 Dec 2018 18:32:28 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37925 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeLFXc1 (ORCPT ); Thu, 6 Dec 2018 18:32:27 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so897338plb.5 for ; Thu, 06 Dec 2018 15:32: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; bh=79Mc2sTRXTy/reDsA09tWOgsmHMjQBqHWoIDf/G9rW8=; b=ZEiovGZ/Uo/x32fPA/RbAIqdh277Us+woHgTrU874fb6A35sau793e9pX36nbXjjVJ 7qcQcnRUXi7QqfEHhCuQaJ6yeWy8C4OI+n7HF9FrPCGCZuXz/HRVx2Cq0VJbjCK0fQyR S7+6JxZK7aIYFeoDWCo8DL3gND3N79E5gKctw= 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=79Mc2sTRXTy/reDsA09tWOgsmHMjQBqHWoIDf/G9rW8=; b=KNm34M6f3KXq2VmcenJk1yKcnXs05tKpe8DhORixvdvZGD4DkH3N3Vc7ShLHk7N05X neZC8S9PhJILulUCkGu5+Zsd/mB1PPCutftWAuI8sCG31v+KXXV7Pso13JdQ4rz3tafn xtLSRl2d12gv9JJBKE/lt8+s2AkunmxOOW++6DHrURyoGm2AgrpMz5AwN6ZEpZnQvyVo ZkvFFcFld7icQOZqcVyOjr56C8KMmFIfE8tiRd/GsvpSceVLZ+22VlLowDfMSJxzMP/j 5NCAbI0uvj1VtewKI0tgcywrqzRea/jzB/dVc+imW4Bd4xHN6DKa5Suwm2l63tbMhcOO udqA== X-Gm-Message-State: AA+aEWb88+7FHmtuXj43wF8Q0Qup3KIqBxZnYy+3w1AfBpY7nIs+aAdE PvlebI4TofgRNwOj8f6Od+sPJA== X-Google-Smtp-Source: AFSGD/Vz8vYTJyortHTXMiUteIy+cEq7BycTXYO3vf28RieQGOdpMb4nlJGoC1HcKFSQLGcZVjq/lQ== X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr30856864plp.180.1544139146964; Thu, 06 Dec 2018 15:32:26 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id s190sm2100875pfb.103.2018.12.06.15.32.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 15:32:26 -0800 (PST) From: Evan Green To: Rob Herring , Andy Gross , Kishon Vijay Abraham I Cc: Douglas Anderson , Stephen Boyd , Can Guo , 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 v6 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp Date: Thu, 6 Dec 2018 15:32:03 -0800 Message-Id: <20181206233205.193244-5-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181206233205.193244-1-evgreen@chromium.org> References: <20181206233205.193244-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 From: Can Guo Enable the UFS host controller and PHY on sdm845-mtp. Signed-off-by: Can Guo Signed-off-by: Evan Green Reviewed-by: Vivek Gautam Reviewed-by: Douglas Anderson --- Changes in v6: - Fix renamed nodes in MTP (Bjorn) Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index b3def03581775..99b1eefef0ff2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -366,6 +366,20 @@ status = "okay"; }; +&ufs_mem_hc { + status = "okay"; + + vcc-supply = <&vreg_l20a_2p95>; + vcc-max-microamp = <600000>; +}; + +&ufs_mem_phy { + status = "okay"; + + vdda-phy-supply = <&vdda_ufs1_core>; + vdda-pll-supply = <&vdda_ufs1_1p2>; +}; + &usb_1 { status = "okay"; }; From patchwork Thu Dec 6 23:32:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10717247 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 3CCAB109C for ; Thu, 6 Dec 2018 23:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CB1D2EF3E for ; Thu, 6 Dec 2018 23:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 211762EF53; Thu, 6 Dec 2018 23:32:43 +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 4B27F2EF3E for ; Thu, 6 Dec 2018 23:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726405AbeLFXcd (ORCPT ); Thu, 6 Dec 2018 18:32:33 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37296 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbeLFXcd (ORCPT ); Thu, 6 Dec 2018 18:32:33 -0500 Received: by mail-pg1-f194.google.com with SMTP id 80so837336pge.4 for ; Thu, 06 Dec 2018 15:32:33 -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=5WFZ6x2NfK4hZhzgs788kv2kC4aW2Hcvw6YMW1dFIYI=; b=XoMH87jBd8kvQ+fCIzEKKbz/eKQyXn8fst4fqJHfDT5i9JGdqo3lCcTInYTipZ5LcX RJ5DICeoKKS1N+CrMcUF48LE5t+b/sN+jBT724xVRjSdovkJlxiQMNGA33SpYt5SfYum wcgm+8H4uOwYe6ltaBe3h6sDqILfr/6j9O+s0= 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=5WFZ6x2NfK4hZhzgs788kv2kC4aW2Hcvw6YMW1dFIYI=; b=BxwI81ueJfP7sauaG3N1Eg7MhmVhlaDrZzRnkbZDS/76rncGz7KKSb2jQ5eu214eo4 dCmJ7tsgMPJHu4vV5vQ+PwkMOyG/vaQE+5S+QbO70LgE5MrzRuf8+prtwDnjFUzRNmeV Dr6rxBbvB5zi5m0Z5qgNEC7PxXJ/0ZY1ApoppVQAEQ0BkzA8LPxvXbAqvO12jSkQRI3E 2+FZ4zpmd8YSM30MwkDvlSwzz2jLOpQfObGg0ZI/2vBEMGY2TAzBR1tMoey2uIYRsN8d lYafbr1hEb8NYvHfJ46UzpecLVros8kFtDEjYKn7o/LgjoxnciCtCb4v1Ff9wTCO6ACS mfZA== X-Gm-Message-State: AA+aEWYqOnpfVbg/BmXXPb5FoeOJRX4NZZZuJnHSgCPvvXu3vn86/IAD uVli+scB2K99DxZZUtrG2b69VA== X-Google-Smtp-Source: AFSGD/UqWnGDGcPm1Pzvr+Wc9Fx2mn4l8Iat0l1gSmoXfEWrtVbS0cLyT9WfwQuQ9CFycsYi2EOiJg== X-Received: by 2002:a62:6f49:: with SMTP id k70mr30305543pfc.7.1544139152832; Thu, 06 Dec 2018 15:32:32 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id s190sm2100875pfb.103.2018.12.06.15.32.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 15:32:32 -0800 (PST) From: Evan Green To: Rob Herring , Andy Gross , Kishon Vijay Abraham I Cc: Douglas Anderson , Stephen Boyd , 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 v6 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two Date: Thu, 6 Dec 2018 15:32:04 -0800 Message-Id: <20181206233205.193244-6-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181206233205.193244-1-evgreen@chromium.org> References: <20181206233205.193244-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 second lane registers for the USB PHY, now that the QMP phy bindings have been updated. This way the driver can stop reaching beyond its register region to get at the second lane. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Removed erroneous fixup for USB UniPro PHY, which is not dual lane (Doug) Changes in v2: None arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 9e4ad805d2936..e2256953dac4c 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -1193,10 +1193,12 @@ <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: lane@88e9200 { + usb_1_ssphy: lanes@88e9200 { reg = <0x88e9200 0x128>, <0x88e9400 0x200>, <0x88e9c00 0x218>, + <0x88e9600 0x128>, + <0x88e9800 0x200>, <0x88e9a00 0x100>; #phy-cells = <0>; clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;