drivers: flash: qspi stm32 driver supporting requires_ulbpr
Add the support of the requires_ulbpr property when a Microchip quad-spi flash is mounted. Set the CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32=y flag to access the command Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
72370b23ce
commit
76740ae1d1
2 changed files with 15 additions and 0 deletions
|
@ -187,9 +187,16 @@ static inline int qspi_prepare_quad_program(const struct device *dev,
|
|||
dev_data->qspi_write_cmd == SPI_NOR_CMD_PP_1_4_4);
|
||||
|
||||
cmd->Instruction = dev_data->qspi_write_cmd;
|
||||
#if defined(CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32)
|
||||
/* Microchip qspi-NOR flash, does not follow the standard rules */
|
||||
if (cmd->Instruction == SPI_NOR_CMD_PP_1_1_4) {
|
||||
cmd->AddressMode = QSPI_ADDRESS_4_LINES;
|
||||
}
|
||||
#else
|
||||
cmd->AddressMode = ((cmd->Instruction == SPI_NOR_CMD_PP_1_1_4)
|
||||
? QSPI_ADDRESS_1_LINE
|
||||
: QSPI_ADDRESS_4_LINES);
|
||||
#endif /* CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32 */
|
||||
cmd->DataMode = QSPI_DATA_4_LINES;
|
||||
cmd->DummyCycles = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue