From: Sam Protsenko <semen.protsenko@linaro.org>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Andi Shyti <andi.shyti@kernel.org>,
Mark Brown <broonie@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 5/7] spi: s3c64xx: Add Exynos850 support
Date: Wed, 24 Jan 2024 13:51:21 -0600 [thread overview]
Message-ID: <CAPLW+4=z9cgVZgY_a6d69sGfDaErsYSc9tL8mtYdoBeahZGJyA@mail.gmail.com> (raw)
In-Reply-To: <9c9e71ff-42ab-4753-80cf-09b34a97b28c@linaro.org>
On Wed, Jan 24, 2024 at 12:49 AM Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
>
>
>
> On 1/20/24 01:29, Sam Protsenko wrote:
> > Add SPI port configuration for Exynos850 SoC. It has 3 USI blocks which
> > can be configured in SPI mode:
> >
> > * spi_0: BLK_PERI_SPI_0 (0x13940000)
> > * spi_1: BLK_ALIVE_USI_CMGP00 (0x11d00000)
> > * spi_2: BLK_ALIVE_USI_CMGP01 (0x11d20000)
> >
> > SPI FIFO depth is 64 bytes for all those SPI blocks, so the
> > .fifo_lvl_mask value is set to 0x7f. All blocks have DIV_4 as the
> > default internal clock divider, and an internal loopback mode to run
> > a loopback test.
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>
> > ---
> > drivers/spi/spi-s3c64xx.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> > index 0e48ffd499b9..f7d623ad6ac3 100644
> > --- a/drivers/spi/spi-s3c64xx.c
> > +++ b/drivers/spi/spi-s3c64xx.c
> > @@ -1461,6 +1461,17 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = {
> > .quirks = S3C64XX_SPI_QUIRK_CS_AUTO,
> > };
> >
> > +static const struct s3c64xx_spi_port_config exynos850_spi_port_config = {
> > + .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f },
>
> I'll come with a follow up patch on top of this. Having the dt alias
> used as an index in the fifo_lvl_mask to determine the FIFO depth is
> wrong. Not only because of the dependency on the alias, but also because
> the fifo_lvl_mask value does not reflect the FIFO level reg field.
> Playing with what we have now is ok by me, I find the patch good.
>
Yeah, we just have to make sure all our patches are taken in the
correct order, to avoid any possible conflicts.
> > + .rx_lvl_offset = 15,
> > + .tx_st_done = 25,
> > + .clk_div = 4,
> > + .high_speed = true,
> > + .clk_from_cmu = true,
> > + .has_loopback = true,
> > + .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},
> > @@ -1515,6 +1526,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = {
> > { .compatible = "samsung,exynos5433-spi",
> > .data = (void *)&exynos5433_spi_port_config,
> > },
> > + { .compatible = "samsung,exynos850-spi",
> > + .data = (void *)&exynos850_spi_port_config,
> > + },
> > { .compatible = "samsung,exynosautov9-spi",
> > .data = (void *)&exynosautov9_spi_port_config,
> > },
next prev parent reply other threads:[~2024-01-24 19:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 1:29 [PATCH 0/7] arm64: exynos: Enable SPI for Exynos850 Sam Protsenko
2024-01-20 1:29 ` [PATCH 1/7] dt-bindings: clock: exynos850: Add PDMA clocks Sam Protsenko
2024-01-23 12:54 ` (subset) " Krzysztof Kozlowski
2024-01-20 1:29 ` [PATCH 2/7] dt-bindings: spi: samsung: Add Exynos850 SPI Sam Protsenko
2024-01-23 12:22 ` Krzysztof Kozlowski
2024-01-24 6:32 ` Tudor Ambarus
2024-01-20 1:29 ` [PATCH 3/7] clk: samsung: exynos850: Add PDMA clocks Sam Protsenko
2024-01-23 12:54 ` (subset) " Krzysztof Kozlowski
2024-01-20 1:29 ` [PATCH 4/7] clk: samsung: exynos850: Propagate SPI IPCLK rate change Sam Protsenko
2024-01-23 12:49 ` Krzysztof Kozlowski
2024-01-20 1:29 ` [PATCH 5/7] spi: s3c64xx: Add Exynos850 support Sam Protsenko
2024-01-24 6:49 ` Tudor Ambarus
2024-01-24 19:51 ` Sam Protsenko [this message]
2024-01-20 1:29 ` [PATCH 6/7] arm64: dts: exynos: Add PDMA node for Exynos850 Sam Protsenko
2024-01-23 12:55 ` Krzysztof Kozlowski
2024-01-20 1:29 ` [PATCH 7/7] arm64: dts: exynos: Add SPI nodes " Sam Protsenko
2024-01-23 12:56 ` Krzysztof Kozlowski
2024-01-25 14:02 ` (subset) [PATCH 0/7] arm64: exynos: Enable SPI " Mark Brown
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='CAPLW+4=z9cgVZgY_a6d69sGfDaErsYSc9tL8mtYdoBeahZGJyA@mail.gmail.com' \
--to=semen.protsenko@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=andi.shyti@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=tomasz.figa@gmail.com \
--cc=tudor.ambarus@linaro.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;
as well as URLs for NNTP newsgroup(s).