Skip to content

Commit b671ec9

Browse files
committed
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 <arthur.gay@marshmallow.kids>
1 parent 624181d commit b671ec9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,13 @@ 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: 10
154+
description: |
155+
Limit a transaction to a boundary of aligned addresses. The size of the
156+
address to be aligned with is given by the value: 2^n bits, where n is
157+
the value of this property. A value of 0 means no boundary.
158+
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
159+
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]

0 commit comments

Comments
 (0)