From patchwork Mon Dec 10 19:28:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10722299 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 EEB356C5 for ; Mon, 10 Dec 2018 19:29:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDB332A9BB for ; Mon, 10 Dec 2018 19:29:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1BF62A9D4; Mon, 10 Dec 2018 19:29: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 734272A9BB for ; Mon, 10 Dec 2018 19:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729301AbeLJT24 (ORCPT ); Mon, 10 Dec 2018 14:28:56 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34150 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729298AbeLJT2z (ORCPT ); Mon, 10 Dec 2018 14:28:55 -0500 Received: by mail-pg1-f196.google.com with SMTP id 17so5430522pgg.1 for ; Mon, 10 Dec 2018 11:28:55 -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=029zCa/kXIkbhjJJ9PqSXZqbJI7NE+AHEj0/comb9Wo=; b=d/6zGUeizfINWF6i/7MFl7xN5dEiWJ1DAB7N+R6aLCDr4E0XdJF3QAv85agjkSkmXD nUyAYiiRV/wW0bh8vXiE+buvUDrHKaSLBVm1BhAn2aCTeMejOb+2+y5X940McVOcXNo2 iKjgYXAyAjwmEEzYg/r9s06YA7WWoBqETsvlk= 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=029zCa/kXIkbhjJJ9PqSXZqbJI7NE+AHEj0/comb9Wo=; b=rtL+m0Bo626Bu2a71dbEQkHKnEns3I0US/JYIm9HA+mrDi0jAFwpXJChVwUkp0Sgjt YHO9vgXUkINvakY4eKvABMaeupthgr+uD7u4yfoyHB12l60EczGgwzjW2vH6UW75vwrv SaXXdPpCRF5qusdVJDvcH8hrYv187npSyXbHRQI0oBq4Bgsc3Y6Hr4OLimbTQRFU1QDP vL2+FqodRh3qZahlMVfpgW7SsOVCi0i35wOQzoJpC+s2hAvTxNcuR/tCDw+87HqNqS2s QMX0REhTVTsHxBJfSkzbgqd8720NJ8m1yMu+7PI0FKtrHOuiblbFo7xWRljuGD25ueC9 e2ag== X-Gm-Message-State: AA+aEWZs0R4k1vXhu9wC2voyBk7c2EQXevY5Kv6jqHDQPLscnNiiEcTv 1i/e2YcRYt5Oc7FLh0eKmZqUdg== X-Google-Smtp-Source: AFSGD/U6ePPVvMC3BNNZ06p7C7Kq/8fRGbumzD0eC0kooFSkrAq0ArK6o7FhXT+nrk8c4M96vzgzpA== X-Received: by 2002:a62:e30d:: with SMTP id g13mr13425486pfh.151.1544470135036; Mon, 10 Dec 2018 11:28:55 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id v12sm18318674pgg.41.2018.12.10.11.28.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 11:28:54 -0800 (PST) From: Evan Green To: 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 , linux-soc@vger.kernel.org Subject: [PATCH v7 3/5] arm64: dts: qcom: sdm845: add UFS controller Date: Mon, 10 Dec 2018 11:28:24 -0800 Message-Id: <20181210192826.241350-4-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181210192826.241350-1-evgreen@chromium.org> References: <20181210192826.241350-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 v7: None 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 b72bdb0a31a57..4ad4eaf1d61ce 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -808,6 +808,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 Mon Dec 10 19:28:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10722297 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 9BB666C5 for ; Mon, 10 Dec 2018 19:29:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8974F2A9BB for ; Mon, 10 Dec 2018 19:29:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D1F72A9D4; Mon, 10 Dec 2018 19:29:15 +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 223342A9BB for ; Mon, 10 Dec 2018 19:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728058AbeLJT3N (ORCPT ); Mon, 10 Dec 2018 14:29:13 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45012 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729310AbeLJT27 (ORCPT ); Mon, 10 Dec 2018 14:28:59 -0500 Received: by mail-pf1-f195.google.com with SMTP id u6so5858415pfh.11 for ; Mon, 10 Dec 2018 11:28:58 -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=gs0TgIJlRi1fcRzieQN8vIKDbS1pjM9AVMbx4uE7Nus=; b=T5fZuKD5TKY7zC4yAOel4JOzkomIqRAGvV98YfPcUIVZWtTN1OOf1XKnnCsNJQ5XVv YBqlm3BwSTwALoPsQZ/Op6+h5KtlxfvFaqst+mJBq+X4VHErfUtu/Rfaa8y4aeb/iDCh hY7FScGbSq/zd/8hw58HLAafyO8fZWm/a/GNk= 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=gs0TgIJlRi1fcRzieQN8vIKDbS1pjM9AVMbx4uE7Nus=; b=W47PP9qDIOPA8qh5iGPCYIqW9CeCfOkEdPj0M5IycnXXGuIdFzK2CPbaRmY5RfeWeJ smv/O1T/D8pjuOgUwZ1Dqlnn4L4Ub68Hr0B9GhAiHQUSc700ni8jXbmbwUFdhjzZzYZO hKR4sCbjp17qnfo1adc55yzu886P5e2anv/a9h7puibKMx/BFxaZ+N9auJWSiMfQetYM F2W4GU0z381uBMygZBIgfU9INPwuL2C8ul7bOreLcP7hn/WFuM+uwFIYkILd+7c+oElZ +Yzo8b2QGLVj74gqL5Tl7oZAlZhCk2rV55V/87q74ZayHSM+WKJU5S/2Ay0lhhOvcrZr oZxg== X-Gm-Message-State: AA+aEWZ4dQEG5RjFpxfb+cRGYgZf/eqaKQyLIYypWN569leg/MEz9A2p mdoXPOkpNq4loIy8pzWD5S14Ow== X-Google-Smtp-Source: AFSGD/XBv2353VDPfQ9LKdSIRrTD6S47ocs4GcvBx3+5x+F71BK68FvPSPRWDGF0lwcKrPIBQ6zGRg== X-Received: by 2002:aa7:810c:: with SMTP id b12mr13396676pfi.44.1544470138454; Mon, 10 Dec 2018 11:28:58 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id v12sm18318674pgg.41.2018.12.10.11.28.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 11:28:57 -0800 (PST) From: Evan Green To: 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 , linux-soc@vger.kernel.org Subject: [PATCH v7 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp Date: Mon, 10 Dec 2018 11:28:25 -0800 Message-Id: <20181210192826.241350-5-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181210192826.241350-1-evgreen@chromium.org> References: <20181210192826.241350-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 v7: None 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 eedfaf8922e2a..707134f84fe1b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -356,6 +356,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 Mon Dec 10 19:28:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10722295 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 EF3C61759 for ; Mon, 10 Dec 2018 19:29:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC9C82A9CE for ; Mon, 10 Dec 2018 19:29:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAC042A9BB; Mon, 10 Dec 2018 19:29:09 +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 710082A9BB for ; Mon, 10 Dec 2018 19:29:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729332AbeLJT3D (ORCPT ); Mon, 10 Dec 2018 14:29:03 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41454 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729329AbeLJT3B (ORCPT ); Mon, 10 Dec 2018 14:29:01 -0500 Received: by mail-pf1-f194.google.com with SMTP id b7so5868488pfi.8 for ; Mon, 10 Dec 2018 11:29: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=mDpKJVPFIVctgingBaL+8pLspjfVJhTZ7MqaisuyuDE=; b=VCpnFlH4C1CnLladVa5VvpEjml578hiMborkF683xWusR3xapzDb3OUfI4s+DowuNH OIYq+YvWPMAhB2TaBFiJBrXoMyRadgDLGRsPGryBo1cDN2kZarzCN15Bqw1gXCzpk7w7 LoI/XwWqbkPSNhn9JlJ2zogiOY4r4f9gB/lMU= 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=mDpKJVPFIVctgingBaL+8pLspjfVJhTZ7MqaisuyuDE=; b=LABdtDUJ94Pdv9sG107vCXU/8wo49aTnpYPyw/2+OAfYIHkfQf6dgAQGyvnzNjZcJV m0SQmoLieA9PDacykTyoTyqFXQRVJh1H/gAZiQVwsWw6VKIi9P0+Ig8Y1yx8AuIlq3Kg atTvCeLnvRF0tks1ekEO1zZk2q9naIGUpgpq/pqV52af9JlsZFIr7HkrGBOrA4VwoEps 3bAW0mAANgsaRJfV5OQF3wyzSVSwJkFXE4YtsyXqmegRA2kQ/mSgbeCYk+BCpBik8ami pf2ZmH5MeQEw/wZUjkN0HEf8i9bl1DDcROvHjFjM77Sji6kRSEn/rasE32q5e1V7re3P ZMcw== X-Gm-Message-State: AA+aEWZF/6BCQNan12MxAWiMZ1co40ZJ521BJwxK6AuNYegO+ChIRnMT PTvzSGLJpq3HGxkUt4Zj5VSg3Q== X-Google-Smtp-Source: AFSGD/XHItHnkkv7vn+uPeHL/fQZ3QWixmY7XvJEavjxJ3AeNmTj1OatAtJZuR1/x0Ds0YoC2dOcAA== X-Received: by 2002:a62:1c06:: with SMTP id c6mr13224519pfc.157.1544470141072; Mon, 10 Dec 2018 11:29: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 v12sm18318674pgg.41.2018.12.10.11.28.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 11:29:00 -0800 (PST) From: Evan Green To: 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 , linux-soc@vger.kernel.org Subject: [PATCH v7 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two Date: Mon, 10 Dec 2018 11:28:26 -0800 Message-Id: <20181210192826.241350-6-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181210192826.241350-1-evgreen@chromium.org> References: <20181210192826.241350-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 v7: - Rebased on top of phy/next 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 4ad4eaf1d61ce..dcc362b6cf04d 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -1185,10 +1185,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>;