Skip to content

Commit 1e966ba

Browse files
arthur-mmlwkartben
authored andcommitted
drivers: memc: stm32_xspi_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 53f91ea commit 1e966ba

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

drivers/memc/memc_stm32_xspi_psram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static struct memc_stm32_xspi_psram_data memc_stm32_xspi_data = {
400400
.WrapSize = HAL_XSPI_WRAP_NOT_SUPPORTED,
401401
.SampleShifting = HAL_XSPI_SAMPLE_SHIFT_NONE,
402402
.DelayHoldQuarterCycle = HAL_XSPI_DHQC_ENABLE,
403-
.ChipSelectBoundary = HAL_XSPI_BONDARYOF_16KB,
403+
.ChipSelectBoundary = DT_INST_PROP(0, st_csbound),
404404
.MaxTran = 0U,
405405
.Refresh = 0x81U,
406406
.MemorySelect = HAL_XSPI_CSSEL_NCS1,

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

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

0 commit comments

Comments
 (0)