From patchwork Tue Jun 28 04:42:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12897637 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 9D3D8C43334 for ; Tue, 28 Jun 2022 04:46:14 +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=bsN+pDSSjKYshxkBMkJ3Oh8lZO7q5FR7kwynH6obUTU=; b=DSGk7SelOVmra3 reE77V1D0DR1TbCOh+mtyR+PpOHmnuzUkmu1zGwBcActg4JitM049gCydJo4Aet/YswqkleV0G2G6 ZezRd9HBlfWVJsU/5jcCbYLQ79sHPM1tUEkfFPZ16DCRkeo54Z5dat8fQ19BkrRAT6UVNoOwnjPZP P4Kjgi2ZYpBhmdGR0kqkW7nj4Cz9eotchwjjXINEK675TpHbwzucrbacJ/kiT5alMxasvw+Hymzse ve2g6cqkQqaUR9jQhG+FgFw+/G1K3sLRM6YCvtemZfI3eIDOmPoOyGBesM0VWB9Dj2my4NfG8IUtb yAjabd3dUJunfZPM84xA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6363-004DVH-GK; Tue, 28 Jun 2022 04:45:07 +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 1o635i-004DLI-02 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 04:44:48 +0000 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220628044434epoutp0276d3d05de7e9882b9c734a66eaff4a53~8r0Uu7dUZ0601806018epoutp02K for ; Tue, 28 Jun 2022 04:44:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220628044434epoutp0276d3d05de7e9882b9c734a66eaff4a53~8r0Uu7dUZ0601806018epoutp02K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1656391474; bh=WdzNcCBUUsRhvuN8WI9tNEWHB08Feb81bArEwJFsRw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHy6WIqcKYpVqhh6xwfxBhC7moi7+dFviDBmpF+feEln8LGl/sTGyAf6DTwiqFAqK eNPmMlcGmO51ydCZRKFrz8oO4/9ae48NSXJfA6Y7PM3w48ji2PmMiVngRxWYJzPU7z ilPNhPRUxzQLSHfAQdPGVoXFh0YFK2zsbN4/KoTE= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20220628044433epcas2p347141f45fa7e761965ad99e82ff15d03~8r0UFRGun1827118271epcas2p3e; Tue, 28 Jun 2022 04:44:33 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.91]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4LXBp94SJzz4x9Q7; Tue, 28 Jun 2022 04:44:33 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 6C.D6.09666.1378AB26; Tue, 28 Jun 2022 13:44:33 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20220628044432epcas2p2e2b4c0d52f11c0bf543c537e819224bc~8r0TLfgjV0047300473epcas2p2P; Tue, 28 Jun 2022 04:44:32 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220628044432epsmtrp139f0304b5aca10b4e6ce04e43c2d3544~8r0TKqKE02149721497epsmtrp18; Tue, 28 Jun 2022 04:44:32 +0000 (GMT) X-AuditID: b6c32a45-45bff700000025c2-8a-62ba8731fb31 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 37.70.08905.0378AB26; Tue, 28 Jun 2022 13:44:32 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220628044432epsmtip18800ee082a259ae04efbd064ce9e58d9~8r0S8wBq_2875128751epsmtip1a; Tue, 28 Jun 2022 04:44:32 +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 v2 4/4] spi: s3c64xx: add spi port configuration for Exynos Auto v9 SoC Date: Tue, 28 Jun 2022 13:42:22 +0900 Message-Id: <20220628044222.152794-5-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220628044222.152794-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCJsWRmVeSWpSXmKPExsWy7bCmha5h+64kgytzRSwezNvGZrH4x3Mm i6kPn7BZXN6vbTH/yDlWi74XD5kt9r7eym6x6fE1VosZ5/cxWTR+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ARnCwRfMCAAA= X-CMS-MailID: 20220628044432epcas2p2e2b4c0d52f11c0bf543c537e819224bc X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220628044432epcas2p2e2b4c0d52f11c0bf543c537e819224bc References: <20220628044222.152794-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_214446_535100_0FFF3AD4 X-CRM114-Status: GOOD ( 17.29 ) 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. Signed-off-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti --- 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 51a0e830441b..0c9e19889809 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 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, },