|
22 | 22 | * Target: VMK180 Evaluation Board (VM1802 Versal Prime) |
23 | 23 | * |
24 | 24 | * Features: |
25 | | - * - UART driver (Cadence UART) |
| 25 | + * - UART driver (Cadence UART / ARM PL011) |
26 | 26 | * - ARM Generic Timer |
27 | | - * - Flash stubs (OSPI/SD to be implemented) |
| 27 | + * - QSPI flash driver (GQSPI - dual parallel MT25QU01GBBB) |
| 28 | + * |
| 29 | + * QSPI Driver Notes: |
| 30 | + * This driver is a port of the ZynqMP GQSPI driver (hal/zynq.c) with the |
| 31 | + * following Versal-specific adaptations: |
| 32 | + * |
| 33 | + * 1. Different base address (0xF1030000 vs 0xFF0F0000) |
| 34 | + * 2. Tap delay bypass register is in QSPI block (not IOU_SLCR) |
| 35 | + * 3. Preserves PLM's QSPI configuration instead of full reset |
| 36 | + * 4. UART init skips MIO/clock setup when EL2 (PLM already did it) |
| 37 | + * |
| 38 | + * The register layout, GenFIFO format, and DMA interface are identical |
| 39 | + * to ZynqMP since both use the same Xilinx GQSPI IP block. |
| 40 | + * |
| 41 | + * See hal/versal.h for detailed comparison with ZynqMP. |
28 | 42 | */ |
29 | 43 |
|
30 | 44 | #ifdef TARGET_versal |
@@ -260,10 +274,31 @@ void hal_delay_us(uint32_t us) |
260 | 274 |
|
261 | 275 |
|
262 | 276 | /* ============================================================================ |
263 | | - * QSPI Flash Driver |
| 277 | + * QSPI Flash Driver (GQSPI) |
264 | 278 | * ============================================================================ |
265 | | - * Bare-metal QSPI driver for Versal VMK180 |
266 | | - * Dual parallel MT25QU01GBBB (128MB each, 256MB total) |
| 279 | + * Bare-metal QSPI driver for Versal VMK180. |
| 280 | + * Hardware: Dual parallel MT25QU01GBBB (128MB each, 256MB total). |
| 281 | + * |
| 282 | + * This driver is adapted from the ZynqMP GQSPI driver (hal/zynq.c). |
| 283 | + * Both platforms use the same Xilinx GQSPI IP block with identical: |
| 284 | + * - Register offsets (GQSPI at +0x100, DMA at +0x800 from base) |
| 285 | + * - GenFIFO entry format (command, address, data, stripe bits) |
| 286 | + * - Interrupt status bits and DMA interface |
| 287 | + * |
| 288 | + * Versal-specific differences from ZynqMP: |
| 289 | + * - Base address: 0xF1030000 (vs 0xFF0F0000 on ZynqMP) |
| 290 | + * - Tap delay register: In QSPI block (vs IOU_SLCR on ZynqMP) |
| 291 | + * - Initialization: Preserves PLM config (vs full reset on ZynqMP) |
| 292 | + * |
| 293 | + * Supported modes (same as ZynqMP): |
| 294 | + * - DMA mode (default) or IO polling mode (GQSPI_MODE_IO) |
| 295 | + * - Quad SPI (4-bit), Dual SPI (2-bit), or Standard SPI (1-bit) |
| 296 | + * - 4-byte addressing for flash >16MB (GQPI_USE_4BYTE_ADDR) |
| 297 | + * - Dual parallel with hardware striping (GQPI_USE_DUAL_PARALLEL) |
| 298 | + * - EXP (exponent) length mode for large transfers |
| 299 | + * |
| 300 | + * Clock: 300MHz ref / (2 << DIV) = 75MHz default (DIV=1) |
| 301 | + * MT25QU01GBBB supports up to 133MHz for Quad Output Read. |
267 | 302 | */ |
268 | 303 |
|
269 | 304 | #ifdef EXT_FLASH |
|
0 commit comments