From 41664ebda0fa87d4e6eed7a38026978e047ced74 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Tue, 17 Jun 2025 17:31:40 +0200 Subject: [PATCH] drivers: memc: stm32 psram: Fix XSPI configuration for performance Correct XSPI configuration in order to improve PSRAM access on the STM32N6 discovery board. Ideally, this should be defined by device tree, but I'm fixing the only user for now. Signed-off-by: Erwan Gouriou --- drivers/memc/memc_stm32_xspi_psram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memc/memc_stm32_xspi_psram.c b/drivers/memc/memc_stm32_xspi_psram.c index cc4c161415c..61b64383be2 100644 --- a/drivers/memc/memc_stm32_xspi_psram.c +++ b/drivers/memc/memc_stm32_xspi_psram.c @@ -389,12 +389,12 @@ static struct memc_stm32_xspi_psram_data memc_stm32_xspi_data = { .hxspi = { .Instance = (XSPI_TypeDef *)DT_REG_ADDR(STM32_XSPI_NODE), .Init = { - .FifoThresholdByte = 8U, + .FifoThresholdByte = 2U, .MemoryMode = HAL_XSPI_SINGLE_MEM, .MemoryType = (DT_INST_PROP(0, io_x16_mode) ? HAL_XSPI_MEMTYPE_APMEM_16BITS : HAL_XSPI_MEMTYPE_APMEM), - .ChipSelectHighTimeCycle = 1U, + .ChipSelectHighTimeCycle = 5U, .FreeRunningClock = HAL_XSPI_FREERUNCLK_DISABLE, .ClockMode = HAL_XSPI_CLOCK_MODE_0, .WrapSize = HAL_XSPI_WRAP_NOT_SUPPORTED,