cadence_qspi: fix odd byte read issue in STIG mode
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Wed, 2 Jul 2025 05:39:53 +0000 (11:09 +0530)
committerMichal Simek <michal.simek@amd.com>
Tue, 8 Jul 2025 13:01:25 +0000 (15:01 +0200)
commit6b772a0bcc1a3b03b6cfce30864a22149b613036
tree2e05dd43a781ae7af6a566cf0202947d1cb295c4
parentbfa3f147e1b5df74db8cdffbef5a276d2c2daec3
cadence_qspi: fix odd byte read issue in STIG mode

In DDR mode, even bytes are read using DMA, while the remaining odd
bytes are read using STIG mode. However, the data is not correctly
transferred into the flash read data lower register because the
supplementary byte of the STIG opcode is not being written to the
opcode extension register, resulting in incorrect data being read.

To resolve this issue, when using STIG transactions, the corresponding
supplementary byte of any STIG opcode must be defined in the Opcode
Extension Register (Lower). Issue has been observed on the Macronix
MX66UM2G45G flashes.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250702053953.640046-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/spi/cadence_ospi_versal.c
drivers/spi/cadence_qspi.h
drivers/spi/cadence_qspi_apb.c