From patchwork Tue Jun 7 07:29:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12871452 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AA581C433EF for ; Tue, 7 Jun 2022 07:31:41 +0000 (UTC) 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=T34rjtYRZtMALCYQ0TI5eruhTN8YNSJl5ni9mtUEZZo=; b=Sme2MPSWRg0wTs 0E1pYk2xhfX07vqRhtILze/gOg3dfUqL8yxDMGwD9aQvxEI0KKu7rUosKxbGHrZJ+NRgrvjr28clw 0K2eLkq912eoRB6OyDE4PiJD+PghGULp72befv6ZXKZlSQRak5tBM3r7OMmcVXCreBntKTFMbE0o+ vrfzMazL/40HVeYEb/YCwkqhc5ZHp3UHf9UGt9bIoHu/YcGfEDJzYTQ22C4z+U54F5oCiUwmVN4Kw 8GZgAIATgXXKrmGLYcZ4gohniHf34JWrFbrXN3pdUr0g1Lsk9gmibYJ2nkN/y5s64r8AyT67u7OfO 3nfJXlYVlwKdeuAnW66g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyTfR-005SQM-JI; Tue, 07 Jun 2022 07:30:21 +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 1nyTeq-005SCm-91 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 07:29:50 +0000 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220607072940epoutp01e9b7adf91f3489883539002f8545f06d~2Rheq7M8N1581615816epoutp01p for ; Tue, 7 Jun 2022 07:29:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220607072940epoutp01e9b7adf91f3489883539002f8545f06d~2Rheq7M8N1581615816epoutp01p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654586980; bh=tIoO8AGDDmM88UsJzgLNNe5g+xFEMPP6I9m0oOSTECc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X26NVgubo0Bm/9AZW1vq9dkcVviwTVtT4l8DsYBZtycd2AgK391wdc0xe8KFfDGgs 8OsxR50kWG/9wbHXgYSyZceYwiqC0dsDcCbrH1JxLv8brfGPxqjX27Jw4ToTRP3F9O B1JG3ljhtBYm1geBbKqkzFiqLvLGua+co4bafJGo= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20220607072940epcas2p140d79b2836cdb072f72ef068e6993bd6~2RheLNBxz1461414614epcas2p1m; Tue, 7 Jun 2022 07:29:40 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.99]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4LHMSM0Jddz4x9Pw; Tue, 7 Jun 2022 07:29:39 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 92.CA.10028.26EFE926; Tue, 7 Jun 2022 16:29:38 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220607072938epcas2p104b9af05f4d4b18337df8bb6dab4964b~2RhcopmQu1461414614epcas2p1e; Tue, 7 Jun 2022 07:29:38 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220607072938epsmtrp13ce7b44f9d2b27221a7ec73cb9f8627b~2Rhcn4dr80498504985epsmtrp15; Tue, 7 Jun 2022 07:29:38 +0000 (GMT) X-AuditID: b6c32a47-589ff7000000272c-96-629efe62e23a Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 78.77.11276.26EFE926; Tue, 7 Jun 2022 16:29:38 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220607072938epsmtip164bec50f35376cfa456d3fe789f27e47~2RhcZO6Gy0442304423epsmtip1h; Tue, 7 Jun 2022 07:29:38 +0000 (GMT) From: Chanho Park To: Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Alim Akhtar , Rob Herring , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chanho Park Subject: [PATCH v4 5/5] phy: samsung: ufs: support secondary ufs phy Date: Tue, 7 Jun 2022 16:29:07 +0900 Message-Id: <20220607072907.127000-6-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607072907.127000-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMJsWRmVeSWpSXmKPExsWy7bCmuW7Sv3lJBju7rC0ezNvGZnF5v7bF /CPnWC0uPO1hs+h78ZDZYu/rrewWmx5fY7WYsOobi8WM8/uYLFr3HmG32HnnB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xRmJhlrMRcWJAOta/S3wAgAA X-CMS-MailID: 20220607072938epcas2p104b9af05f4d4b18337df8bb6dab4964b X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220607072938epcas2p104b9af05f4d4b18337df8bb6dab4964b References: <20220607072907.127000-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_002944_724396_3422EF91 X-CRM114-Status: GOOD ( 19.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To support secondary ufs phy device, we need to get an offset for phy isolation from the syscon DT node. If the first index argument of the node is existing, we can read the offset value and set it as isol->offset. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/phy/samsung/phy-samsung-ufs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index 0c933e364064..206a79c69a6c 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -288,6 +288,7 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev) struct phy *gen_phy; struct phy_provider *phy_provider; const struct samsung_ufs_phy_drvdata *drvdata; + u32 isol_offset; int err = 0; match = of_match_node(samsung_ufs_phy_match, dev->of_node); @@ -330,6 +331,10 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev) phy->has_symbol_clk = drvdata->has_symbol_clk; memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol)); + if (!of_property_read_u32_index(dev->of_node, "samsung,pmu-syscon", 1, + &isol_offset)) + phy->isol.offset = isol_offset; + phy->lane_cnt = PHY_DEF_LANE_CNT; phy_set_drvdata(gen_phy, phy);