public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denzeel Oliva <wachiturroxd150@gmail.com>
To: krzk@kernel.org, alim.akhtar@samsung.com
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	Denzeel Oliva <wachiturroxd150@gmail.com>
Subject: [PATCH v1 8/9] spi: s3c64xx: add support exynos990-spi to new port config data
Date: Wed,  5 Feb 2025 22:22:22 +0000	[thread overview]
Message-ID: <20250205222223.613-9-wachiturroxd150@gmail.com> (raw)
In-Reply-To: <20250205222223.613-1-wachiturroxd150@gmail.com>

Exynos990 has the same version of USI SPI (v2.1) as GS101.
Drop the fifo_lvl_mask and rx_lvl_offset and switch to the new port
config data.

Exynoos990 data for SPI:
- the FIFO depth is always the same size for exynos990
  (64 bytes and 256 bytes), sizes of 256 bytes will be put in DT.
- Exynos990 allows only accesses to 32-bit registers; otherwise, An
  error interrupt is generated. Perform write register accesses in
  32 bits.

Signed-off-by: Denzeel Oliva <wachiturroxd150@gmail.com>
---
 drivers/spi/spi-s3c64xx.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 389275dbc..d4cbbaa9a 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1586,6 +1586,19 @@ static const struct s3c64xx_spi_port_config exynos850_spi_port_config = {
 	.quirks		= S3C64XX_SPI_QUIRK_CS_AUTO,
 };
 
+static const struct s3c64xx_spi_port_config exynos990_spi_port_config = {
+	.fifo_depth     = 64,
+	.rx_fifomask    = S3C64XX_SPI_ST_RX_FIFO_RDY_V2,
+	.tx_fifomask    = S3C64XX_SPI_ST_TX_FIFO_RDY_V2,
+	.tx_st_done     = 25,
+	.clk_div        = 4,
+	.high_speed     = true,
+	.clk_from_cmu   = true,
+	.has_loopback   = true,
+	.use_32bit_io   = true,
+	.quirks         = S3C64XX_SPI_QUIRK_CS_AUTO,
+};
+
 static const struct s3c64xx_spi_port_config exynosautov9_spi_port_config = {
 	/* fifo_lvl_mask is deprecated. Use {rx, tx}_fifomask instead. */
 	.fifo_lvl_mask	= { 0x1ff, 0x1ff, 0x7f, 0x7f, 0x7f, 0x7f, 0x1ff, 0x7f,
@@ -1664,6 +1677,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = {
 	{ .compatible = "samsung,exynos850-spi",
 			.data = &exynos850_spi_port_config,
 	},
+	{ .compatible = "samsung,exynos990-spi",
+			.data = &exynos990_spi_port_config,
+	},
 	{ .compatible = "samsung,exynosautov9-spi",
 			.data = &exynosautov9_spi_port_config,
 	},
-- 
2.47.1


  parent reply	other threads:[~2025-02-05 22:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 22:22 [PATCH v1 0/9] Add PERIC0/1 support for Exynos 990 Denzeel Oliva
2025-02-05 22:22 ` [PATCH v1 1/9] dt-bindings: clock: samsung,exynos990-clock: add PERIC0/1 clock management unit Denzeel Oliva
2025-02-06  7:41   ` Krzysztof Kozlowski
2025-02-05 22:22 ` [PATCH v1 2/9] dt-bindings: i2c: exynos5: add samsung,exynos990-hsi2c compatible Denzeel Oliva
2025-02-06  7:41   ` Krzysztof Kozlowski
2025-02-05 22:22 ` [PATCH v1 3/9] dt-bindings: serial: samsung: add Exynos990 compatible Denzeel Oliva
2025-02-06  7:42   ` Krzysztof Kozlowski
2025-02-05 22:22 ` [PATCH v1 4/9] dt-bindings: samsung: usi: add exynos990-usi compatible Denzeel Oliva
2025-02-05 22:22 ` [PATCH v1 5/9] spi: dt-bindings: samsung: add samsung,exynos990-spi compatible Denzeel Oliva
2025-02-06  7:42   ` Krzysztof Kozlowski
2025-02-05 22:22 ` [PATCH v1 6/9] dt-bindings: soc: samsung: exynos-sysreg: add compatibles peric0/1 sysreg for Exynos990 Denzeel Oliva
2025-02-05 22:22 ` [PATCH v1 7/9] clk: samsung: exynos990: add support for CMU_PERIC0/1 Denzeel Oliva
2025-02-05 22:22 ` Denzeel Oliva [this message]
2025-02-05 22:22 ` [PATCH v1 9/9] arm64: dts: exynos990: define all PERIC USI nodes Denzeel Oliva
2025-02-08 19:18   ` Umer Uddin
     [not found]     ` <CABeP6EGt1vOyxbc=vnCjBSimERLTV5_QV5Ph8p3SP4vc_z2=nQ@mail.gmail.com>
2025-02-09 10:20       ` Krzysztof Kozlowski
2025-02-06  7:45 ` [PATCH v1 0/9] Add PERIC0/1 support for Exynos 990 Krzysztof Kozlowski
2025-02-07 15:21 ` Rob Herring (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205222223.613-9-wachiturroxd150@gmail.com \
    --to=wachiturroxd150@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox