Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
&quadspi_bk2_io0_ph2
&quadspi_bk2_io1_ph3>;
dual-flash;
ssht-enable;
status = "okay";

mt25ql512ab1: qspi-nor-flash-1@0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ zephyr_udc0: &usbotg_hs {
&quadspi_bk2_io2_pg9 &quadspi_bk2_io3_pg14>;
pinctrl-names = "default";
dual-flash;
ssht-enable;
status = "okay";

mt25ql512ab1: qspi-nor-flash-1@0 {
Expand Down
1 change: 1 addition & 0 deletions boards/st/stm32h750b_dk/stm32h750b_dk-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
* and accessed simultaneously, 4bits sent to/received from each.
*/
dual-flash;
ssht-enable;
status = "okay";

ext_flash_ctrl: qspi-flash-controller@0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ zephyr_udc0: &usbotg_hs {
&quadspi_bk2_io2_pg9 &quadspi_bk2_io3_pg14>;
pinctrl-names = "default";
dual-flash;
ssht-enable;
status = "okay";

mt25ql512ab1: qspi-nor-flash-1@0 {
Expand Down
5 changes: 3 additions & 2 deletions drivers/flash/flash_stm32_qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,6 @@ static int flash_stm32_qspi_init(const struct device *dev)
dev_data->hqspi.Init.ClockPrescaler = prescaler;
/* Give a bit position from 0 to 31 to the HAL init minus 1 for the DCR1 reg */
dev_data->hqspi.Init.FlashSize = find_lsb_set(dev_cfg->flash_size) - 2;
dev_data->hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
dev_data->hqspi.Init.ChipSelectHighTime = dev_cfg->cs_high_time - 1;
#if STM32_QSPI_DOUBLE_FLASH
dev_data->hqspi.Init.DualFlash = QSPI_DUALFLASH_ENABLE;
Expand Down Expand Up @@ -1840,7 +1839,9 @@ static struct flash_stm32_qspi_data flash_stm32_qspi_dev_data = {
.Instance = (QUADSPI_TypeDef *)DT_REG_ADDR(STM32_QSPI_NODE),
.Init = {
.FifoThreshold = STM32_QSPI_FIFO_THRESHOLD,
.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE,
.SampleShifting = DT_PROP(STM32_QSPI_NODE, ssht_enable)
? QSPI_SAMPLE_SHIFTING_HALFCYCLE
: QSPI_SAMPLE_SHIFTING_NONE,
.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE,
.ClockMode = QSPI_CLOCK_MODE_0,
},
Expand Down
7 changes: 7 additions & 0 deletions dts/bindings/qspi/st,stm32-qspi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ properties:
For example
dma-names = "tx_rx";

ssht-enable:
type: boolean
description: |
Enables Sample Shifting half-cycle.

It is recommended to be enabled in STR mode and disabled in DTR mode.

dual-flash:
type: boolean
description: |
Expand Down