From patchwork Tue Jul 6 02:18:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12359693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 490FDC07E99 for ; Tue, 6 Jul 2021 02:18:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0814A6196A for ; Tue, 6 Jul 2021 02:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0814A6196A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eRDfUcLO+i+OPg6qcBRBU4mzfpeUZGD+kZfS4j+1Vs0=; b=UrWgo8wWb571uf DIVCdOTwO9vfm3K5AUL2a+iBGCQ1olM3J5yVomw3Wxwg8baFuH2bVlG0S7dc+WuK196fABnPod+h7 65VWOtoXaZva3vWATNh1VlrJ3yjksNgFZ/afr1U403alwJuIun3X7X/t1y4DO8RHEIYYoHTJAnc2U m5qEwS8mXm7m9Vosxx9BrAMZl/2Lekyhxyysq/Nn9p/Mz/SMuoHviEAvaudMjUkQjuzznJ7veVUCx 5Fbv7ls8iYN2fmS5EO55b0Yq85ueQogO4vlwKQnZ/OPGCfhzg4EfcRFyGnzQP5x0ni2I+hUMLhBC1 YBS7CKOCZ16jy3SqfcOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0afC-00A9V6-IY; Tue, 06 Jul 2021 02:18:18 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0af8-00A9UP-UA for linux-phy@lists.infradead.org; Tue, 06 Jul 2021 02:18:16 +0000 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210706021810epoutp012895124a499cc40186bd7c73b893da61~PEhlq7_dd0523805238epoutp01h for ; Tue, 6 Jul 2021 02:18:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210706021810epoutp012895124a499cc40186bd7c73b893da61~PEhlq7_dd0523805238epoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1625537890; bh=V5o/CnhXRprqiDRSQ2H/8ZGTxDY3PiAh+858hlnyCKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cLTEH2Km/4Aubvo7ZHGYlxyIHamI/Rqqh8h5mDQ6Epcj3Cgp/Y0z25uWBmpvnMCNU oRvDEp8EVpvwMRTkzH3BiC4xAtLekb/L6/oXkOAze/XqUAPiClZKW2ilf1TgriL8ZZ pKa5t/oVZqI4uS/lcGcrmZzjhurgQzgSKZPQ5WxA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210706021810epcas2p32047b37986ccf9f01e3a9727c8a30b09~PEhlKGjhR3099430994epcas2p3M; Tue, 6 Jul 2021 02:18:10 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.189]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4GJmS02Rmzz4x9Q1; Tue, 6 Jul 2021 02:18:08 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 1D.AD.09541.D5DB3E06; Tue, 6 Jul 2021 11:18:05 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210706021804epcas2p1d99074348847a8afe173bdcf80eeac76~PEhgGgl9L1789217892epcas2p1c; Tue, 6 Jul 2021 02:18:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210706021804epsmtrp116eb73983974d7bb0b3601259ba3668a~PEhgFwfrw0542505425epsmtrp1c; Tue, 6 Jul 2021 02:18:04 +0000 (GMT) X-AuditID: b6c32a47-ba108a8000002545-62-60e3bd5d7a53 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 1C.B6.08394.C5DB3E06; Tue, 6 Jul 2021 11:18:04 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210706021804epsmtip139d9a4c54c4055a359f22402e3a4dc42~PEhf5Ax3Q2230822308epsmtip1b; Tue, 6 Jul 2021 02:18:04 +0000 (GMT) From: Chanho Park To: Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski Cc: Marek Szyprowski , Jaehoon Chung , Alim Akhtar , linux-phy@lists.infradead.org, Chanho Park , Krzysztof Kozlowski Subject: [PATCH v3 1/2] phy: samsung-ufs: move phy-exynos7-ufs header Date: Tue, 6 Jul 2021 11:18:03 +0900 Message-Id: <20210706021804.12890-2-chanho61.park@samsung.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210706021804.12890-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKJsWRmVeSWpSXmKPExsWy7bCmmW7s3scJBmv+CVk8mLeNzeLyfm2L G7/aWC0uPO1hszh/fgO7xca3P5gsJqz6xmKx9shddoudd04wO3B6zGroZfPYtKqTzWPzknqP vi2rGD2O39jOFMAalWOTkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk 4hOg65aZA3SPkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafA0LBArzgxt7g0L10v OT/XytDAwMgUqDIhJ2P5w9ssBfMlKx697mVqYNwl2sXIySEhYCLR+LaNGcQWEtjBKPHuR2oX IxeQ/YlRYtHaN6wQzjdGiQNnj7LBdDx68ZYFIrGXUWLiuXWMEM5HRomX3++wglSxCehKbHn+ ihHEFhEokvi09iETiM0s0MokceRmOIgtLOAqcfrWN7B6FgFViUlPdoDZvAJ2EreenGGG2CYv cWrZQbBeTgF7ib+ty5ghagQlTs58wgIxU16ieetsZpAjJAR+sktceHUTaBAHkOMisWBhEMQc YYlXx7ewQ9hSEi/729gh6rsZJVof/YdKrGaU6Gz0gbDtJX5N3wI2h1lAU2L9Ln2IkcoSR25B reWT6Dj8lx0izCvR0SYE0agucWD7dBYIW1aie85nVgjbQ6Lz0i9oUE1ilLj87A/zBEaFWUi+ mYXkm1kIixcwMq9iFEstKM5NTy02KjBGjuBNjOD0q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TUwtSi2CyTBycUg1MS+ZV+t7f Jnow94K6/xvf1kDJN+syrQ98nftu52rBHflnnxyZkfpj5jLp0OeuP75a9SZn2DHadTM1Nkha ly9Urbdc1jCtlXMHo/Wh7B18JmZT9QtsvRdW7jwRwcfrEsOlV/Azs+fx/u9XH3J7R5XwLWTl MnN6HKuxeFXVpfs3j9hqzJVU8sv50+Zw+HlibNm6R/vfP3qT+KWoxr0w+f+kybpnfEv6mi1m 6L7htZhzr9pQ1e5Vv5H8nu2Pu/cc068NVndZG6R65KyP4ckGTZ6WbSaiaScWxxSuK3i1+dLX 8v0RT6+t7mRK+no8QI2hY8rr/b0eu4zij3K5Vs4IYj2R7fWracuCLJUtPsdP5+1WYinOSDTU Yi4qTgQAq4yvm+MCAAA= X-CMS-MailID: 20210706021804epcas2p1d99074348847a8afe173bdcf80eeac76 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210706021804epcas2p1d99074348847a8afe173bdcf80eeac76 References: <20210706021804.12890-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210705_191815_367726_594D7609 X-CRM114-Status: GOOD ( 18.49 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Instead of using exynos7 ufs definition in phy-exynos7-ufs.h, we should put it into phy-exynos7-ufs.c to be included different objects or units. Suggested-by: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/phy/samsung/Makefile | 3 ++- .../samsung/{phy-exynos7-ufs.h => phy-exynos7-ufs.c} | 11 +++++------ drivers/phy/samsung/phy-samsung-ufs.h | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) rename drivers/phy/samsung/{phy-exynos7-ufs.h => phy-exynos7-ufs.c} (93%) diff --git a/drivers/phy/samsung/Makefile b/drivers/phy/samsung/Makefile index 3959100fe8a2..d55d9aa5b932 100644 --- a/drivers/phy/samsung/Makefile +++ b/drivers/phy/samsung/Makefile @@ -2,7 +2,8 @@ obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o obj-$(CONFIG_PHY_EXYNOS_PCIE) += phy-exynos-pcie.o -obj-$(CONFIG_PHY_SAMSUNG_UFS) += phy-samsung-ufs.o +obj-$(CONFIG_PHY_SAMSUNG_UFS) += phy-samsung-ufs.o \ + phy-exynos7-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-exynos7-ufs.h b/drivers/phy/samsung/phy-exynos7-ufs.c similarity index 93% rename from drivers/phy/samsung/phy-exynos7-ufs.h rename to drivers/phy/samsung/phy-exynos7-ufs.c index 518923141958..657b58319c14 100644 --- a/drivers/phy/samsung/phy-exynos7-ufs.h +++ b/drivers/phy/samsung/phy-exynos7-ufs.c @@ -1,11 +1,12 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ +// SPDX-License-Identifier: GPL-2.0-only /* * UFS PHY driver data for Samsung EXYNOS7 SoC * * Copyright (C) 2020 Samsung Electronics Co., Ltd. */ -#ifndef _PHY_EXYNOS7_UFS_H_ -#define _PHY_EXYNOS7_UFS_H_ + +#include +#include #include "phy-samsung-ufs.h" @@ -68,7 +69,7 @@ static const struct samsung_ufs_phy_cfg *exynos7_ufs_phy_cfgs[CFG_TAG_MAX] = { [CFG_POST_PWR_HS] = exynos7_post_pwr_hs_cfg, }; -static struct samsung_ufs_phy_drvdata exynos7_ufs_phy = { +const struct samsung_ufs_phy_drvdata exynos7_ufs_phy = { .cfg = exynos7_ufs_phy_cfgs, .isol = { .offset = EXYNOS7_EMBEDDED_COMBO_PHY_CTRL, @@ -77,5 +78,3 @@ static struct samsung_ufs_phy_drvdata exynos7_ufs_phy = { }, .has_symbol_clk = 1, }; - -#endif /* _PHY_EXYNOS7_UFS_H_ */ diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index 5de78710524c..1532d239ff0e 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -10,6 +10,8 @@ #ifndef _PHY_SAMSUNG_UFS_ #define _PHY_SAMSUNG_UFS_ +#include + #define PHY_COMN_BLK 1 #define PHY_TRSV_BLK 2 #define END_UFS_PHY_CFG { 0 } @@ -134,6 +136,6 @@ static inline void samsung_ufs_phy_ctrl_isol( phy->isol->mask, isol ? 0 : phy->isol->en); } -#include "phy-exynos7-ufs.h" +extern const struct samsung_ufs_phy_drvdata exynos7_ufs_phy; #endif /* _PHY_SAMSUNG_UFS_ */ From patchwork Tue Jul 6 02:18:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12359695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67487C07E9C for ; Tue, 6 Jul 2021 02:18:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2547B61986 for ; Tue, 6 Jul 2021 02:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2547B61986 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KvQT8zi2hIFbxrJl7bP4p11aC4DBef4kxrsOZ/DoZuk=; b=ycQKZIFVMpNzaE wYURAjo38ZT7fyWlWNBy0Qg5ZPKM4NSWz3zW4HM5CyJyEbPaB+pXbE2Zhxf0YbxgvX5h1BAyQu14B XvVr3wuMzcqB3GtGmvJmqxzi+CsPqAqyir/BSF41D7K0r5Qiai+BO19jfODNTThrGxuw/fIdYTTVv FbxVwCbk6AQAfJEgQ/AYaUb9sATGfjfAnTOvPlpaRRfjqdJiYucJcXxvF9XYS+A15V1tF1UtCF9Fv l31i4x80UKv3kEKPqmokOex+0ytvzs1zPZzqB9yfqAt1QO9VWwumG94Zaov+kar3y8pwyCGettPJT ZAeLej/hDnoXtJJgaqGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0afC-00A9VB-MC; Tue, 06 Jul 2021 02:18:18 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0af8-00A9UT-U9 for linux-phy@lists.infradead.org; Tue, 06 Jul 2021 02:18:16 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210706021812epoutp01bd8ad6f1522ea7cf1855464e71f8a261~PEhm5XZ_U0449204492epoutp01g for ; Tue, 6 Jul 2021 02:18:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210706021812epoutp01bd8ad6f1522ea7cf1855464e71f8a261~PEhm5XZ_U0449204492epoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1625537892; bh=efiXP1NMxb9SVrBqOqZeS3M5sr5Wkjbd/KGQBV8xxpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o5b0zFvZVDjBvTcLkNGr9pqnuA8MFeAswl6/rFj/GXDA7syNnbbLo8UJgmZK2F/5R JBWAK2XVEYlgJw6N0edPcL+fADrPpWp1HfGFpVksrHrJbB23BTHB5LEPcUpmo0i/kf ByhmBG1s0FLV+JueOHaAK6iX7lh8j3qcdWfF6q24= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210706021811epcas2p2bd226db12598d374297c45de9c248232~PEhmgv8Kg3129031290epcas2p2v; Tue, 6 Jul 2021 02:18:11 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.190]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4GJmS13M56z4x9Q7; Tue, 6 Jul 2021 02:18:09 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id D5.BD.09541.D5DB3E06; Tue, 6 Jul 2021 11:18:05 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210706021805epcas2p41840eeb633ef30a5f0812862cb4df174~PEhgwgoqL3180531805epcas2p4p; Tue, 6 Jul 2021 02:18:05 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210706021805epsmtrp2e9f427c67988d7c6061abcc8589af4ba~PEhgvf0ER1277512775epsmtrp2Q; Tue, 6 Jul 2021 02:18:05 +0000 (GMT) X-AuditID: b6c32a47-ba108a8000002545-69-60e3bd5de52b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 1D.B6.08394.D5DB3E06; Tue, 6 Jul 2021 11:18:05 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210706021805epsmtip17e381d2e717fb5f203f603d12b7e8ca7~PEhgfngU32215522155epsmtip1h; Tue, 6 Jul 2021 02:18:05 +0000 (GMT) From: Chanho Park To: Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski Cc: Marek Szyprowski , Jaehoon Chung , Alim Akhtar , linux-phy@lists.infradead.org, Chanho Park Subject: [PATCH v3 2/2] phy: samsung-ufs: support exynosauto ufs phy driver Date: Tue, 6 Jul 2021 11:18:04 +0900 Message-Id: <20210706021804.12890-3-chanho61.park@samsung.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210706021804.12890-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZdljTTDd27+MEg+4uM4sH87axWVzer21x 41cbq8WFpz1sFufPb2C3mLDqG4vF2iN32S123jnB7MDhsWlVJ5vH5iX1Hn1bVjF6HL+xnS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LKp2+bqN7/4x5wCOryITKz7wpCry+ V1oCBA7oH1yuxFKckWioxVxUnAgAVFOT8B8EAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsWy7bCSnG7s3scJBg9uiVo8mLeNzeLyfm2L G7/aWC0uPO1hszh/fgO7xYRV31gs1h65y26x884JZgcOj02rOtk8Ni+p9+jbsorR4/iN7UwB LFFcNimpOZllqUX6dglcGfePsxRM1q+41bKZvYFxhUYXIyeHhICJxJQTM9lBbCGB3YwSPZtZ IOKyEs/e7WCHsIUl7rccYYWoec8o0fTIDMRmE9CV2PL8FSOILSJQInF99l/mLkYuDmaBc4wS l68/ZQNJCAt4S7zc2go2lEVAVeLup3Ngg3gF7CQmnpnDCLFAXuLUsoNMIDangL3E39ZlzBDL 7CTeTn3CBlEvKHFy5hOwOcxA9c1bZzNPYBSYhSQ1C0lqASPTKkbJ1ILi3PTcYsMCw7zUcr3i xNzi0rx0veT83E2M4IDW0tzBuH3VB71DjEwcjIcYJTiYlUR4RaY8ShDiTUmsrEotyo8vKs1J LT7EKM3BoiTOe6HrZLyQQHpiSWp2ampBahFMlomDU6qBKf7HuZf7c8rCs48rH1c6JTdvtYMI q1rwrmVHJGdFi7IU+d507Y+W316xomLxbZd+zbW/BPIin5RpL3htPYGheGFRT35w+lXhQKnd 2Rl+lZseCed0Sjdo2z6tZHzJe+OfwG7Pnw9N3eyF/p0/fozJ6M4z4WaBBdx7f0ive9R4+cVu wxVNnCmNpx3qP+7O4lBsPPT2xp8167beOXj35eMujQMl7F7zeK0rvi+fWBUSo3n+oYFXwaoP FazrX1cn8L2IKng5K0D5Rnme0Tyhq4LX7t/a8eZz1uUDnJz+s9ZtOCLaXJWlv/fhFUWP8v7j 9W+VZif1FKzZZlAxp8qNd+HytGmaZ8r8TulJPClfqb5lmxJLcUaioRZzUXEiAKGz3SbXAgAA X-CMS-MailID: 20210706021805epcas2p41840eeb633ef30a5f0812862cb4df174 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210706021805epcas2p41840eeb633ef30a5f0812862cb4df174 References: <20210706021804.12890-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210705_191815_336150_EC12E266 X-CRM114-Status: GOOD ( 24.55 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This patch adds to support phy-exynosautov9-ufs driver for ExynosAuto v9 series SoCs. The patch adds "samsung,exynosautov9-ufs-phy" compatible. Unlike previous exynos ufs phy, the chip uses 0x50 offset as PHY_TRSV_REG_CFG_OFFSET. Signed-off-by: Chanho Park --- .../bindings/phy/samsung,ufs-phy.yaml | 1 + drivers/phy/samsung/Makefile | 3 +- drivers/phy/samsung/phy-exynosautov9-ufs.c | 70 +++++++++++++++++++ drivers/phy/samsung/phy-samsung-ufs.c | 3 + drivers/phy/samsung/phy-samsung-ufs.h | 8 ++- 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 drivers/phy/samsung/phy-exynosautov9-ufs.c diff --git a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml index 636cc501b54f..f6ed1a005e7a 100644 --- a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml @@ -16,6 +16,7 @@ properties: compatible: enum: - samsung,exynos7-ufs-phy + - samsung,exynosautov9-ufs-phy reg: maxItems: 1 diff --git a/drivers/phy/samsung/Makefile b/drivers/phy/samsung/Makefile index d55d9aa5b932..ab87b71cd90f 100644 --- a/drivers/phy/samsung/Makefile +++ b/drivers/phy/samsung/Makefile @@ -3,7 +3,8 @@ obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o obj-$(CONFIG_PHY_EXYNOS_PCIE) += phy-exynos-pcie.o obj-$(CONFIG_PHY_SAMSUNG_UFS) += phy-samsung-ufs.o \ - phy-exynos7-ufs.o + phy-exynos7-ufs.o \ + phy-exynosautov9-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-exynosautov9-ufs.c b/drivers/phy/samsung/phy-exynosautov9-ufs.c new file mode 100644 index 000000000000..9ab79e018724 --- /dev/null +++ b/drivers/phy/samsung/phy-exynosautov9-ufs.c @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * UFS PHY driver data for Samsung EXYNOSAUTO v9 SoC + * + * Copyright (C) 2021 Samsung Electronics Co., Ltd. + */ + +#include +#include + +#include "phy-samsung-ufs.h" + +#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 PHY_TRSV_REG_CFG_AUTOV9(o, v, d) \ + PHY_TRSV_REG_CFG_OFFSET(o, v, d, 0x50) + +/* Calibration for phy initialization */ +static const struct samsung_ufs_phy_cfg exynosautov9_pre_init_cfg[] = { + PHY_COMN_REG_CFG(0x023, 0x80, PWR_MODE_ANY), + PHY_COMN_REG_CFG(0x01d, 0x10, PWR_MODE_ANY), + + PHY_TRSV_REG_CFG_AUTOV9(0x044, 0xb5, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x04d, 0x43, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x05b, 0x20, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x05e, 0xc0, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x038, 0x12, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x059, 0x58, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x06c, 0x18, PWR_MODE_ANY), + PHY_TRSV_REG_CFG_AUTOV9(0x06d, 0x02, PWR_MODE_ANY), + + PHY_COMN_REG_CFG(0x023, 0xc0, PWR_MODE_ANY), + PHY_COMN_REG_CFG(0x023, 0x00, PWR_MODE_ANY), + + PHY_TRSV_REG_CFG(0x042, 0x5d, PWR_MODE_ANY), + PHY_TRSV_REG_CFG(0x043, 0x80, PWR_MODE_ANY), + + END_UFS_PHY_CFG, +}; + +/* Calibration for HS mode series A/B */ +static const struct samsung_ufs_phy_cfg exynosautov9_pre_pwr_hs_cfg[] = { + PHY_TRSV_REG_CFG(0x032, 0xbc, PWR_MODE_HS_ANY), + PHY_TRSV_REG_CFG(0x03c, 0x7f, PWR_MODE_HS_ANY), + PHY_TRSV_REG_CFG(0x048, 0xc0, PWR_MODE_HS_ANY), + + PHY_TRSV_REG_CFG(0x04a, 0x00, PWR_MODE_HS_G3_SER_B), + PHY_TRSV_REG_CFG(0x04b, 0x10, PWR_MODE_HS_G1_SER_B | + PWR_MODE_HS_G3_SER_B), + PHY_TRSV_REG_CFG(0x04d, 0x63, PWR_MODE_HS_G3_SER_B), + + END_UFS_PHY_CFG, +}; + +static const struct samsung_ufs_phy_cfg *exynosautov9_ufs_phy_cfgs[CFG_TAG_MAX] = { + [CFG_PRE_INIT] = exynosautov9_pre_init_cfg, + [CFG_PRE_PWR_HS] = exynosautov9_pre_pwr_hs_cfg, +}; + +const struct samsung_ufs_phy_drvdata exynosautov9_ufs_phy = { + .cfg = exynosautov9_ufs_phy_cfgs, + .isol = { + .offset = EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL, + .mask = EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL_MASK, + .en = EXYNOSAUTOV9_EMBEDDED_COMBO_PHY_CTRL_EN, + }, + .has_symbol_clk = 0, +}; diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index dd9ab1519d83..602ddef259eb 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -347,6 +347,9 @@ static const struct of_device_id samsung_ufs_phy_match[] = { { .compatible = "samsung,exynos7-ufs-phy", .data = &exynos7_ufs_phy, + }, { + .compatible = "samsung,exynosautov9-ufs-phy", + .data = &exynosautov9_ufs_phy, }, {}, }; diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index 1532d239ff0e..b9b85d55a2d5 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -26,14 +26,17 @@ .id = PHY_COMN_BLK, \ } -#define PHY_TRSV_REG_CFG(o, v, d) { \ +#define PHY_TRSV_REG_CFG_OFFSET(o, v, d, c) { \ .off_0 = PHY_APB_ADDR((o)), \ - .off_1 = PHY_APB_ADDR((o) + PHY_TRSV_CH_OFFSET), \ + .off_1 = PHY_APB_ADDR((o) + (c)), \ .val = (v), \ .desc = (d), \ .id = PHY_TRSV_BLK, \ } +#define PHY_TRSV_REG_CFG(o, v, d) \ + PHY_TRSV_REG_CFG_OFFSET(o, v, d, PHY_TRSV_CH_OFFSET) + /* UFS PHY registers */ #define PHY_PLL_LOCK_STATUS 0x1e #define PHY_CDR_LOCK_STATUS 0x5e @@ -137,5 +140,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; #endif /* _PHY_SAMSUNG_UFS_ */