Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: s3c64xx: add spi port configuration for Exynos Auto v9 SoC

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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20220629102304.65712-5-chanho61.park@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Chanho Park and committed by
Mark Brown
11d50d85 bfcd27dc

+17 -1
+17 -1
drivers/spi/spi-s3c64xx.c
··· 18 18 19 19 #include <linux/platform_data/spi-s3c64xx.h> 20 20 21 - #define MAX_SPI_PORTS 6 21 + #define MAX_SPI_PORTS 12 22 22 #define S3C64XX_SPI_QUIRK_POLL (1 << 0) 23 23 #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) 24 24 #define AUTOSUSPEND_TIMEOUT 2000 ··· 1451 1451 .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, 1452 1452 }; 1453 1453 1454 + static const struct s3c64xx_spi_port_config exynosautov9_spi_port_config = { 1455 + .fifo_lvl_mask = { 0x1ff, 0x1ff, 0x7f, 0x7f, 0x7f, 0x7f, 0x1ff, 0x7f, 1456 + 0x7f, 0x7f, 0x7f, 0x7f}, 1457 + .rx_lvl_offset = 15, 1458 + .tx_st_done = 25, 1459 + .clk_div = 4, 1460 + .high_speed = true, 1461 + .clk_from_cmu = true, 1462 + .clk_ioclk = true, 1463 + .has_loopback = true, 1464 + .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, 1465 + }; 1466 + 1454 1467 static const struct s3c64xx_spi_port_config fsd_spi_port_config = { 1455 1468 .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}, 1456 1469 .rx_lvl_offset = 15, ··· 1504 1491 }, 1505 1492 { .compatible = "samsung,exynos5433-spi", 1506 1493 .data = (void *)&exynos5433_spi_port_config, 1494 + }, 1495 + { .compatible = "samsung,exynosautov9-spi", 1496 + .data = (void *)&exynosautov9_spi_port_config, 1507 1497 }, 1508 1498 { .compatible = "tesla,fsd-spi", 1509 1499 .data = (void *)&fsd_spi_port_config,