Skip to content

Commit d1ea753

Browse files
arthur-mmlwkartben
authored andcommitted
drivers: memc: stm32_ospi_psram: make NCS boundary configurable in dt
Limit a transaction to a boundary of aligned addresses. Each PSRAM may specify different configuration. Signed-off-by: Arthur Gay <[email protected]>
1 parent 1e966ba commit d1ea753

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

drivers/memc/memc_stm32_ospi_psram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static struct memc_stm32_ospi_psram_data memc_stm32_ospi_data = {
435435
.WrapSize = HAL_OSPI_WRAP_NOT_SUPPORTED,
436436
.SampleShifting = HAL_OSPI_SAMPLE_SHIFTING_NONE,
437437
.DelayHoldQuarterCycle = HAL_OSPI_DHQC_ENABLE,
438-
.ChipSelectBoundary = 10,
438+
.ChipSelectBoundary = DT_INST_PROP(0, st_csbound),
439439
.DelayBlockBypass = HAL_OSPI_DELAY_BLOCK_USED,
440440
.MaxTran = 0,
441441
.Refresh = 320,

dts/bindings/memory-controllers/st,stm32-ospi-psram.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,16 @@ properties:
147147
If enabled, the device will burst through the initial wrapped burst length
148148
once, then continue to burst incrementally up to maximum column address
149149
(1K) before wrapping around within the entire column address space.
150+
151+
st,csbound:
152+
type: int
153+
default: 3
154+
description: |
155+
Limit a transaction to a boundary of aligned addresses. The size of the
156+
alignment is given by the value: 2^(csbound) bits.
157+
A csbound value of 0 means the feature is disabled.
158+
The default is the minimum recommended value in the Reference Manual. It
159+
is recommended to set this value according to the length of the burst wrap
160+
of the PSRAM device for the linear burst command.
161+
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
162+
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]

0 commit comments

Comments
 (0)