aboutsummaryrefslogtreecommitdiff
path: root/cmd/sf.c
diff options
context:
space:
mode:
authorDhruva Gole2023-01-03 12:01:12 +0530
committerJagan Teki2023-01-26 21:01:56 +0530
commit53f4ef0a4b809e6c147fb8deed03354631b2f564 (patch)
tree6b26a1112022a28551b72dd0ee802275cf523626 /cmd/sf.c
parent2330af2722d1b5f0772538b0a5cede217a331638 (diff)
spi: cadence_qspi: use STIG mode for small reads
Fix the issue where some flash chips like cypress S25HS256T return the value of the same register over and over in DAC mode. For example in the TI K3-AM62x Processors refer [0] Technical Reference Manual there is a layer of digital logic in front of the QSPI/OSPI Drive when used in DAC mode. This is part of the Flash Subsystem (FSS) which provides access to external Flash devices. The FSS0_0_SYSCONFIG Register (Offset = 4h) has a BIT Field for OSPI_32B_DISABLE_MODE which has a Reset value = 0. This means, OSPI 32bit mode enabled by default. Thus, by default controller operates in 32 bit mode causing it to always align all data to 4 bytes from a 4byte aligned address. In some flash chips like cypress for example if we try to read some regs in DAC mode then it keeps sending the value of the first register that was requested and inorder to read the next reg, we have to stop and re-initiate a new transaction. This causes wrong register values to be read than what is desired when registers are read in DAC mode. Hence if the data.nbytes is very less then prefer STIG mode for such small reads. [0] https://www.ti.com/lit/ug/spruiv7a/spruiv7a.pdf Tested-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Dhruva Gole <d-gole@ti.com> [jagan: add tab space for comments] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'cmd/sf.c')
0 files changed, 0 insertions, 0 deletions