From patchwork Wed Jun 29 10:23:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12899714 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 C58E9C433EF for ; Wed, 29 Jun 2022 10:27:01 +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=cGCGoNvpSttfguGQ1hm0kEU2GXYSBtXAHi7wFvLjJgE=; b=YN0YvvNEV9lsp3 2CMmqvFIVFzjw2sgIT5leQ4DOeieMxrFRqkyHuKdrLgxXhnYX0SibsVIHmefWMM9VWHmGUY4xDLzO sC+nr4MQj0KQpXHvqnTTfLmHkoLNr9LrBp5hXdfaq1UayQZZbtWGeH88g/TBW7ZBZjNWaY5kq+DQt y3EFuuoTR0PTfykizr8EabZ0jxbHUKl0uNg8pbqyQVa6j68N6QL/zAcuLuO0aKAqYCbipjZuypVe6 +GmWAb5/OLLijcmEtVdz+nXIm59ueuoc5sqmx7yIgoxZwhtk9Ad2do+T0z57RValAsXOQjPS3aFtP q+F/YzitdzjSyg80WIVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6UtL-00B0ct-1l; Wed, 29 Jun 2022 10:25:51 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6Ut6-00B0W5-Ef for linux-arm-kernel@lists.infradead.org; Wed, 29 Jun 2022 10:25:38 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220629102529epoutp0241acfb6420dd930dcc655691e8b46c21~9EHRbiE_g1378613786epoutp02e for ; Wed, 29 Jun 2022 10:25:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220629102529epoutp0241acfb6420dd930dcc655691e8b46c21~9EHRbiE_g1378613786epoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1656498329; bh=cAEW5DLT+rYmdqbRLPAbLST8Ew6HY1jTaugv3W8tTeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dKPuhsNA+X8GmB2qpOIVkwyui7OrQycrZU27P3CT9QzK7Q/M+jZWDifroy3KEluhq oVSksE/8cIxCFLn0j4Mz30PeYygcjiu3hsjlt7FlBYlWPtG6WKwTsZE3ymKvQDoaNj IogWroBem70htXbb30s2yN55h+tqHeximqoNt87k= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220629102528epcas2p45d87863f402a93e4584b550300225050~9EHQl6drQ0841508415epcas2p4U; Wed, 29 Jun 2022 10:25:28 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.89]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4LXyK44Lnzz4x9Pr; Wed, 29 Jun 2022 10:25:28 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 8C.36.09642.8982CB26; Wed, 29 Jun 2022 19:25:28 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220629102527epcas2p19e967e3647084cbfad1bff0b9390b4ad~9EHPlGR0v2705927059epcas2p1s; Wed, 29 Jun 2022 10:25:27 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220629102527epsmtrp176ab46399948dfd958d86e6c844b87a6~9EHPhqxFc0392803928epsmtrp1X; Wed, 29 Jun 2022 10:25:27 +0000 (GMT) X-AuditID: b6c32a47-5e1ff700000025aa-d0-62bc289830dc Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 6D.D6.08905.7982CB26; Wed, 29 Jun 2022 19:25:27 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220629102527epsmtip1319246b7935d580b80ddc633f2a4d368~9EHPY1KrL2691826918epsmtip1S; Wed, 29 Jun 2022 10:25:27 +0000 (GMT) From: Chanho Park To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Alim Akhtar , devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chanho Park Subject: [PATCH v3 4/4] spi: s3c64xx: add spi port configuration for Exynos Auto v9 SoC Date: Wed, 29 Jun 2022 19:23:04 +0900 Message-Id: <20220629102304.65712-5-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629102304.65712-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMJsWRmVeSWpSXmKPExsWy7bCmme4MjT1JBuemy1k8mLeNzWLxj+dM FlMfPmGzuLxf22L+kXOsFn0vHjJb7H29ld1i0+NrrBYzzu9jsmj8eJPdon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ObBaj3z qysE956fdM59hUjp5Y1vyw9nnv38oS9szddzlQrng+Vq3YplPwWaHFNiKc5INNRiLipOBADV B5q4NgQAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsWy7bCSnO50jT1JBvseG1g8mLeNzWLxj+dM FlMfPmGzuLxf22L+kXOsFn0vHjJb7H29ld1i0+NrrBYzzu9jsmj8eJPdonXvEXYHbo/rSz4x e2xa1cnmcefaHjaPzUvqPfq2rGL0+LxJLoAtissmJTUnsyy1SN8ugStj2423zAXX+Cuur/3O 0sD4j6eLkZNDQsBEonnXVPYuRi4OIYHdjBIdnY9YIBKyEs/e7WCHsIUl7rccYYUoes8osWzj CSaQBJuArsSW568YQRIiArcZJf42bmMDcZgF7jBKPFq+B6xKWCBc4tisc2BjWQRUJaafvc8I YvMK2Ens2XOZCWKFvMSG+b3MIDangL3E2yurWUFsIaCaJdd3skDUC0qcnPkEzGYGqm/eOpt5 AqPALCSpWUhSCxiZVjFKphYU56bnFhsWGOallusVJ+YWl+al6yXn525iBEeCluYOxu2rPugd YmTiYDzEKMHBrCTCu/DMziQh3pTEyqrUovz4otKc1OJDjNIcLErivBe6TsYLCaQnlqRmp6YW pBbBZJk4OKUamOYtV6++HH/aLSzu4Nbnrb/qwoSOpB9U+TrZorX4hJTkgsptzWvEqv3jP3P7 yDIJ1vhklS49Ly888eijx3/902dE8712f//wa/nEi+VZEr3LfB8p/1Tv6dCTMXm8YfObLXrb N6+5EFK0fFGO7Hkp8wyem2sETh5eOl9OdZKz+hIp1yT2Wfu/n9uewup0e3PwyrUHg7/qPfix aU/9olv6WllNNz0zN/FPVJvh1lIrEnA779PH+4FzPl9KzGnbvFVfvXEG9/26oONCLf8f7E84 au4joKXpMv1hoOhPmXjn0s0WX7lEJmzdnLT8q5HZjZpr6w6khVw7epHfY0/StIUmUyTqrtnq Jj0yiVuTX9t8oFKJpTgj0VCLuag4EQA/gJk28wIAAA== X-CMS-MailID: 20220629102527epcas2p19e967e3647084cbfad1bff0b9390b4ad X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220629102527epcas2p19e967e3647084cbfad1bff0b9390b4ad References: <20220629102304.65712-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220629_032536_934048_752938CD X-CRM114-Status: GOOD ( 16.36 ) 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 Add exynosautov9 spi port configuration. It supports up to 12 spis so MAX_SPI_PORTS should be increased from 6 to 12. It has DIV_4 as the default internal clock divider and an internal loopback mode to run a loopback test. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Chanho Park --- drivers/spi/spi-s3c64xx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index ff565e57736b..7f346866614a 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -18,7 +18,7 @@ #include -#define MAX_SPI_PORTS 6 +#define MAX_SPI_PORTS 12 #define S3C64XX_SPI_QUIRK_POLL (1 << 0) #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) #define AUTOSUSPEND_TIMEOUT 2000 @@ -1451,6 +1451,19 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, }; +static const struct s3c64xx_spi_port_config exynosautov9_spi_port_config = { + .fifo_lvl_mask = { 0x1ff, 0x1ff, 0x7f, 0x7f, 0x7f, 0x7f, 0x1ff, 0x7f, + 0x7f, 0x7f, 0x7f, 0x7f}, + .rx_lvl_offset = 15, + .tx_st_done = 25, + .clk_div = 4, + .high_speed = true, + .clk_from_cmu = true, + .clk_ioclk = true, + .has_loopback = true, + .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, +}; + static const struct s3c64xx_spi_port_config fsd_spi_port_config = { .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}, .rx_lvl_offset = 15, @@ -1492,6 +1505,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = { { .compatible = "samsung,exynos5433-spi", .data = (void *)&exynos5433_spi_port_config, }, + { .compatible = "samsung,exynosautov9-spi", + .data = (void *)&exynosautov9_spi_port_config, + }, { .compatible = "tesla,fsd-spi", .data = (void *)&fsd_spi_port_config, },