From patchwork Fri Jun 3 15:47:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578621 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 5A5EDC433EF for ; Fri, 3 Jun 2022 15:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245676AbiFCPs6 (ORCPT ); Fri, 3 Jun 2022 11:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244700AbiFCPs5 (ORCPT ); Fri, 3 Jun 2022 11:48:57 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2781650B04 for ; Fri, 3 Jun 2022 08:48:56 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220603154854epoutp02bcc659d084b65cf004b5e8d70142f6b3~1JwOeTQux1535315353epoutp02w for ; Fri, 3 Jun 2022 15:48:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220603154854epoutp02bcc659d084b65cf004b5e8d70142f6b3~1JwOeTQux1535315353epoutp02w DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271334; bh=OqQ1enUTxvICV7W6/WibB2vsnt6W8FW67Y/2GxvFhQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SOcLYtuyfliDkrov+3zj04x2my4/63v8fQHyk0K4WLcmfnPLHUJE7mSM6urhXrsv0 gr7QwEjJi7JYNa3hyzNpln3JBqY4BqIvwnvX7z05p/9uvg6eZistYeexEtqITGfXT0 2r8VceBcMHsKIBl5BHFDsg0uqCzArkGK4ApNK5JI= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20220603154854epcas5p4a73040e0de0ee59a89430ac4f5a9eeb8~1JwN_Of6s1859418594epcas5p4L; Fri, 3 Jun 2022 15:48:54 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.174]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4LF6kB6n0Cz4x9Pp; Fri, 3 Jun 2022 15:48:50 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 80.28.09762.26D2A926; Sat, 4 Jun 2022 00:48:50 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220603154850epcas5p220116911e746aaf59f948509efd190e5~1JwKYe0P71442914429epcas5p2M; Fri, 3 Jun 2022 15:48:50 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220603154850epsmtrp2eb94580b25a69377321baed78210cb78~1JwKXVg0w0407504075epsmtrp2o; Fri, 3 Jun 2022 15:48:50 +0000 (GMT) X-AuditID: b6c32a4b-213ff70000002622-89-629a2d629738 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B3.6C.11276.26D2A926; Sat, 4 Jun 2022 00:48:50 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154847epsmtip1deb6f027ee1b1ca0df67bf14ab7b5ff5~1JwHihDyk1990619906epsmtip1i; Fri, 3 Jun 2022 15:48:47 +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 1/7] dt-bindings: phy: Add FSD UFS PHY bindings Date: Fri, 3 Jun 2022 21:17:08 +0530 Message-Id: <20220603154714.30532-2-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+LIzCtJLcpLzFFi42LZdlhTXTdJd1aSwZYvBhYP5m1js3j58yqb xbWXF9gtpn34yWxxeb+2xfwj51gt+l48ZLbY9Pgaq8XlXXPYLCas+sZi0X19B5vF8uP/mCwW bf3CbtG69wi7xc47J5gd+D0uX/H22LSqk83jzrU9bB6bl9R7fHx6i8Wjb8sqRo/Pm+Q82g90 MwVwRGXbZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gCd rqRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUotSMkpMCnQK07MLS7NS9fLSy2xMjQwMDIF KkzIzji7di5zwRW2iuvr57I1MN5g7WLk5JAQMJH49HczcxcjF4eQwG5GiVnnL7FDOJ8YJa5u uA3lfGOUWNl1ixGmZe23f0wQib2MEs/7XkI5LUwSk26BZDg52AS0Je5O3wKWEBFoZpQ42LEL zGEW2MkkcfH3dGaQKmEBJ4nv26eDncIioCrxuuEMkM3BwStgI9G/sQJinbzE6g0HmEHCnAK2 ElNP84GMkRCYySHxcs0ndogaF4nrR7YyQ9jCEq+Ob4GKS0l8freXDaRXQsBDYtEfKYhwhsTb 5euhvrGXOHBlDgtICbOApsT6Xf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i 6mk+kLAQUMX38/dZJzDyLWBkWMUomVpQnJueW2xYYJiXWq5XnJhbXJqXrpecn7uJERzcWpo7 GLev+qB3iJGJg/EQowQHs5IIb9m8mUlCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhP LEnNTk0tSC2CyTJxcEo1MO3/+KNgp+7RHxHvbp1IN7+1pt1hnlqezbFa1dslVRPX5U5k0Kyu VEpbsHcZ96m+M3ZTJsUyn1/K1Gfv5OTwaL9Gmm4zR/AxpWt73zxPyJRcqHzQJXnyRctWzp9K 08yuty9iV1iWs3TW9uV5muvX+2SeePiweZ00h3PMWu7r8S8MOcTLPOwvHmM8N3GrWu7ml5pn Tu/PC4/icuZd1stRGcg356+Ee7L4lQ//JZqqQvvWMfW/eXL+SX3Tvop3c++rRPx6NOlU2GS5 XtEJabyKzOsmaa+MDRBPXhay60BDQnGS85cXTkf2PLpse3+1dse715Oaj5Yy5TXevB0qYP1j NktXEnNJ/LwLS5wuPiiPfKzEUpyRaKjFXFScCADrKe0Y3QIAAA== X-CMS-MailID: 20220603154850epcas5p220116911e746aaf59f948509efd190e5 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154850epcas5p220116911e746aaf59f948509efd190e5 References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Add tesla,fsd-ufs-phy compatible for Tesla Full Self-Driving (FSD) SoC. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml index f6ed1a005e7a..ee354bf37c64 100644 --- a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml @@ -17,6 +17,7 @@ properties: enum: - samsung,exynos7-ufs-phy - samsung,exynosautov9-ufs-phy + - tesla,fsd-ufs-phy reg: maxItems: 1 From patchwork Fri Jun 3 15:47:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578620 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 41AAEC43334 for ; Fri, 3 Jun 2022 15:49:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245694AbiFCPtN (ORCPT ); Fri, 3 Jun 2022 11:49:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245687AbiFCPtC (ORCPT ); Fri, 3 Jun 2022 11:49:02 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C9E50B0A for ; Fri, 3 Jun 2022 08:49:00 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220603154857epoutp04891d314c085b8327a1659344baf9de1b~1JwRmgBex0048500485epoutp04K for ; Fri, 3 Jun 2022 15:48:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220603154857epoutp04891d314c085b8327a1659344baf9de1b~1JwRmgBex0048500485epoutp04K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271338; bh=pn1GhTFojudQMKDp0Rp6pEZP2kIfXWwD1f6+9T//LXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hb0B0I61WHQgWbHNodWCnzJXolFEuGU8EIvPY7QD5VrSmekNT+bPtgMR8/A0uttKu ZjHs7YoKWAswL4qDyNh+5KPggV9+Wa24G2Je/xes/keUtSu47aWwTOVQYvPQJB8K8Q 5qCkMX6ZtOujFYwW28oczZuJ7XJ+2T4Wt6FfrXQE= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220603154857epcas5p2b9664496683e30573cd04df6c4e5fe6a~1JwRJN6gz1442914429epcas5p2Q; Fri, 3 Jun 2022 15:48:57 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.174]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4LF6kG1xYyz4x9Pv; Fri, 3 Jun 2022 15:48:54 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 81.28.09762.66D2A926; Sat, 4 Jun 2022 00:48:54 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20220603154853epcas5p1f072d462edae5584d1cce601189ab85b~1JwNm2mbb2967129671epcas5p1o; Fri, 3 Jun 2022 15:48:53 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220603154853epsmtrp258bb2ef493633b0cfd8aff8440d8b53d~1JwNmAMLb0407504075epsmtrp2p; Fri, 3 Jun 2022 15:48:53 +0000 (GMT) X-AuditID: b6c32a4b-1fdff70000002622-8c-629a2d66910f Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id EC.27.08924.56D2A926; Sat, 4 Jun 2022 00:48:53 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154851epsmtip1d5b51af2e8b987497cf066b8988b05a7~1JwLeEeBK2493724937epsmtip1S; Fri, 3 Jun 2022 15:48:51 +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 2/7] phy: samsung-ufs: move cdr offset to drvdata Date: Fri, 3 Jun 2022 21:17:09 +0530 Message-Id: <20220603154714.30532-3-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+NgFupgk+LIzCtJLcpLzFFi42LZdlhTSzdNd1aSwd453BYP5m1js3j58yqb xbWXF9gtpn34yWxxeb+2xfwj51gt+l48ZLbY9Pgaq8XlXXPYLCas+sZi0X19B5vF8uP/mCwW bf3CbtG69wi7xc47J5gd+D0uX/H22LSqk83jzrU9bB6bl9R7fHx6i8Wjb8sqRo/Pm+Q82g90 MwVwRGXbZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gCd rqRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUotSMkpMCnQK07MLS7NS9fLSy2xMjQwMDIF KkzIzlh2eCl7wRfJisbtk1gaGFeJdTFyckgImEhsmbmKpYuRi0NIYDejxLYpD1ghnE+MEmuf 74RyPjNKPLg2kx2m5fCPPqiWXYwSLyauY4dwWpgkHq7/CVbFJqAtcXf6FiaQhIhAM6PEwY5d YA6zwE4miYu/pzODVAkLuEis6L3FCGKzCKhKPN19nBXE5hWwkZhzfSvUPnmJ1RsOANVzcH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GyewQ9jCEiv/PQezhQSamCS+X/YDsdkEtCXuTt/CBGKLCLQzStzfzgYy iFngKJPE8lPHwAYJC7hIrOi9xQhiswioSjzdfZwVxOYVsJGYc30r1AJ5idUbDgDVc3BwCthK TD3NB7HLRuL7+fusExj5FjAyrGKUTC0ozk3PLTYsMMpLLdcrTswtLs1L10vOz93ECA5uLa0d jHtWfdA7xMjEwXiIUYKDWUmEt2zezCQh3pTEyqrUovz4otKc1OJDjNIcLErivBe6TsYLCaQn lqRmp6YWpBbBZJk4OKUamDziFpQvYq3Tnjh7QVHxlZPVL0p44qfO/1kb55I7VXHqs7NFiabd asczW+/7Po6yPlf+YdHphPXRrLM5enb6b77DffC65an8vaW7l+5d55bMaFmw6/z/UsVpactn z31yWub8d5mbX140fGTbx+Z3R39X4ZGQGTndM/frTwrrihP2qQjy+OJv5aqTfugNVxR/zT0l ZcdzP25vO3Nox3zBVonJ0xccubmo2PzYjcKk7EcLFj3YUGK1Mv2YzcNJNw4dY3H61p5/yXbO TrG1uxMenJm7auKjEt7oBxyZq1+kyWvUPO1umxT2KCp6NuOVpRMkw5kMC2enql14Uj9tu2Pr NNVvXhOZ/jKsXL20sTbljo+wEktxRqKhFnNRcSIA1YyGh90CAAA= X-CMS-MailID: 20220603154853epcas5p1f072d462edae5584d1cce601189ab85b X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154853epcas5p1f072d462edae5584d1cce601189ab85b References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Move CDR lock offset to drv data so that it can be extended for other SoCs which are having CDR lock at different register offset. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Reviewed-by: Chanho Park --- drivers/phy/samsung/phy-exynos7-ufs.c | 3 +++ drivers/phy/samsung/phy-exynosautov9-ufs.c | 2 ++ drivers/phy/samsung/phy-samsung-ufs.c | 3 ++- drivers/phy/samsung/phy-samsung-ufs.h | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos7-ufs.c b/drivers/phy/samsung/phy-exynos7-ufs.c index 7c9008e163db..dca21fb6e2a6 100644 --- a/drivers/phy/samsung/phy-exynos7-ufs.c +++ b/drivers/phy/samsung/phy-exynos7-ufs.c @@ -11,6 +11,8 @@ #define EXYNOS7_EMBEDDED_COMBO_PHY_CTRL_MASK 0x1 #define EXYNOS7_EMBEDDED_COMBO_PHY_CTRL_EN BIT(0) +#define EXYNOS7_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS 0x5e + /* Calibration for phy initialization */ static const struct samsung_ufs_phy_cfg exynos7_pre_init_cfg[] = { PHY_COMN_REG_CFG(0x00f, 0xfa, PWR_MODE_ANY), @@ -74,4 +76,5 @@ const struct samsung_ufs_phy_drvdata exynos7_ufs_phy = { .en = EXYNOS7_EMBEDDED_COMBO_PHY_CTRL_EN, }, .has_symbol_clk = 1, + .cdr_lock_status_offset = EXYNOS7_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS, }; diff --git a/drivers/phy/samsung/phy-exynosautov9-ufs.c b/drivers/phy/samsung/phy-exynosautov9-ufs.c index 36398a15c2db..1572b985c70d 100644 --- a/drivers/phy/samsung/phy-exynosautov9-ufs.c +++ b/drivers/phy/samsung/phy-exynosautov9-ufs.c @@ -10,6 +10,7 @@ #define EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL 0x728 #define EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL_MASK 0x1 #define EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL_EN BIT(0) +#define EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS 0x5e #define PHY_TRSV_REG_CFG_AUTOV9(o, v, d) \ PHY_TRSV_REG_CFG_OFFSET(o, v, d, 0x50) @@ -64,4 +65,5 @@ const struct samsung_ufs_phy_drvdata exynosautov9_ufs_phy = { .en = EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL_EN, }, .has_symbol_clk = 0, + .cdr_lock_status_offset = EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS, }; diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index 602ddef259eb..8e5ae228daa7 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -63,7 +63,8 @@ static int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy) } err = readl_poll_timeout( - ufs_phy->reg_pma + PHY_APB_ADDR(PHY_CDR_LOCK_STATUS), + ufs_phy->reg_pma + + PHY_APB_ADDR(ufs_phy->drvdata->cdr_lock_status_offset), val, (val & PHY_CDR_LOCK_BIT), sleep_us, timeout_us); if (err) dev_err(ufs_phy->dev, diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index 91a0e9f94f98..965c79bbc278 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -40,7 +40,6 @@ /* UFS PHY registers */ #define PHY_PLL_LOCK_STATUS 0x1e -#define PHY_CDR_LOCK_STATUS 0x5e #define PHY_PLL_LOCK_BIT BIT(5) #define PHY_CDR_LOCK_BIT BIT(4) @@ -109,6 +108,7 @@ struct samsung_ufs_phy_drvdata { u32 en; } isol; bool has_symbol_clk; + u32 cdr_lock_status_offset; }; struct samsung_ufs_phy { From patchwork Fri Jun 3 15:47:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578848 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 14B30C433EF for ; Fri, 3 Jun 2022 15:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245738AbiFCPtY (ORCPT ); Fri, 3 Jun 2022 11:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245685AbiFCPtM (ORCPT ); Fri, 3 Jun 2022 11:49:12 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F3950B06 for ; Fri, 3 Jun 2022 08:49:03 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220603154902epoutp01d583cf436f592916164a840f0db8a5d0~1JwVjRaa72186821868epoutp01J for ; Fri, 3 Jun 2022 15:49:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220603154902epoutp01d583cf436f592916164a840f0db8a5d0~1JwVjRaa72186821868epoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271342; bh=tg4qENaeXxsFQ4nawnPt0oXoXanezuoNV36RT0/GJEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFKdKi0ocV8Ytr/dIwiFKCboW1PbJX/d3sSAAsbT3SQSWhdE9bQcYealkOnNb+g5v l4udod/UDOU70rKIuT4NQ1CObcaOk8l8NtmRqrwxc0qSDgIYcnUvGmfh1w8eJDwBvq Cyu4b1F8rjTZa9n+pIPw8a9Ho7pbQ4DbhDUYWOv8= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220603154901epcas5p200441d6744ceba02d5df186768d16d5c~1JwUqA95g3002730027epcas5p2x; Fri, 3 Jun 2022 15:49:01 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.177]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4LF6kK6FVLz4x9Pv; Fri, 3 Jun 2022 15:48:57 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id FD.A8.10063.96D2A926; Sat, 4 Jun 2022 00:48:57 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20220603154857epcas5p4b4684d4400f4ff66f69ff5e288ef635c~1JwQtube91903319033epcas5p4b; Fri, 3 Jun 2022 15:48:57 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220603154857epsmtrp2723d08a094d931a7ca27a33972a1ba54~1JwQs2LBd0407504075epsmtrp2q; Fri, 3 Jun 2022 15:48:57 +0000 (GMT) X-AuditID: b6c32a49-4cbff7000000274f-41-629a2d69b1a0 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C4.6C.11276.86D2A926; Sat, 4 Jun 2022 00:48:56 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154854epsmtip1211e12a37cb846277586f560a334fa8a~1JwOpPn_F2493724937epsmtip1T; Fri, 3 Jun 2022 15:48:54 +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 3/7] phy: samsung-ufs: add support for FSD ufs phy driver Date: Fri, 3 Jun 2022 21:17:10 +0530 Message-Id: <20220603154714.30532-4-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+NgFmpmk+LIzCtJLcpLzFFi42LZdlhTXTdTd1aSQds1fYsH87axWbz8eZXN 4trLC+wW0z78ZLa4vF/bYv6Rc6wWfS8eMltsenyN1eLyrjlsFhNWfWOx6L6+g81i+fF/TBaL tn5ht2jde4TdYuedE8wO/B6Xr3h7bFrVyeZx59oeNo/NS+o9Pj69xeLRt2UVo8fnTXIe7Qe6 mQI4orJtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4BO V1IoS8wpBQoFJBYXK+nb2RTll5akKmTkF5fYKqUWpOQUmBToFSfmFpfmpevlpZZYGRoYGJkC FSZkZ8x9uZ2l4KdiRdumBSwNjGtkuxjZOSQETCT+aXUxcnIICexmlOhaVt7FyAVkf2KUmH/2 MiuE841R4tquy8wgVSD1n3b8YYdI7GWUWNY9gQXCaWGSWLvkJhNIFZuAtsTd6VuYQBIiAs2M Egc7doE5zAI7mSQu/p4ONktYwEfi8dEmVhCbRUBV4sbESYwgNq+AjcSM5jdQ++QlVm84AGRz cHAK2EpMPc0HEZ7JIXH+qgxIWELARWLLIhaIsLDEq+Nb2CFsKYnP7/ayQZR4SCz6IwURzpB4 u3w9I4RtL3HgyhwWkBJmAU2J9bv0QcLMAnwSvb+fMEF08kp0tAlBVKtKNL+7CrVIWmJidzcr hO0hca3vIDSsJjBK7Ji9kGUCo+wshKkLGBlXMUqmFhTnpqcWmxYY5qWWwyMpOT93EyM4NWp5 7mC8++CD3iFGJg7GQ4wSHMxKIrxl82YmCfGmJFZWpRblxxeV5qQWH2I0BYbXRGYp0eR8YHLO K4k3NLE0MDEzMzOxNDYzVBLnFfjfmCQkkJ5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+ybZfUx hwxGQdXrz9uWXH8bsktW5kC1q/qGxbJpDx/5PPlqUH5u7p1JRTxflxnHx60XKHhhapbAZfOu uFvoU/hVMalvQlPP6Ca4nn2j+N6LM7aijyXn2HoXkf2nnRdrrd/Hv5i/V8Zgu5mRvfjmb9pr TjVOuJNz75zrT4OiWrP1AXuvHTA5tu9869Virm1fry9OjmvyPi1Xupz1g82tu2GsMy29HM6c O5P/uucfq9oq3Vf/N2T+M7m0KeDy9CnbPDfOsxacHt4RmHH38ElNvjiXjxP2uq7ID/LyqlFz dNrC5/HWQM9ESemL997Xn82VWIozEg21mIuKEwGrDdaK3gIAAA== X-CMS-MailID: 20220603154857epcas5p4b4684d4400f4ff66f69ff5e288ef635c X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154857epcas5p4b4684d4400f4ff66f69ff5e288ef635c References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Adds support for Tesla Full Self-Driving (FSD) ufs phy driver. This SoC has different cdr lock status offset. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Reviewed-by: Chanho Park --- drivers/phy/samsung/Makefile | 1 + drivers/phy/samsung/phy-fsd-ufs.c | 58 +++++++++++++++++++++++++++ drivers/phy/samsung/phy-samsung-ufs.c | 3 ++ drivers/phy/samsung/phy-samsung-ufs.h | 1 + 4 files changed, 63 insertions(+) create mode 100644 drivers/phy/samsung/phy-fsd-ufs.c diff --git a/drivers/phy/samsung/Makefile b/drivers/phy/samsung/Makefile index 65e4cc59403f..afb34a153e34 100644 --- a/drivers/phy/samsung/Makefile +++ b/drivers/phy/samsung/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_PHY_SAMSUNG_UFS) += phy-exynos-ufs.o phy-exynos-ufs-y += phy-samsung-ufs.o phy-exynos-ufs-y += phy-exynos7-ufs.o phy-exynos-ufs-y += phy-exynosautov9-ufs.o +phy-exynos-ufs-y += phy-fsd-ufs.o obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o phy-exynos-usb2-y += phy-samsung-usb2.o phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o diff --git a/drivers/phy/samsung/phy-fsd-ufs.c b/drivers/phy/samsung/phy-fsd-ufs.c new file mode 100644 index 000000000000..0503625bfcec --- /dev/null +++ b/drivers/phy/samsung/phy-fsd-ufs.c @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * UFS PHY driver data for FSD SoC + * + * Copyright (C) 2022 Samsung Electronics Co., Ltd. + * + */ +#include "phy-samsung-ufs.h" + +#define FSD_EMBEDDED_COMBO_PHY_CTRL 0x724 +#define FSD_EMBEDDED_COMBO_PHY_CTRL_MASK 0x1 +#define FSD_EMBEDDED_COMBO_PHY_CTRL_EN BIT(0) +#define FSD_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS 0x6e + +static const struct samsung_ufs_phy_cfg fsd_pre_init_cfg[] = { + PHY_COMN_REG_CFG(0x00f, 0xfa, PWR_MODE_ANY), + PHY_COMN_REG_CFG(0x010, 0x82, PWR_MODE_ANY), + PHY_COMN_REG_CFG(0x011, 0x1e, PWR_MODE_ANY), + PHY_COMN_REG_CFG(0x017, 0x94, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x035, 0x58, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x036, 0x32, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x037, 0x40, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x03b, 0x83, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x042, 0x88, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x043, 0xa6, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x048, 0x74, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x04c, 0x5b, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x04d, 0x83, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x05c, 0x14, PWR_MODE_ANY), + END_UFS_PHY_CFG +}; + +/* Calibration for HS mode series A/B */ +static const struct samsung_ufs_phy_cfg fsd_pre_pwr_hs_cfg[] = { + END_UFS_PHY_CFG +}; + +/* Calibration for HS mode series A/B atfer PMC */ +static const struct samsung_ufs_phy_cfg fsd_post_pwr_hs_cfg[] = { + END_UFS_PHY_CFG +}; + +static const struct samsung_ufs_phy_cfg *fsd_ufs_phy_cfgs[CFG_TAG_MAX] = { + [CFG_PRE_INIT] = fsd_pre_init_cfg, + [CFG_PRE_PWR_HS] = fsd_pre_pwr_hs_cfg, + [CFG_POST_PWR_HS] = fsd_post_pwr_hs_cfg, +}; + +const struct samsung_ufs_phy_drvdata fsd_ufs_phy = { + .cfg = fsd_ufs_phy_cfgs, + .isol = { + .offset = FSD_EMBEDDED_COMBO_PHY_CTRL, + .mask = FSD_EMBEDDED_COMBO_PHY_CTRL_MASK, + .en = FSD_EMBEDDED_COMBO_PHY_CTRL_EN, + }, + .has_symbol_clk = 0, + .cdr_lock_status_offset = FSD_EMBEDDED_COMBO_PHY_CDR_LOCK_STATUS, +}; diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index 8e5ae228daa7..935c5c7a6d1e 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -351,6 +351,9 @@ static const struct of_device_id samsung_ufs_phy_match[] = { }, { .compatible = "samsung,exynosautov9-ufs-phy", .data = &exynosautov9_ufs_phy, + }, { + .compatible = "tesla,fsd-ufs-phy", + .data = &fsd_ufs_phy, }, {}, }; diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index 965c79bbc278..74b40ef8e1d8 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -142,5 +142,6 @@ static inline void samsung_ufs_phy_ctrl_isol( extern const struct samsung_ufs_phy_drvdata exynos7_ufs_phy; extern const struct samsung_ufs_phy_drvdata exynosautov9_ufs_phy; +extern const struct samsung_ufs_phy_drvdata fsd_ufs_phy; #endif /* _PHY_SAMSUNG_UFS_ */ From patchwork Fri Jun 3 15:47:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578619 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 5D740CCA473 for ; Fri, 3 Jun 2022 15:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343511AbiFCPt0 (ORCPT ); Fri, 3 Jun 2022 11:49:26 -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 S245721AbiFCPtX (ORCPT ); Fri, 3 Jun 2022 11:49:23 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FC4C50B26 for ; Fri, 3 Jun 2022 08:49:07 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220603154905epoutp0313e3c46f1e29882064c5ccb0786caa34~1JwY4hZZf2623126231epoutp03y for ; Fri, 3 Jun 2022 15:49:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220603154905epoutp0313e3c46f1e29882064c5ccb0786caa34~1JwY4hZZf2623126231epoutp03y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271345; bh=0eZm7eKAbkf54yudyV9mqTFcBkeReT2Aou+UZwhcVN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tlj4b76sd8J55xH/wMWNufWvLIdxk2z0qrIvQHfimM9apX8UYa+qyu8RmtM6kdYj1 OZnSUnEp4RLUX0SJ6xD9zUabC3iSG0GBZldHUzyYJRWdqox6vDdoc6UukkhavNzMUV 4WX+0FW+k9ksgdWTPetGhJO/nVmovpgaJC0g4D6w= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220603154904epcas5p2979d3468e3f5722384d8a0d59fb47bb0~1JwXqZB221440614406epcas5p2K; Fri, 3 Jun 2022 15:49:04 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.175]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4LF6kP70bnz4x9Pt; Fri, 3 Jun 2022 15:49:01 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 6F.A8.10063.D6D2A926; Sat, 4 Jun 2022 00:49:01 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20220603154900epcas5p3380c14eb436089205a8a58a6af6ce3e6~1JwULPjUL2016420164epcas5p3S; Fri, 3 Jun 2022 15:49:00 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220603154900epsmtrp14c3dfd9989da7119a323d6fd7cffae8f~1JwUJDn8x2840828408epsmtrp1O; Fri, 3 Jun 2022 15:49:00 +0000 (GMT) X-AuditID: b6c32a49-4b5ff7000000274f-48-629a2d6d8e8b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F5.6C.11276.C6D2A926; Sat, 4 Jun 2022 00:49:00 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154858epsmtip1b9be119c1d9906619487870f9194c2a2~1JwRuFKai2494124941epsmtip1I; Fri, 3 Jun 2022 15:48:57 +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 4/7] dt-bindings: ufs: exynos-ufs: add fsd compatible Date: Fri, 3 Jun 2022 21:17:11 +0530 Message-Id: <20220603154714.30532-5-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+LIzCtJLcpLzFFi42LZdlhTXTdXd1aSwYt/5hYP5m1js3j58yqb xbWXF9gtpn34yWxxeb+2xfwj51gt+l48ZLbY9Pgaq8XlXXPYLCas+sZi0X19B5vF8uP/mCwW bf3CbtG69wi7xc47J5gd+D0uX/H22LSqk83jzrU9bB6bl9R7fHx6i8Wjb8sqRo/Pm+Q82g90 MwVwRGXbZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gCd rqRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUotSMkpMCnQK07MLS7NS9fLSy2xMjQwMDIF KkzIzrh8ci5jwVW2ig8z+lkbGG+ydjFycEgImEh0znHvYuTiEBLYzSix5/QfFgjnE6PEnGfn WSGcb4wSWx69Z+ti5ATrmHn1KTNEYi+jxISmW1BOC5PEsY2/WUCq2AS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uHxyLmPBVbaKDzP6WRsYb7J2MXJySAiYSMy8+pS5i5GLQ0hg N6PEulXzmSES0hLXN05gh7CFJVb+e84OUdTEJPHiex8LSIJNQFvi7vQtTCC2iEA7o8T97Wwg RcwCR5kklp86BjZJWMBD4tm6LiCbg4NFQFXi7xYfkDCvgI3Ez/NX2CAWyEus3nAArIRTwFZi 6mk+kLAQUMn38/dZJzDyLWBkWMUomVpQnJueW2xYYJiXWq5XnJhbXJqXrpecn7uJERzcWpo7 GLev+qB3iJGJg/EQowQHs5IIb9m8mUlCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhP LEnNTk0tSC2CyTJxcEo1MO3mXr13a+bCWtMZyWL8Das65h9JvMj0f0ZZw+rOXwxRTHUp86ap cCn1xb0o8lqw9Inl+kUe81PY56zdrXr6Ud2kmV0PNRcdYjJbwenZ5fJBMOvNpqCd7OsjU0wC bM/Pm8ptdejB8VliH8P/7GB47XN2ko3qU66nsqHfNi993zrvng6Hxu0vZceVw5QUMmPs91nN b+KxEr4zMWyqkeu7/t6MPayJgXUn+58vDGTSqlpQvvvMJs7l2ySDwjNUnuw6IdgZEN/1PeXo TO9FqTMm6r/OzL1wej9jrdruP4Uh5zSPLl9zXLCY47H3JzftN52Pq/7NtJ2Rv/WEktmOeWuL eGYad2wXNPmar/ysanfsHRMlluKMREMt5qLiRACx1kbg3QIAAA== X-CMS-MailID: 20220603154900epcas5p3380c14eb436089205a8a58a6af6ce3e6 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154900epcas5p3380c14eb436089205a8a58a6af6ce3e6 References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Adds tesla,fsd-ufs compatible for Tesla FSD SoC. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml index c949eb617313..2c715eec48b8 100644 --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml @@ -21,6 +21,7 @@ properties: - samsung,exynos7-ufs - samsung,exynosautov9-ufs - samsung,exynosautov9-ufs-vh + - tesla,fsd-ufs reg: items: From patchwork Fri Jun 3 15:47:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578847 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 E5DC8C433EF for ; Fri, 3 Jun 2022 15:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245714AbiFCPt2 (ORCPT ); Fri, 3 Jun 2022 11:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245734AbiFCPtY (ORCPT ); Fri, 3 Jun 2022 11:49:24 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38AF450E00 for ; Fri, 3 Jun 2022 08:49:10 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220603154908epoutp02cab2203033d199b420b6f1f048708401~1JwbiJ4NI1756717567epoutp02W for ; Fri, 3 Jun 2022 15:49:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220603154908epoutp02cab2203033d199b420b6f1f048708401~1JwbiJ4NI1756717567epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271348; bh=wBz3WyDv6QKq3q350/xaW+hbym69+M1flHfWWIhawTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4v7qPt839toWdjDyMry46VV1DZ3vxPVUYb7frPmtqUjhjm6+etRWTr/nDB/Dmkuz 2v5Gb2DGWPlk1L18hOwMS2RL8wiHnD+vhAMq5Bd1o3ksgCa58vMLBJMUoDzgGYFKJl AS1enzBHCCHAIGmP5Kizd6c+nsRc9XG8QrtGTwLQ= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20220603154908epcas5p3417691c5148eb2f866666e56cff9f1c6~1JwbBGkc51875418754epcas5p3r; Fri, 3 Jun 2022 15:49:08 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.181]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4LF6kT4kR5z4x9Pt; Fri, 3 Jun 2022 15:49:05 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 61.B8.10063.17D2A926; Sat, 4 Jun 2022 00:49:05 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220603154904epcas5p21615dfab6f57f563889230c81a717835~1JwXhOyiV1442914429epcas5p2W; Fri, 3 Jun 2022 15:49:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220603154904epsmtrp14a825d285599b92f7570e8c37be5ed32~1JwXgZaEM2840728407epsmtrp1S; Fri, 3 Jun 2022 15:49:04 +0000 (GMT) X-AuditID: b6c32a49-4cbff7000000274f-53-629a2d71d4aa Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 47.6C.11276.07D2A926; Sat, 4 Jun 2022 00:49:04 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154901epsmtip1e8aa68a0a95f4e58b580484f51bb73a1~1JwVV-0cp0345503455epsmtip1J; Fri, 3 Jun 2022 15:49:01 +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 Subject: [PATCH v2 5/7] ufs: ufs-exynos: add mphy apb clock mask Date: Fri, 3 Jun 2022 21:17:12 +0530 Message-Id: <20220603154714.30532-6-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+NgFmpgk+LIzCtJLcpLzFFi42LZdlhTQ7dQd1aSwZQNKhYP5m1js3j58yqb xbQPP5ktLu/Xtph/5ByrRd+Lh8wWmx5fY7W4vGsOm8WEVd9YLLqv72CzWH78H5PFoq1f2C1a 9x5ht9h55wSzA5/H5SveHptWdbJ53Lm2h81j85J6j49Pb7F49G1ZxejxeZOcR/uBbqYAjqhs m4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zBygq5UUyhJz SoFCAYnFxUr6djZF+aUlqQoZ+cUltkqpBSk5BSYFesWJucWleel6eaklVoYGBkamQIUJ2Rnd W9ayFrxmr3i8aC5bA+MJti5GTg4JAROJL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5SveHptWdbJ53Lm2h81j85J6j49Pb7F49G1ZxejxeZOcR/uBbqYAjigu m5TUnMyy1CJ9uwSujO4ta1kLXrNXPF40l62B8QRbFyMnh4SAicT1a/vYuxi5OIQEdjNKbLvT zAiRkJa4vnECO4QtLLHy33OooiYmie9P97KAJNgEtCXuTt/CBGKLCLQzStzfzgZSxCwwi0ni /aQnYJOEBRwlzj/7CFbEIqAqsWDOH7A4r4CNxOKFz6A2yEus3nCAuYuRg4NTwFZi6mk+kLAQ UMn38/dZJzDyLWBkWMUomVpQnJueW2xYYJiXWq5XnJhbXJqXrpecn7uJERzUWpo7GLev+qB3 iJGJg/EQowQHs5IIb9m8mUlCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhPLEnNTk0t SC2CyTJxcEo1MIl9MwxYFhowXeQToztLawf7m7vGm34f8jA8ly8gbjzT8V/evr/i7ue9fjh9 nFtqf7gwI//kbMm5bz2uXpmnEmsoKlLtUvZjzWfJKY1vn+52611xUHtimbeY1JJ5fYe0VF+t XfWZeV/QqwOJZ7rzuH81BJZPtTNIf8m/x1AheUrsm9oDOxk4onZ9ntxQNVNifzUnp75Xzyoe fcej604k7GswSDQ8+EDUvWFxONfHy3PfhxTb6z8SUK/ZW2PS/iDe0PnI5JhPJ8K2a4dYLVuX tchzreSf+U/rKvfH/7FR+Kr91rTq5aRSXq/zK/Ni33OIJxyZfnZ7gmrz+/4jivHTfy66eTWk b2rEysdLBERmtiuxFGckGmoxFxUnAgAenjyF2QIAAA== X-CMS-MailID: 20220603154904epcas5p21615dfab6f57f563889230c81a717835 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154904epcas5p21615dfab6f57f563889230c81a717835 References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Bit[3] of HCI_CLKSTOP_CTRL register is for enabling/disabling MPHY APB clock. Lets add it to CLK_STOP_MASK, so that the same can be controlled during clock masking/unmasking. Signed-off-by: Alim Akhtar Reviewed-by: Chanho Park Tested-by: Chanho Park --- drivers/ufs/host/ufs-exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index a81d8cbd542f..cc128aff8871 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -52,11 +52,12 @@ #define HCI_ERR_EN_DME_LAYER 0x88 #define HCI_CLKSTOP_CTRL 0xB0 #define REFCLKOUT_STOP BIT(4) +#define MPHY_APBCLK_STOP BIT(3) #define REFCLK_STOP BIT(2) #define UNIPRO_MCLK_STOP BIT(1) #define UNIPRO_PCLK_STOP BIT(0) #define CLK_STOP_MASK (REFCLKOUT_STOP | REFCLK_STOP |\ - UNIPRO_MCLK_STOP |\ + UNIPRO_MCLK_STOP | MPHY_APBCLK_STOP|\ UNIPRO_PCLK_STOP) #define HCI_MISC 0xB4 #define REFCLK_CTRL_EN BIT(7) From patchwork Fri Jun 3 15:47:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 578618 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 88E82C433EF for ; Fri, 3 Jun 2022 15:49:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245719AbiFCPt3 (ORCPT ); Fri, 3 Jun 2022 11:49:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245715AbiFCPtY (ORCPT ); Fri, 3 Jun 2022 11:49:24 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27BA50B04 for ; Fri, 3 Jun 2022 08:49:13 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220603154912epoutp0490e083cf6d57426b420ab7ebbd7c8808~1Jwe3RiH10048500485epoutp04Q for ; Fri, 3 Jun 2022 15:49:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220603154912epoutp0490e083cf6d57426b420ab7ebbd7c8808~1Jwe3RiH10048500485epoutp04Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654271352; bh=nAAdczoptIQX9J/30j3O2d4sDcZFY4mw+TnQRCYPCGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQF4GV+641u/Rm8bqquZvCr0V066I2mZtCOu7wgRQmlaHYx8QH+aokGgngqcHn6z1 vGsvSNGIG/tBu1z6JUAABgiEf8wm9wWNDjFadbGxSMurOaFioeqXyCE2Qismzi8Nm3 zMKrzLWCovK8Fv2XMSeXDgaF7CyWAOCrhhInHaiI= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20220603154910epcas5p148d91669558e981151e3073abb8ac73b~1JwdfiJKn1786817868epcas5p1B; Fri, 3 Jun 2022 15:49:10 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.175]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4LF6kX1Kygz4x9Pq; Fri, 3 Jun 2022 15:49:08 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 52.B8.10063.47D2A926; Sat, 4 Jun 2022 00:49:08 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20220603154907epcas5p40d236cecf8d4a574d44d9a2b66f2caf0~1Jwar-PMu1859418594epcas5p4Y; Fri, 3 Jun 2022 15:49:07 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220603154907epsmtrp20192da1fc3c1e4f53f71341803909d33~1JwarMSwc0407504075epsmtrp2t; Fri, 3 Jun 2022 15:49:07 +0000 (GMT) X-AuditID: b6c32a49-4b5ff7000000274f-56-629a2d74d45a Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 78.6C.11276.37D2A926; Sat, 4 Jun 2022 00:49:07 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220603154905epsmtip17439279bb49f8fbbb6e799414e436980~1JwYkBDnR2493724937epsmtip1V; Fri, 3 Jun 2022 15:49:05 +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 6/7] ufs: host: ufs-exynos: add support for fsd ufs hci Date: Fri, 3 Jun 2022 21:17:13 +0530 Message-Id: <20220603154714.30532-7-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+NgFmplk+LIzCtJLcpLzFFi42LZdlhTU7dEd1aSwdEfLBYP5m1js3j58yqb xbWXF9gtpn34yW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20+rJ/pU9ETb5S7I8eCacOH8 /4gSzU+7POVC5bNYi0013ymxFGckGmoxFxUnAgBxxtpR3QIAAA== X-CMS-MailID: 20220603154907epcas5p40d236cecf8d4a574d44d9a2b66f2caf0 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220603154907epcas5p40d236cecf8d4a574d44d9a2b66f2caf0 References: <20220603154714.30532-1-alim.akhtar@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Adds support of UFS HCI which is found in Tesla Full Self-Driving (FSD) SoC. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar --- drivers/ufs/host/ufs-exynos.c | 138 ++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index cc128aff8871..7e0ab8a8662e 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1474,6 +1474,102 @@ static int exynosauto_ufs_vh_init(struct ufs_hba *hba) return 0; } +static int fsd_ufs_pre_link(struct exynos_ufs *ufs) +{ + int i; + struct ufs_hba *hba = ufs->hba; + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9514), 1000000000L / ufs->mclk_rate); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x201), 0x12); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x40); + + for_each_ufs_tx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xAA, i), 1000000000L / ufs->mclk_rate); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x8F, i), 0x3F); + } + + for_each_ufs_rx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x12, i), 1000000000L / ufs->mclk_rate); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x5C, i), 0x38); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x0F, i), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x65, i), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x69, i), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x21, i), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x22, i), 0x0); + } + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9536), 0x4E20); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9564), 0x2e820183); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0x0); + + exynos_ufs_establish_connt(ufs); + + return 0; +} + +static int fsd_ufs_post_link(struct exynos_ufs *ufs) +{ + int i; + struct ufs_hba *hba = ufs->hba; + u32 hw_cap_min_tactivate; + u32 peer_rx_min_actv_time_cap; + u32 max_rx_hibern8_time_cap; + + ufshcd_dme_get(hba, UIC_ARG_MIB_SEL(0x8F, 4), + &hw_cap_min_tactivate); /* HW Capability of MIN_TACTIVATE */ + ufshcd_dme_get(hba, UIC_ARG_MIB(0x15A8), + &peer_rx_min_actv_time_cap); /* PA_TActivate */ + ufshcd_dme_get(hba, UIC_ARG_MIB(0x15A7), + &max_rx_hibern8_time_cap); /* PA_Hibern8Time */ + + if (peer_rx_min_actv_time_cap >= hw_cap_min_tactivate) + ufshcd_dme_peer_set(hba, UIC_ARG_MIB(0x15A8), + peer_rx_min_actv_time_cap + 1); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x15A7), max_rx_hibern8_time_cap + 1); + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9529), 0x01); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x15A4), 0xFA); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9529), 0x00); + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x40); + + for_each_ufs_rx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x35, i), 0x05); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x73, i), 0x01); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x41, i), 0x02); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x42, i), 0xAC); + } + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x0); + + return 0; +} + +static int fsd_ufs_pre_pwr_change(struct exynos_ufs *ufs, + struct ufs_pa_layer_attr *pwr) +{ + struct ufs_hba *hba = ufs->hba; + + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXTERMINATION), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_RXTERMINATION), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_FC0PROTTIMEOUTVAL), 8064); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_TC0REPLAYTIMEOUTVAL), 28224); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_AFC0REQTIMEOUTVAL), 20160); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), 12000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), 32000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), 16000); + + unipro_writel(ufs, 8064, 0x7888); + unipro_writel(ufs, 28224, 0x788C); + unipro_writel(ufs, 20160, 0x7890); + unipro_writel(ufs, 12000, 0x78B8); + unipro_writel(ufs, 32000, 0x78BC); + unipro_writel(ufs, 16000, 0x78C0); + + return 0; +} + static struct ufs_hba_variant_ops ufs_hba_exynos_ops = { .name = "exynos_ufs", .init = exynos_ufs_init, @@ -1596,6 +1692,46 @@ static struct exynos_ufs_drv_data exynos_ufs_drvs = { .post_pwr_change = exynos7_ufs_post_pwr_change, }; +static struct exynos_ufs_uic_attr fsd_uic_attr = { + .tx_trailingclks = 0x10, + .tx_dif_p_nsec = 3000000, /* unit: ns */ + .tx_dif_n_nsec = 1000000, /* unit: ns */ + .tx_high_z_cnt_nsec = 20000, /* unit: ns */ + .tx_base_unit_nsec = 100000, /* unit: ns */ + .tx_gran_unit_nsec = 4000, /* unit: ns */ + .tx_sleep_cnt = 1000, /* unit: ns */ + .tx_min_activatetime = 0xa, + .rx_filler_enable = 0x2, + .rx_dif_p_nsec = 1000000, /* unit: ns */ + .rx_hibern8_wait_nsec = 4000000, /* unit: ns */ + .rx_base_unit_nsec = 100000, /* unit: ns */ + .rx_gran_unit_nsec = 4000, /* unit: ns */ + .rx_sleep_cnt = 1280, /* unit: ns */ + .rx_stall_cnt = 320, /* unit: ns */ + .rx_hs_g1_sync_len_cap = SYNC_LEN_COARSE(0xf), + .rx_hs_g2_sync_len_cap = SYNC_LEN_COARSE(0xf), + .rx_hs_g3_sync_len_cap = SYNC_LEN_COARSE(0xf), + .rx_hs_g1_prep_sync_len_cap = PREP_LEN(0xf), + .rx_hs_g2_prep_sync_len_cap = PREP_LEN(0xf), + .rx_hs_g3_prep_sync_len_cap = PREP_LEN(0xf), + .pa_dbg_option_suite = 0x2E820183, +}; + +struct exynos_ufs_drv_data fsd_ufs_drvs = { + .uic_attr = &fsd_uic_attr, + .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | + UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR | + UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR | + UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR, + .opts = EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL | + EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | + EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | + EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX, + .pre_link = fsd_ufs_pre_link, + .post_link = fsd_ufs_post_link, + .pre_pwr_change = fsd_ufs_pre_pwr_change, +}; + static const struct of_device_id exynos_ufs_of_match[] = { { .compatible = "samsung,exynos7-ufs", .data = &exynos_ufs_drvs }, @@ -1603,6 +1739,8 @@ static const struct of_device_id exynos_ufs_of_match[] = { .data = &exynosauto_ufs_drvs }, { .compatible = "samsung,exynosautov9-ufs-vh", .data = &exynosauto_ufs_vh_drvs }, + { .compatible = "tesla,fsd-ufs", + .data = &fsd_ufs_drvs }, {}, }; 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 wY5dYA6zwE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wl3MXJySAiYSKz5sZ61i5GLQ0hg B6PEn82v2CES0hLXN06AsoUlVv57DmYLCTQxSbS+EAGx2QS0Je5O38IEYosItDNK3N/OBjKI WeAok8TyU8eYQRLCAjYSL1f8YASxWQRUJVac2QfWwAsUP/v7KxvEAnmJ1RsOANVzcHAK2EpM 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"; + }; }; };