linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
       [not found] ` <CGME20220113122435epcas5p18e6a2699f193b9e1287588278a570235@epcas5p1.samsung.com>
@ 2022-01-13 12:11   ` Alim Akhtar
  2022-01-13 13:28     ` Krzysztof Kozlowski
                       ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alim Akhtar @ 2022-01-13 12:11 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: soc, linux-clk, devicetree, olof, linus.walleij, catalin.marinas,
	robh+dt, krzysztof.kozlowski, s.nawrocki, linux-samsung-soc,
	pankaj.dubey, Alim Akhtar, linux-fsd, broonie, linux-spi,
	Aswani Reddy

This patch adds compatible and port configuration for
spi controller for Tesla Full Self-Driving SoC.

Cc: linux-fsd@tesla.com
Cc: broonie@kernel.org
Cc: linux-spi@vger.kernel.org
Signed-off-by: Aswani Reddy <aswani.reddy@samsung.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/spi/spi-s3c64xx.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 8755cd85e83c..8d0c1f03ab7a 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1442,6 +1442,16 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = {
 	.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,
+	.tx_st_done	= 25,
+	.high_speed	= true,
+	.clk_from_cmu	= true,
+	.clk_ioclk	= false,
+	.quirks		= S3C64XX_SPI_QUIRK_CS_AUTO,
+};
+
 static const struct platform_device_id s3c64xx_spi_driver_ids[] = {
 	{
 		.name		= "s3c2443-spi",
@@ -1472,6 +1482,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = {
 	{ .compatible = "samsung,exynos5433-spi",
 			.data = (void *)&exynos5433_spi_port_config,
 	},
+	{ .compatible = "tesla,fsd-spi",
+			.data = (void *)&fsd_spi_port_config,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, s3c64xx_spi_dt_match);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
  2022-01-13 12:11   ` [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC Alim Akhtar
@ 2022-01-13 13:28     ` Krzysztof Kozlowski
       [not found]     ` <YeAiIhfN216pRWhn@sirena.org.uk>
  2022-01-16 12:12     ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-13 13:28 UTC (permalink / raw)
  To: Alim Akhtar, linux-arm-kernel, linux-kernel
  Cc: soc, linux-clk, devicetree, olof, linus.walleij, catalin.marinas,
	robh+dt, s.nawrocki, linux-samsung-soc, pankaj.dubey, linux-fsd,
	broonie, linux-spi, Aswani Reddy

On 13/01/2022 13:11, Alim Akhtar wrote:
> This patch adds compatible and port configuration for
> spi controller for Tesla Full Self-Driving SoC.
> 
> Cc: linux-fsd@tesla.com
> Cc: broonie@kernel.org
> Cc: linux-spi@vger.kernel.org
> Signed-off-by: Aswani Reddy <aswani.reddy@samsung.com>
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> ---
>  drivers/spi/spi-s3c64xx.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 8755cd85e83c..8d0c1f03ab7a 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -1442,6 +1442,16 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = {
>  	.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,
> +	.tx_st_done	= 25,
> +	.high_speed	= true,
> +	.clk_from_cmu	= true,
> +	.clk_ioclk	= false,
> +	.quirks		= S3C64XX_SPI_QUIRK_CS_AUTO,
> +};
> +
>  static const struct platform_device_id s3c64xx_spi_driver_ids[] = {
>  	{
>  		.name		= "s3c2443-spi",
> @@ -1472,6 +1482,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = {
>  	{ .compatible = "samsung,exynos5433-spi",
>  			.data = (void *)&exynos5433_spi_port_config,
>  	},
> +	{ .compatible = "tesla,fsd-spi",
> +			.data = (void *)&fsd_spi_port_config,
> +	},

Looks good, except the discussion about too generic compatible.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
       [not found]     ` <YeAiIhfN216pRWhn@sirena.org.uk>
@ 2022-01-14  7:15       ` Alim Akhtar
  0 siblings, 0 replies; 4+ messages in thread
From: Alim Akhtar @ 2022-01-14  7:15 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: linux-arm-kernel, linux-kernel, soc, linux-clk, devicetree, olof,
	linus.walleij, catalin.marinas, robh+dt, krzysztof.kozlowski,
	s.nawrocki, linux-samsung-soc, pankaj.dubey, linux-fsd,
	linux-spi, 'Aswani Reddy'



>-----Original Message-----
>From: Mark Brown [mailto:broonie@kernel.org]
>Sent: Thursday, January 13, 2022 6:29 PM
>To: Alim Akhtar <alim.akhtar@samsung.com>
>Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
>soc@kernel.org; linux-clk@vger.kernel.org; devicetree@vger.kernel.org;
>olof@lixom.net; linus.walleij@linaro.org; catalin.marinas@arm.com;
>robh+dt@kernel.org; krzysztof.kozlowski@canonical.com;
>s.nawrocki@samsung.com; linux-samsung-soc@vger.kernel.org;
>pankaj.dubey@samsung.com; linux-fsd@tesla.com; linux-
>spi@vger.kernel.org; Aswani Reddy <aswani.reddy@samsung.com>
>Subject: Re: [PATCH 18/23] spi: s3c64xx: Add spi port configuration for
Tesla
>FSD SoC
>
>On Thu, Jan 13, 2022 at 05:41:38PM +0530, Alim Akhtar wrote:
>
>> +	{ .compatible = "tesla,fsd-spi",
>> +			.data = (void *)&fsd_spi_port_config,
>> +	},
>
>This needs a DT bindings update to match.
Thanks for point it out, will update in v2.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
  2022-01-13 12:11   ` [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC Alim Akhtar
  2022-01-13 13:28     ` Krzysztof Kozlowski
       [not found]     ` <YeAiIhfN216pRWhn@sirena.org.uk>
@ 2022-01-16 12:12     ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2022-01-16 12:12 UTC (permalink / raw)
  To: Alim Akhtar
  Cc: linux-arm-kernel, linux-kernel, soc, linux-clk, devicetree, olof,
	catalin.marinas, robh+dt, krzysztof.kozlowski, s.nawrocki,
	linux-samsung-soc, pankaj.dubey, linux-fsd, broonie, linux-spi,
	Aswani Reddy

On Thu, Jan 13, 2022 at 1:24 PM Alim Akhtar <alim.akhtar@samsung.com> wrote:

> This patch adds compatible and port configuration for
> spi controller for Tesla Full Self-Driving SoC.
>
> Cc: linux-fsd@tesla.com
> Cc: broonie@kernel.org
> Cc: linux-spi@vger.kernel.org
> Signed-off-by: Aswani Reddy <aswani.reddy@samsung.com>
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>

Note to self: now that I see that the Samsung "S3C" SPI controller,
which I was thinking of as "some kind of early 2000s legacy" is used
by the very latest silicon I bumped up fixing it to use GPIO descriptors
a bit on my TODO list.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-16 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220113121143.22280-1-alim.akhtar@samsung.com>
     [not found] ` <CGME20220113122435epcas5p18e6a2699f193b9e1287588278a570235@epcas5p1.samsung.com>
2022-01-13 12:11   ` [PATCH 18/23] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC Alim Akhtar
2022-01-13 13:28     ` Krzysztof Kozlowski
     [not found]     ` <YeAiIhfN216pRWhn@sirena.org.uk>
2022-01-14  7:15       ` Alim Akhtar
2022-01-16 12:12     ` Linus Walleij

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).