From 8e8fdb6681b916b9db769fb8e082e1160e2801f4 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Wed, 24 Sep 2025 10:11:26 +0800 Subject: [PATCH] spi: nxp_fspi: Support i.MX8DXL flexspi MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit According to i.MX8DXL A1 errata ERR050601, concurrent read accesses from the A35 cores to the peripherals within the LSIO subsystem (region 0_5DXX_XXXX) and address spaces in the regions [0_0000_0000 – 0_1BFF_FFFF] and [4_0000_0000 – 4_3FFF_FFFF] can collide and cause data corruption in the returned data, with no failure report. Even a single A35 core accessing both these regions can trigger the issue because an A35 core can have more than one parallel read operation in progress. The flexspi0 AHB memory is in LSIO region mentioned in above errata. So we can't use AHB read, only can read data from FIFO. Add the compatible string for 8DXL and use a flag for the IPS read. Signed-off-by: Ye Li --- drivers/spi/nxp_fspi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c index 6e2aee4672b..3dfb54b1968 100644 --- a/drivers/spi/nxp_fspi.c +++ b/drivers/spi/nxp_fspi.c @@ -346,6 +346,15 @@ static const struct nxp_fspi_devtype_data imx8qxp_data = { .little_endian = true, /* little-endian */ }; +static const struct nxp_fspi_devtype_data imx8dxl_data = { + .rxfifo = SZ_512, /* (64 * 64 bits) */ + .txfifo = SZ_1K, /* (128 * 64 bits) */ + .ahb_buf_size = SZ_2K, /* (256 * 64 bits) */ + .quirks = FSPI_QUIRK_USE_IP_ONLY, + .lut_num = 32, + .little_endian = true, /* little-endian */ +}; + struct nxp_fspi { struct udevice *dev; void __iomem *iobase; @@ -1091,6 +1100,7 @@ static const struct udevice_id nxp_fspi_ids[] = { { .compatible = "nxp,imx8mm-fspi", .data = (ulong)&imx8mm_data, }, { .compatible = "nxp,imx8mp-fspi", .data = (ulong)&imx8mm_data, }, { .compatible = "nxp,imx8qxp-fspi", .data = (ulong)&imx8qxp_data, }, + { .compatible = "nxp,imx8dxl-fspi", .data = (ulong)&imx8dxl_data, }, { .compatible = "nxp,imxrt1170-fspi", .data = (ulong)&imxrt1170_data, }, { } }; -- 2.47.3