Skip to content

Commit b62be03

Browse files
arthur-mmlwcfriedt
authored andcommitted
drivers: memc: stm32_xspi_psram: fix command size in x8 mode
This patch fixes PSRAM initialization logic in x8 mode by ensuring that the data line mode configuration accurately reflects the io-x16-mode property specified in the device tree. Signed-off-by: Arthur Gay <[email protected]>
1 parent c47e606 commit b62be03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/memc/memc_stm32_xspi_psram.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ static int memc_stm32_xspi_psram_init(const struct device *dev)
322322
cmd.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
323323
cmd.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
324324
cmd.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
325-
cmd.DataMode = HAL_XSPI_DATA_16_LINES;
325+
cmd.DataMode = DT_INST_PROP(0, io_x16_mode) ? HAL_XSPI_DATA_16_LINES
326+
: HAL_XSPI_DATA_8_LINES;
326327
cmd.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
327328
cmd.DummyCycles = DUMMY_CLK_CYCLES_WRITE;
328329
cmd.DQSMode = HAL_XSPI_DQS_ENABLE;

0 commit comments

Comments
 (0)