Skip to content

Commit abc9a34

Browse files
alexelderbroonie
authored andcommitted
spi: fsl-qspi: support the SpacemiT K1 SoC
Allow the SPI_FSL_QUADSPI Kconfig option to be selected if ARCH_SPACEMIT enabled. Add support for the SpacemiT K1 SoC in the Freescale QSPI driver by defining the device type data for its QSPI implementation. Signed-off-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20251027133008.360237-8-elder@riscstar.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5693110 commit abc9a34

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

drivers/spi/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ config SPI_FSL_LPSPI
435435

436436
config SPI_FSL_QUADSPI
437437
tristate "Freescale QSPI controller"
438-
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
438+
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || \
439+
ARCH_SPACEMIT || COMPILE_TEST
439440
depends on HAS_IOMEM
440441
help
441442
This enables support for the Quad SPI controller in master mode.

drivers/spi/spi-fsl-qspi.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,16 @@ static const struct fsl_qspi_devtype_data ls2080a_data = {
268268
.little_endian = true,
269269
};
270270

271+
static const struct fsl_qspi_devtype_data spacemit_k1_data = {
272+
.rxfifo = SZ_128,
273+
.txfifo = SZ_256,
274+
.ahb_buf_size = SZ_512,
275+
.sfa_size = SZ_1K,
276+
.invalid_mstrid = QUADSPI_BUFXCR_INVALID_MSTRID,
277+
.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_SKIP_CLK_DISABLE,
278+
.little_endian = true,
279+
};
280+
271281
struct fsl_qspi {
272282
void __iomem *iobase;
273283
void __iomem *ahb_addr;
@@ -1003,6 +1013,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = {
10031013
{ .compatible = "fsl,imx6ul-qspi", .data = &imx6ul_data, },
10041014
{ .compatible = "fsl,ls1021a-qspi", .data = &ls1021a_data, },
10051015
{ .compatible = "fsl,ls2080a-qspi", .data = &ls2080a_data, },
1016+
{ .compatible = "spacemit,k1-qspi", .data = &spacemit_k1_data, },
10061017
{ /* sentinel */ }
10071018
};
10081019
MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);

0 commit comments

Comments
 (0)