From patchwork Fri Jun 3 15:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578846 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7FBDC43334 for ; Fri, 3 Jun 2022 15:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbiFCPuR (ORCPT ); Fri, 3 Jun 2022 11:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343508AbiFCPt0 (ORCPT ); Fri, 3 Jun 2022 11:49:26 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 291C351301 for ; Fri, 3 Jun 2022 08:49:18 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220603154916epoutp033bb6f24294ba9fa0ecc8cfbddc815628~1JwizcipQ2830028300epoutp03O for ; Fri, 3 Jun 2022 15:49:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220603154916epoutp033bb6f24294ba9fa0ecc8cfbddc815628~1JwizcipQ2830028300epoutp03O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271356; bh=GKJmr86kB7TxwNHcq4Ru7OONVnHX6Ub75EnaPEqr+Mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PN2syGKAjWMKofKaYNCvTbjp7W7txNWDzBDi7r70dQh7mivnljIQRJ2qlyde3dQ/8 YnixLw6OB5WC/xOS6k/YRJ7BRBd20HUTCTNcFlk1M5re9zJEB2Qee9JV8LHVFJwuYm iBCbOivlF+Wfp6gZocp/fw5wbWk/cSXJBE9E4dBk= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20220603154915epcas5p33d3ddd53155455e24e6337b9344923fd~1JwiAj0Fi1875418754epcas5p3x; Fri, 3 Jun 2022 15:49:15 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.178]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4LF6kd00Wgz4x9Pq; Fri, 3 Jun 2022 15:49:13 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 98.28.09762.87D2A926; Sat, 4 Jun 2022 00:49:12 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220603154912epcas5p2bf984fb4e32ee1b1357a3cc595e70a67~1JwewVuAp1440614406epcas5p2O; Fri, 3 Jun 2022 15:49:12 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220603154912epsmtrp21b756d203773ea29d7606d6b63f310e5~1JwevSMRc0407504075epsmtrp2x; Fri, 3 Jun 2022 15:49:12 +0000 (GMT) X-AuditID: b6c32a4b-1fdff70000002622-a8-629a2d78c9f1 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7F.27.08924.77D2A926; Sat, 4 Jun 2022 00:49:12 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154909epsmtip11e1a185d3c58c95348896101f19f2fb0~1JwcCuNKq2494124941epsmtip1K; Fri, 3 Jun 2022 15:49:09 +0000 (GMT) From: Alim Akhtar To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-phy@lists.infradead.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, avri.altman@wdc.com, bvanassche@acm.org, martin.petersen@oracle.com, chanho61.park@samsung.com, pankaj.dubey@samsung.com, Alim Akhtar , Bharat Uppal Subject: [PATCH v2 7/7] arm64: dts: fsd: add ufs device node Date: Fri, 3 Jun 2022 21:17:14 +0530 Message-Id: <20220603154714.30532-8-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220603154714.30532-1-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjk+LIzCtJLcpLzFFi42LZdlhTU7dCd1aSwcEZlhYP5m1js3j58yqb xbWXF9gtpn34yWxxeb+2xfwj51gt+l48ZLbY9Pgaq8XlXXPYLCas+sZi0X19B5vF8uP/mCwW bf3CbtG69wi7xc47J5gd+D0uX/H22LSqk83jzrU9bB6bl9R7fHx6i8Wjb8sqRo/Pm+Q82g90 MwVwRGXbZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gCd rqRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUotSMkpMCnQK07MLS7NS9fLSy2xMjQwMDIF KkzIzni29ypjwQPxip7dF9gaGLcJdzFyckgImEhMntjC3MXIxSEksJtRYseXI0wgCSGBT4wS u1bKQCQ+M0pc3bqVEaZjzY/1rBBFuxglVj/lhChqYZJoOfWSDSTBJqAtcXf6FiaQhIhAM6PE wY5dYA6zwE4miYu/pzODVAkL2Ei8XPEDbCyLgKrEijP7wHbzAsXP/v7KBrFOXmL1hgNA9Rwc nAK2ElNP84HMkRCYyiHRtGwi1EkuEkefLmSHsIUlXh3fAmVLSXx+t5cNpFdCwENi0R8piHCG xNvl66Fa7SUOXJnDAlLCLKAp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zcHAK2EpM Pc0HsctG4vv5+6wTGPkWMDKsYpRMLSjOTc8tNiwwykst1ytOzC0uzUvXS87P3cQIDm4trR2M e1Z90DvEyMTBeIhRgoNZSYS3bN7MJCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8F7pOxgsJpCeW pGanphakFsFkmTg4pRqYZHXMLxROZnhxoP93XLlwcp3c8luxDOkTjCMF9jByrNnn9/R/SCHL tOWMJjt/vGefK+exu6Tykfzy2KRvm9pF5pTUJdcLfg2v4bfRlVmn43njn926TzUMgtzBHsnV 0bsETzxuU0uzfpE645q62nb+h312jfoNH0UZ3x9ctZnDVW+pU9TsbXVPS+4rB4Zc+rYuYlb3 tr9XxDIvnA/nUn45a12vkwujof2We8xmNSLb19j1ztoTu1DkVkvrf9/ZMtnbzj1TFNx2o+WO +6W1ar3KvTsWepyvdA40nJtas/z9nBaZkPfKsuKMFS76TUcXx7Y1HZtVd9Dgdc/ktAfxvf94 N8/b27TQbNPZ8ujHaaJKLMUZiYZazEXFiQCnEuK/3QIAAA== X-CMS-MailID: 20220603154912epcas5p2bf984fb4e32ee1b1357a3cc595e70a67 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154912epcas5p2bf984fb4e32ee1b1357a3cc595e70a67 References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Adds FSD ufs device node and enable the same for fsd platform. This also adds the required pin configuration for the same. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar --- arch/arm64/boot/dts/tesla/fsd-evb.dts | 4 +++ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 14 +++++++++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 29 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 5af560c1b5e6..1db6ddf03f01 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -37,3 +37,7 @@ &fin_pll { &serial_0 { status = "okay"; }; + +&ufs { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi index d4d0cb005712..387a41e251d5 100644 --- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi @@ -50,6 +50,20 @@ gpf5: gpf5-gpio-bank { interrupt-controller; #interrupt-cells = <2>; }; + + ufs_rst_n: ufs-rst-n-pins { + samsung,pins = "gpf5-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + ufs_refclk_out: ufs-refclk-out-pins { + samsung,pins = "gpf5-1"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_peric { diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index af39655331de..7d1acf8f6466 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -740,6 +740,35 @@ timer@10040000 { clocks = <&fin_pll>, <&clock_imem IMEM_MCT_PCLK>; clock-names = "fin_pll", "mct"; }; + + ufs: ufs@15120000 { + compatible = "tesla,fsd-ufs"; + reg = <0x0 0x15120000 0x0 0x200>, /* 0: HCI standard */ + <0x0 0x15121100 0x0 0x200>, /* 1: Vendor specified */ + <0x0 0x15110000 0x0 0x8000>, /* 2: UNIPRO */ + <0x0 0x15130000 0x0 0x100>; /* 3: UFS protector */ + reg-names = "hci", "vs_hci", "unipro", "ufsp"; + interrupts = ; + clocks = <&clock_fsys0 UFS0_TOP0_HCLK_BUS>, + <&clock_fsys0 UFS0_TOP0_CLK_UNIPRO>; + clock-names = "core_clk", "sclk_unipro_main"; + freq-table-hz = <0 0>, <0 0>; + pinctrl-names = "default"; + pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>; + phys = <&ufs_phy>; + phy-names = "ufs-phy"; + status = "disabled"; + }; + + ufs_phy: ufs-phy@15124000 { + compatible = "tesla,fsd-ufs-phy"; + reg = <0x0 0x15124000 0x0 0x800>; + reg-names = "phy-pma"; + samsung,pmu-syscon = <&pmu_system_controller>; + #phy-cells = <0>; + clocks = <&clock_fsys0 UFS0_MPHY_REFCLK_IXTAL26>; + clock-names = "ref_clk"; + }; }; };