// THIS HEADER FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT/** * Copyright (c) 2024 Raspberry Pi Ltd. * * SPDX-License-Identifier: BSD-3-Clause *//* ... */// =============================================================================// Register block : QMI// Version : 1// Bus type : apb// Description : QSPI Memory Interface.//// Provides a memory-mapped interface to up to two// SPI/DSPI/QSPI flash or PSRAM devices. Also provides a serial// interface for programming and configuration of the external// device.// =============================================================================#ifndef_HARDWARE_REGS_QMI_H#define_HARDWARE_REGS_QMI_H// =============================================================================// Register : QMI_DIRECT_CSR// Description : Control and status for direct serial mode//// Direct serial mode allows the processor to send and receive raw// serial frames, for programming, configuration and control of// the external memory devices. Only SPI mode 0 (CPOL=0 CPHA=0) is// supported.#defineQMI_DIRECT_CSR_OFFSET_u(0x00000000)#defineQMI_DIRECT_CSR_BITS_u(0xffdf7ccf)#defineQMI_DIRECT_CSR_RESET_u(0x01800000)// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_RXDELAY// Description : Delay the read data sample timing, in units of one half of a// system clock cycle. (Not necessarily half of an SCK cycle.)#defineQMI_DIRECT_CSR_RXDELAY_RESET_u(0x0)#defineQMI_DIRECT_CSR_RXDELAY_BITS_u(0xc0000000)#defineQMI_DIRECT_CSR_RXDELAY_MSB_u(31)#defineQMI_DIRECT_CSR_RXDELAY_LSB_u(30)#defineQMI_DIRECT_CSR_RXDELAY_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_CLKDIV// Description : Clock divisor for direct serial mode. Divisors of 1..255 are// encoded directly, and the maximum divisor of 256 is encoded by// a value of CLKDIV=0.//// The clock divisor can be changed on-the-fly by software,// without halting or otherwise coordinating with the serial// interface. The serial interface will sample the latest clock// divisor each time it begins the transmission of a new byte.#defineQMI_DIRECT_CSR_CLKDIV_RESET_u(0x06)#defineQMI_DIRECT_CSR_CLKDIV_BITS_u(0x3fc00000)#defineQMI_DIRECT_CSR_CLKDIV_MSB_u(29)#defineQMI_DIRECT_CSR_CLKDIV_LSB_u(22)#defineQMI_DIRECT_CSR_CLKDIV_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_RXLEVEL// Description : Current level of DIRECT_RX FIFO#defineQMI_DIRECT_CSR_RXLEVEL_RESET_u(0x0)#defineQMI_DIRECT_CSR_RXLEVEL_BITS_u(0x001c0000)#defineQMI_DIRECT_CSR_RXLEVEL_MSB_u(20)#defineQMI_DIRECT_CSR_RXLEVEL_LSB_u(18)#defineQMI_DIRECT_CSR_RXLEVEL_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_RXFULL// Description : When 1, the DIRECT_RX FIFO is currently full. The serial// interface will be stalled until data is popped; the interface// will not begin a new serial frame when the DIRECT_TX FIFO is// empty or the DIRECT_RX FIFO is full.#defineQMI_DIRECT_CSR_RXFULL_RESET_u(0x0)#defineQMI_DIRECT_CSR_RXFULL_BITS_u(0x00020000)#defineQMI_DIRECT_CSR_RXFULL_MSB_u(17)#defineQMI_DIRECT_CSR_RXFULL_LSB_u(17)#defineQMI_DIRECT_CSR_RXFULL_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_RXEMPTY// Description : When 1, the DIRECT_RX FIFO is currently empty. If the processor// attempts to read more data, the FIFO state is not affected, but// the value returned to the processor is undefined.#defineQMI_DIRECT_CSR_RXEMPTY_RESET_u(0x0)#defineQMI_DIRECT_CSR_RXEMPTY_BITS_u(0x00010000)#defineQMI_DIRECT_CSR_RXEMPTY_MSB_u(16)#defineQMI_DIRECT_CSR_RXEMPTY_LSB_u(16)#defineQMI_DIRECT_CSR_RXEMPTY_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_TXLEVEL// Description : Current level of DIRECT_TX FIFO#defineQMI_DIRECT_CSR_TXLEVEL_RESET_u(0x0)#defineQMI_DIRECT_CSR_TXLEVEL_BITS_u(0x00007000)#defineQMI_DIRECT_CSR_TXLEVEL_MSB_u(14)#defineQMI_DIRECT_CSR_TXLEVEL_LSB_u(12)#defineQMI_DIRECT_CSR_TXLEVEL_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_TXEMPTY// Description : When 1, the DIRECT_TX FIFO is currently empty. Unless the// processor pushes more data, transmission will stop and BUSY// will go low once the current 8-bit serial frame completes.#defineQMI_DIRECT_CSR_TXEMPTY_RESET_u(0x0)#defineQMI_DIRECT_CSR_TXEMPTY_BITS_u(0x00000800)#defineQMI_DIRECT_CSR_TXEMPTY_MSB_u(11)#defineQMI_DIRECT_CSR_TXEMPTY_LSB_u(11)#defineQMI_DIRECT_CSR_TXEMPTY_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_TXFULL// Description : When 1, the DIRECT_TX FIFO is currently full. If the processor// tries to write more data, that data will be ignored.#defineQMI_DIRECT_CSR_TXFULL_RESET_u(0x0)#defineQMI_DIRECT_CSR_TXFULL_BITS_u(0x00000400)#defineQMI_DIRECT_CSR_TXFULL_MSB_u(10)#defineQMI_DIRECT_CSR_TXFULL_LSB_u(10)#defineQMI_DIRECT_CSR_TXFULL_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_AUTO_CS1N// Description : When 1, automatically assert the CS1n chip select line whenever// the BUSY flag is set.#defineQMI_DIRECT_CSR_AUTO_CS1N_RESET_u(0x0)#defineQMI_DIRECT_CSR_AUTO_CS1N_BITS_u(0x00000080)#defineQMI_DIRECT_CSR_AUTO_CS1N_MSB_u(7)#defineQMI_DIRECT_CSR_AUTO_CS1N_LSB_u(7)#defineQMI_DIRECT_CSR_AUTO_CS1N_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_AUTO_CS0N// Description : When 1, automatically assert the CS0n chip select line whenever// the BUSY flag is set.#defineQMI_DIRECT_CSR_AUTO_CS0N_RESET_u(0x0)#defineQMI_DIRECT_CSR_AUTO_CS0N_BITS_u(0x00000040)#defineQMI_DIRECT_CSR_AUTO_CS0N_MSB_u(6)#defineQMI_DIRECT_CSR_AUTO_CS0N_LSB_u(6)#defineQMI_DIRECT_CSR_AUTO_CS0N_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_ASSERT_CS1N// Description : When 1, assert (i.e. drive low) the CS1n chip select line.//// Note that this applies even when DIRECT_CSR_EN is 0.#defineQMI_DIRECT_CSR_ASSERT_CS1N_RESET_u(0x0)#defineQMI_DIRECT_CSR_ASSERT_CS1N_BITS_u(0x00000008)#defineQMI_DIRECT_CSR_ASSERT_CS1N_MSB_u(3)#defineQMI_DIRECT_CSR_ASSERT_CS1N_LSB_u(3)#defineQMI_DIRECT_CSR_ASSERT_CS1N_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_ASSERT_CS0N// Description : When 1, assert (i.e. drive low) the CS0n chip select line.//// Note that this applies even when DIRECT_CSR_EN is 0.#defineQMI_DIRECT_CSR_ASSERT_CS0N_RESET_u(0x0)#defineQMI_DIRECT_CSR_ASSERT_CS0N_BITS_u(0x00000004)#defineQMI_DIRECT_CSR_ASSERT_CS0N_MSB_u(2)#defineQMI_DIRECT_CSR_ASSERT_CS0N_LSB_u(2)#defineQMI_DIRECT_CSR_ASSERT_CS0N_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_BUSY// Description : Direct mode busy flag. If 1, data is currently being shifted// in/out (or would be if the interface were not stalled on the RX// FIFO), and the chip select must not yet be deasserted.//// The busy flag will also be set to 1 if a memory-mapped transfer// is still in progress when direct mode is enabled. Direct mode// blocks new memory-mapped transfers, but can't halt a transfer// that is already in progress. If there is a chance that memory-// mapped transfers may be in progress, the busy flag should be// polled for 0 before asserting the chip select.//// (In practice you will usually discover this timing condition// through other means, because any subsequent memory-mapped// transfers when direct mode is enabled will return bus errors,// which are difficult to ignore.)#defineQMI_DIRECT_CSR_BUSY_RESET_u(0x0)#defineQMI_DIRECT_CSR_BUSY_BITS_u(0x00000002)#defineQMI_DIRECT_CSR_BUSY_MSB_u(1)#defineQMI_DIRECT_CSR_BUSY_LSB_u(1)#defineQMI_DIRECT_CSR_BUSY_ACCESS"RO"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_CSR_EN// Description : Enable direct mode.//// In direct mode, software controls the chip select lines, and// can perform direct SPI transfers by pushing data to the// DIRECT_TX FIFO, and popping the same amount of data from the// DIRECT_RX FIFO.//// Memory-mapped accesses will generate bus errors when direct// serial mode is enabled.#defineQMI_DIRECT_CSR_EN_RESET_u(0x0)#defineQMI_DIRECT_CSR_EN_BITS_u(0x00000001)#defineQMI_DIRECT_CSR_EN_MSB_u(0)#defineQMI_DIRECT_CSR_EN_LSB_u(0)#defineQMI_DIRECT_CSR_EN_ACCESS"RW"// =============================================================================// Register : QMI_DIRECT_TX// Description : Transmit FIFO for direct mode#defineQMI_DIRECT_TX_OFFSET_u(0x00000004)#defineQMI_DIRECT_TX_BITS_u(0x001fffff)#defineQMI_DIRECT_TX_RESET_u(0x00000000)// -----------------------------------------------------------------------------// Field : QMI_DIRECT_TX_NOPUSH// Description : Inhibit the RX FIFO push that would correspond to this TX FIFO// entry.//// Useful to avoid garbage appearing in the RX FIFO when pushing// the command at the beginning of a SPI transfer.#defineQMI_DIRECT_TX_NOPUSH_RESET_u(0x0)#defineQMI_DIRECT_TX_NOPUSH_BITS_u(0x00100000)#defineQMI_DIRECT_TX_NOPUSH_MSB_u(20)#defineQMI_DIRECT_TX_NOPUSH_LSB_u(20)#defineQMI_DIRECT_TX_NOPUSH_ACCESS"WF"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_TX_OE// Description : Output enable (active-high). For single width (SPI), this field// is ignored, and SD0 is always set to output, with SD1 always// set to input.//// For dual and quad width (DSPI/QSPI), this sets whether the// relevant SDx pads are set to output whilst transferring this// FIFO record. In this case the command/address should have OE// set, and the data transfer should have OE set or clear// depending on the direction of the transfer.#defineQMI_DIRECT_TX_OE_RESET_u(0x0)#defineQMI_DIRECT_TX_OE_BITS_u(0x00080000)#defineQMI_DIRECT_TX_OE_MSB_u(19)#defineQMI_DIRECT_TX_OE_LSB_u(19)#defineQMI_DIRECT_TX_OE_ACCESS"WF"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_TX_DWIDTH// Description : Data width. If 0, hardware will transmit the 8 LSBs of the// DIRECT_TX DATA field, and return an 8-bit value in the 8 LSBs// of DIRECT_RX. If 1, the full 16-bit width is used. 8-bit and// 16-bit transfers can be mixed freely.#defineQMI_DIRECT_TX_DWIDTH_RESET_u(0x0)#defineQMI_DIRECT_TX_DWIDTH_BITS_u(0x00040000)#defineQMI_DIRECT_TX_DWIDTH_MSB_u(18)#defineQMI_DIRECT_TX_DWIDTH_LSB_u(18)#defineQMI_DIRECT_TX_DWIDTH_ACCESS"WF"// -----------------------------------------------------------------------------// Field : QMI_DIRECT_TX_IWIDTH// Description : Configure whether this FIFO record is transferred with// single/dual/quad interface width (0/1/2). Different widths can// be mixed freely.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_DIRECT_TX_IWIDTH_RESET_u(0x0)#defineQMI_DIRECT_TX_IWIDTH_BITS_u(0x00030000)#defineQMI_DIRECT_TX_IWIDTH_MSB_u(17)#defineQMI_DIRECT_TX_IWIDTH_LSB_u(16)#defineQMI_DIRECT_TX_IWIDTH_ACCESS"WF"#defineQMI_DIRECT_TX_IWIDTH_VALUE_S_u(0x0)#defineQMI_DIRECT_TX_IWIDTH_VALUE_D_u(0x1)#defineQMI_DIRECT_TX_IWIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_DIRECT_TX_DATA// Description : Data pushed here will be clocked out falling edges of SCK (or// before the very first rising edge of SCK, if this is the first// pulse). For each byte clocked out, the interface will// simultaneously sample one byte, on rising edges of SCK, and// push this to the DIRECT_RX FIFO.//// For 16-bit data, the least-significant byte is transmitted// first.#defineQMI_DIRECT_TX_DATA_RESET_u(0x0000)#defineQMI_DIRECT_TX_DATA_BITS_u(0x0000ffff)#defineQMI_DIRECT_TX_DATA_MSB_u(15)#defineQMI_DIRECT_TX_DATA_LSB_u(0)#defineQMI_DIRECT_TX_DATA_ACCESS"WF"// =============================================================================// Register : QMI_DIRECT_RX// Description : Receive FIFO for direct mode// With each byte clocked out on the serial interface, one byte// will simultaneously be clocked in, and will appear in this// FIFO. The serial interface will stall when this FIFO is full,// to avoid dropping data.//// When 16-bit data is pushed into the TX FIFO, the corresponding// RX FIFO push will also contain 16 bits of data. The least-// significant byte is the first one received.#defineQMI_DIRECT_RX_OFFSET_u(0x00000008)#defineQMI_DIRECT_RX_BITS_u(0x0000ffff)#defineQMI_DIRECT_RX_RESET_u(0x00000000)#defineQMI_DIRECT_RX_MSB_u(15)#defineQMI_DIRECT_RX_LSB_u(0)#defineQMI_DIRECT_RX_ACCESS"RF"// =============================================================================// Register : QMI_M0_TIMING// Description : Timing configuration register for memory address window 0.#defineQMI_M0_TIMING_OFFSET_u(0x0000000c)#defineQMI_M0_TIMING_BITS_u(0xf3fff7ff)#defineQMI_M0_TIMING_RESET_u(0x40000004)// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_COOLDOWN// Description : Chip select cooldown period. When a memory transfer finishes,// the chip select remains asserted for 64 x COOLDOWN system clock// cycles, plus half an SCK clock period (rounded up for odd SCK// divisors). After this cooldown expires, the chip select is// always deasserted to save power.//// If the next memory access arrives within the cooldown period,// the QMI may be able to append more SCK cycles to the currently// ongoing SPI transfer, rather than starting a new transfer. This// reduces access latency and increases bus throughput.//// Specifically, the next access must be in the same direction// (read/write), access the same memory window (chip select 0/1),// and follow sequentially the address of the last transfer. If// any of these are false, the new access will first deassert the// chip select, then begin a new transfer.//// If COOLDOWN is 0, the address alignment configured by PAGEBREAK// has been reached, or the total chip select assertion limit// MAX_SELECT has been reached, the cooldown period is skipped,// and the chip select will always be deasserted one half SCK// period after the transfer finishes.#defineQMI_M0_TIMING_COOLDOWN_RESET_u(0x1)#defineQMI_M0_TIMING_COOLDOWN_BITS_u(0xc0000000)#defineQMI_M0_TIMING_COOLDOWN_MSB_u(31)#defineQMI_M0_TIMING_COOLDOWN_LSB_u(30)#defineQMI_M0_TIMING_COOLDOWN_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_PAGEBREAK// Description : When page break is enabled, chip select will automatically// deassert when crossing certain power-of-2-aligned address// boundaries. The next access will always begin a new read/write// SPI burst, even if the address of the next access follows in// sequence with the last access before the page boundary.//// Some flash and PSRAM devices forbid crossing page boundaries// with a single read/write transfer, or restrict the operating// frequency for transfers that do cross page a boundary. This// option allows the QMI to safely support those devices.//// This field has no effect when COOLDOWN is disabled.// 0x0 -> No page boundary is enforced// 0x1 -> Break bursts crossing a 256-byte page boundary// 0x2 -> Break bursts crossing a 1024-byte quad-page boundary// 0x3 -> Break bursts crossing a 4096-byte sector boundary#defineQMI_M0_TIMING_PAGEBREAK_RESET_u(0x0)#defineQMI_M0_TIMING_PAGEBREAK_BITS_u(0x30000000)#defineQMI_M0_TIMING_PAGEBREAK_MSB_u(29)#defineQMI_M0_TIMING_PAGEBREAK_LSB_u(28)#defineQMI_M0_TIMING_PAGEBREAK_ACCESS"RW"#defineQMI_M0_TIMING_PAGEBREAK_VALUE_NONE_u(0x0)#defineQMI_M0_TIMING_PAGEBREAK_VALUE_256_u(0x1)#defineQMI_M0_TIMING_PAGEBREAK_VALUE_1024_u(0x2)#defineQMI_M0_TIMING_PAGEBREAK_VALUE_4096_u(0x3)// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_SELECT_SETUP// Description : Add up to one additional system clock cycle of setup between// chip select assertion and the first rising edge of SCK.//// The default setup time is one half SCK period, which is usually// sufficient except for very high SCK frequencies with some flash// devices.#defineQMI_M0_TIMING_SELECT_SETUP_RESET_u(0x0)#defineQMI_M0_TIMING_SELECT_SETUP_BITS_u(0x02000000)#defineQMI_M0_TIMING_SELECT_SETUP_MSB_u(25)#defineQMI_M0_TIMING_SELECT_SETUP_LSB_u(25)#defineQMI_M0_TIMING_SELECT_SETUP_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_SELECT_HOLD// Description : Add up to three additional system clock cycles of active hold// between the last falling edge of SCK and the deassertion of// this window's chip select.//// The default hold time is one system clock cycle. Note that// flash datasheets usually give chip select active hold time from// the last *rising* edge of SCK, and so even zero hold from the// last falling edge would be safe.//// Note that this is a minimum hold time guaranteed by the QMI:// the actual chip select active hold may be slightly longer for// read transfers with low clock divisors and/or high sample// delays. Specifically, if the point two cycles after the last RX// data sample is later than the last SCK falling edge, then the// hold time is measured from *this* point.//// Note also that, in case the final SCK pulse is masked to save// energy (true for non-DTR reads when COOLDOWN is disabled or// PAGE_BREAK is reached), all of QMI's timing logic behaves as// though the clock pulse were still present. The SELECT_HOLD time// is applied from the point where the last SCK falling edge would// be if the clock pulse were not masked.#defineQMI_M0_TIMING_SELECT_HOLD_RESET_u(0x0)#defineQMI_M0_TIMING_SELECT_HOLD_BITS_u(0x01800000)#defineQMI_M0_TIMING_SELECT_HOLD_MSB_u(24)#defineQMI_M0_TIMING_SELECT_HOLD_LSB_u(23)#defineQMI_M0_TIMING_SELECT_HOLD_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_MAX_SELECT// Description : Enforce a maximum assertion duration for this window's chip// select, in units of 64 system clock cycles. If 0, the QMI is// permitted to keep the chip select asserted indefinitely when// servicing sequential memory accesses (see COOLDOWN).//// This feature is required to meet timing constraints of PSRAM// devices, which specify a maximum chip select assertion so they// can perform DRAM refresh cycles. See also MIN_DESELECT, which// can enforce a minimum deselect time.//// If a memory access is in progress at the time MAX_SELECT is// reached, the QMI will wait for the access to complete before// deasserting the chip select. This additional time must be// accounted for to calculate a safe MAX_SELECT value. In the// worst case, this may be a fully-formed serial transfer,// including command prefix and address, with a data payload as// large as one cache line.#defineQMI_M0_TIMING_MAX_SELECT_RESET_u(0x00)#defineQMI_M0_TIMING_MAX_SELECT_BITS_u(0x007e0000)#defineQMI_M0_TIMING_MAX_SELECT_MSB_u(22)#defineQMI_M0_TIMING_MAX_SELECT_LSB_u(17)#defineQMI_M0_TIMING_MAX_SELECT_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_MIN_DESELECT// Description : After this window's chip select is deasserted, it remains// deasserted for half an SCK cycle (rounded up to an integer// number of system clock cycles), plus MIN_DESELECT additional// system clock cycles, before the QMI reasserts either chip// select pin.//// Nonzero values may be required for PSRAM devices which enforce// a longer minimum CS deselect time, so that they can perform// internal DRAM refresh cycles whilst deselected.#defineQMI_M0_TIMING_MIN_DESELECT_RESET_u(0x00)#defineQMI_M0_TIMING_MIN_DESELECT_BITS_u(0x0001f000)#defineQMI_M0_TIMING_MIN_DESELECT_MSB_u(16)#defineQMI_M0_TIMING_MIN_DESELECT_LSB_u(12)#defineQMI_M0_TIMING_MIN_DESELECT_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_RXDELAY// Description : Delay the read data sample timing, in units of one half of a// system clock cycle. (Not necessarily half of an SCK cycle.) An// RXDELAY of 0 means the sample is captured at the SDI input// registers simultaneously with the rising edge of SCK launched// from the SCK output register.//// At higher SCK frequencies, RXDELAY may need to be increased to// account for the round trip delay of the pads, and the clock-// to-Q delay of the QSPI memory device.#defineQMI_M0_TIMING_RXDELAY_RESET_u(0x0)#defineQMI_M0_TIMING_RXDELAY_BITS_u(0x00000700)#defineQMI_M0_TIMING_RXDELAY_MSB_u(10)#defineQMI_M0_TIMING_RXDELAY_LSB_u(8)#defineQMI_M0_TIMING_RXDELAY_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_TIMING_CLKDIV// Description : Clock divisor. Odd and even divisors are supported. Defines the// SCK clock period in units of 1 system clock cycle. Divisors// 1..255 are encoded directly, and a divisor of 256 is encoded// with a value of CLKDIV=0.//// The clock divisor can be changed on-the-fly, even when the QMI// is currently accessing memory in this address window. All other// parameters must only be changed when the QMI is idle.//// If software is increasing CLKDIV in anticipation of an increase// in the system clock frequency, a dummy access to either memory// window (and appropriate processor barriers/fences) must be// inserted after the Mx_TIMING write to ensure the SCK divisor// change is in effect _before_ the system clock is changed.#defineQMI_M0_TIMING_CLKDIV_RESET_u(0x04)#defineQMI_M0_TIMING_CLKDIV_BITS_u(0x000000ff)#defineQMI_M0_TIMING_CLKDIV_MSB_u(7)#defineQMI_M0_TIMING_CLKDIV_LSB_u(0)#defineQMI_M0_TIMING_CLKDIV_ACCESS"RW"// =============================================================================// Register : QMI_M0_RFMT// Description : Read transfer format configuration for memory address window 0.//// Configure the bus width of each transfer phase individually,// and configure the length or presence of the command prefix,// command suffix and dummy/turnaround transfer phases. Only// 24-bit addresses are supported.//// The reset value of the M0_RFMT register is configured to// support a basic 03h serial read transfer with no additional// configuration.#defineQMI_M0_RFMT_OFFSET_u(0x00000010)#defineQMI_M0_RFMT_BITS_u(0x1007d3ff)#defineQMI_M0_RFMT_RESET_u(0x00001000)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_DTR// Description : Enable double transfer rate (DTR) for read commands: address,// suffix and read data phases are active on both edges of SCK.// SDO data is launched centre-aligned on each SCK edge, and SDI// data is captured on the SCK edge that follows its launch.//// DTR is implemented by halving the clock rate; SCK has a period// of 2 x CLK_DIV throughout the transfer. The prefix and dummy// phases are still single transfer rate.//// If the suffix is quad-width, it must be 0 or 8 bits in length,// to ensure an even number of SCK edges.#defineQMI_M0_RFMT_DTR_RESET_u(0x0)#defineQMI_M0_RFMT_DTR_BITS_u(0x10000000)#defineQMI_M0_RFMT_DTR_MSB_u(28)#defineQMI_M0_RFMT_DTR_LSB_u(28)#defineQMI_M0_RFMT_DTR_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_DUMMY_LEN// Description : Length of dummy phase between command suffix and data phase, in// units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4// for single)// 0x0 -> No dummy phase// 0x1 -> 4 dummy bits// 0x2 -> 8 dummy bits// 0x3 -> 12 dummy bits// 0x4 -> 16 dummy bits// 0x5 -> 20 dummy bits// 0x6 -> 24 dummy bits// 0x7 -> 28 dummy bits#defineQMI_M0_RFMT_DUMMY_LEN_RESET_u(0x0)#defineQMI_M0_RFMT_DUMMY_LEN_BITS_u(0x00070000)#defineQMI_M0_RFMT_DUMMY_LEN_MSB_u(18)#defineQMI_M0_RFMT_DUMMY_LEN_LSB_u(16)#defineQMI_M0_RFMT_DUMMY_LEN_ACCESS"RW"#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_4_u(0x1)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_8_u(0x2)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_12_u(0x3)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_16_u(0x4)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_20_u(0x5)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_24_u(0x6)#defineQMI_M0_RFMT_DUMMY_LEN_VALUE_28_u(0x7)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_SUFFIX_LEN// Description : Length of post-address command suffix, in units of 4 bits.// (i.e. 1 cycle for quad width, 2 for dual, 4 for single)//// Only values of 0 and 8 bits are supported.// 0x0 -> No suffix// 0x2 -> 8-bit suffix#defineQMI_M0_RFMT_SUFFIX_LEN_RESET_u(0x0)#defineQMI_M0_RFMT_SUFFIX_LEN_BITS_u(0x0000c000)#defineQMI_M0_RFMT_SUFFIX_LEN_MSB_u(15)#defineQMI_M0_RFMT_SUFFIX_LEN_LSB_u(14)#defineQMI_M0_RFMT_SUFFIX_LEN_ACCESS"RW"#defineQMI_M0_RFMT_SUFFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_RFMT_SUFFIX_LEN_VALUE_8_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_PREFIX_LEN// Description : Length of command prefix, in units of 8 bits. (i.e. 2 cycles// for quad width, 4 for dual, 8 for single)// 0x0 -> No prefix// 0x1 -> 8-bit prefix#defineQMI_M0_RFMT_PREFIX_LEN_RESET_u(0x1)#defineQMI_M0_RFMT_PREFIX_LEN_BITS_u(0x00001000)#defineQMI_M0_RFMT_PREFIX_LEN_MSB_u(12)#defineQMI_M0_RFMT_PREFIX_LEN_LSB_u(12)#defineQMI_M0_RFMT_PREFIX_LEN_ACCESS"RW"#defineQMI_M0_RFMT_PREFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_RFMT_PREFIX_LEN_VALUE_8_u(0x1)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_DATA_WIDTH// Description : The width used for the data transfer// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_RFMT_DATA_WIDTH_RESET_u(0x0)#defineQMI_M0_RFMT_DATA_WIDTH_BITS_u(0x00000300)#defineQMI_M0_RFMT_DATA_WIDTH_MSB_u(9)#defineQMI_M0_RFMT_DATA_WIDTH_LSB_u(8)#defineQMI_M0_RFMT_DATA_WIDTH_ACCESS"RW"#defineQMI_M0_RFMT_DATA_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_RFMT_DATA_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_RFMT_DATA_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_DUMMY_WIDTH// Description : The width used for the dummy phase, if any.//// If width is single, SD0/MOSI is held asserted low during the// dummy phase, and SD1...SD3 are tristated. If width is// dual/quad, all IOs are tristated during the dummy phase.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_RFMT_DUMMY_WIDTH_RESET_u(0x0)#defineQMI_M0_RFMT_DUMMY_WIDTH_BITS_u(0x000000c0)#defineQMI_M0_RFMT_DUMMY_WIDTH_MSB_u(7)#defineQMI_M0_RFMT_DUMMY_WIDTH_LSB_u(6)#defineQMI_M0_RFMT_DUMMY_WIDTH_ACCESS"RW"#defineQMI_M0_RFMT_DUMMY_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_RFMT_DUMMY_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_RFMT_DUMMY_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_SUFFIX_WIDTH// Description : The width used for the post-address command suffix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_RFMT_SUFFIX_WIDTH_RESET_u(0x0)#defineQMI_M0_RFMT_SUFFIX_WIDTH_BITS_u(0x00000030)#defineQMI_M0_RFMT_SUFFIX_WIDTH_MSB_u(5)#defineQMI_M0_RFMT_SUFFIX_WIDTH_LSB_u(4)#defineQMI_M0_RFMT_SUFFIX_WIDTH_ACCESS"RW"#defineQMI_M0_RFMT_SUFFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_RFMT_SUFFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_RFMT_SUFFIX_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_ADDR_WIDTH// Description : The transfer width used for the address. The address phase// always transfers 24 bits in total.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_RFMT_ADDR_WIDTH_RESET_u(0x0)#defineQMI_M0_RFMT_ADDR_WIDTH_BITS_u(0x0000000c)#defineQMI_M0_RFMT_ADDR_WIDTH_MSB_u(3)#defineQMI_M0_RFMT_ADDR_WIDTH_LSB_u(2)#defineQMI_M0_RFMT_ADDR_WIDTH_ACCESS"RW"#defineQMI_M0_RFMT_ADDR_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_RFMT_ADDR_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_RFMT_ADDR_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_RFMT_PREFIX_WIDTH// Description : The transfer width used for the command prefix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_RFMT_PREFIX_WIDTH_RESET_u(0x0)#defineQMI_M0_RFMT_PREFIX_WIDTH_BITS_u(0x00000003)#defineQMI_M0_RFMT_PREFIX_WIDTH_MSB_u(1)#defineQMI_M0_RFMT_PREFIX_WIDTH_LSB_u(0)#defineQMI_M0_RFMT_PREFIX_WIDTH_ACCESS"RW"#defineQMI_M0_RFMT_PREFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_RFMT_PREFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_RFMT_PREFIX_WIDTH_VALUE_Q_u(0x2)// =============================================================================// Register : QMI_M0_RCMD// Description : Command constants used for reads from memory address window 0.//// The reset value of the M0_RCMD register is configured to// support a basic 03h serial read transfer with no additional// configuration.#defineQMI_M0_RCMD_OFFSET_u(0x00000014)#defineQMI_M0_RCMD_BITS_u(0x0000ffff)#defineQMI_M0_RCMD_RESET_u(0x0000a003)// -----------------------------------------------------------------------------// Field : QMI_M0_RCMD_SUFFIX// Description : The command suffix bits following the address, if// Mx_RFMT_SUFFIX_LEN is nonzero.#defineQMI_M0_RCMD_SUFFIX_RESET_u(0xa0)#defineQMI_M0_RCMD_SUFFIX_BITS_u(0x0000ff00)#defineQMI_M0_RCMD_SUFFIX_MSB_u(15)#defineQMI_M0_RCMD_SUFFIX_LSB_u(8)#defineQMI_M0_RCMD_SUFFIX_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_RCMD_PREFIX// Description : The command prefix bits to prepend on each new transfer, if// Mx_RFMT_PREFIX_LEN is nonzero.#defineQMI_M0_RCMD_PREFIX_RESET_u(0x03)#defineQMI_M0_RCMD_PREFIX_BITS_u(0x000000ff)#defineQMI_M0_RCMD_PREFIX_MSB_u(7)#defineQMI_M0_RCMD_PREFIX_LSB_u(0)#defineQMI_M0_RCMD_PREFIX_ACCESS"RW"// =============================================================================// Register : QMI_M0_WFMT// Description : Write transfer format configuration for memory address window// 0.//// Configure the bus width of each transfer phase individually,// and configure the length or presence of the command prefix,// command suffix and dummy/turnaround transfer phases. Only// 24-bit addresses are supported.//// The reset value of the M0_WFMT register is configured to// support a basic 02h serial write transfer. However, writes to// this window must first be enabled via the XIP_CTRL_WRITABLE_M0// bit, as XIP memory is read-only by default.#defineQMI_M0_WFMT_OFFSET_u(0x00000018)#defineQMI_M0_WFMT_BITS_u(0x1007d3ff)#defineQMI_M0_WFMT_RESET_u(0x00001000)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_DTR// Description : Enable double transfer rate (DTR) for write commands: address,// suffix and write data phases are active on both edges of SCK.// SDO data is launched centre-aligned on each SCK edge, and SDI// data is captured on the SCK edge that follows its launch.//// DTR is implemented by halving the clock rate; SCK has a period// of 2 x CLK_DIV throughout the transfer. The prefix and dummy// phases are still single transfer rate.//// If the suffix is quad-width, it must be 0 or 8 bits in length,// to ensure an even number of SCK edges.#defineQMI_M0_WFMT_DTR_RESET_u(0x0)#defineQMI_M0_WFMT_DTR_BITS_u(0x10000000)#defineQMI_M0_WFMT_DTR_MSB_u(28)#defineQMI_M0_WFMT_DTR_LSB_u(28)#defineQMI_M0_WFMT_DTR_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_DUMMY_LEN// Description : Length of dummy phase between command suffix and data phase, in// units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4// for single)// 0x0 -> No dummy phase// 0x1 -> 4 dummy bits// 0x2 -> 8 dummy bits// 0x3 -> 12 dummy bits// 0x4 -> 16 dummy bits// 0x5 -> 20 dummy bits// 0x6 -> 24 dummy bits// 0x7 -> 28 dummy bits#defineQMI_M0_WFMT_DUMMY_LEN_RESET_u(0x0)#defineQMI_M0_WFMT_DUMMY_LEN_BITS_u(0x00070000)#defineQMI_M0_WFMT_DUMMY_LEN_MSB_u(18)#defineQMI_M0_WFMT_DUMMY_LEN_LSB_u(16)#defineQMI_M0_WFMT_DUMMY_LEN_ACCESS"RW"#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_4_u(0x1)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_8_u(0x2)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_12_u(0x3)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_16_u(0x4)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_20_u(0x5)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_24_u(0x6)#defineQMI_M0_WFMT_DUMMY_LEN_VALUE_28_u(0x7)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_SUFFIX_LEN// Description : Length of post-address command suffix, in units of 4 bits.// (i.e. 1 cycle for quad width, 2 for dual, 4 for single)//// Only values of 0 and 8 bits are supported.// 0x0 -> No suffix// 0x2 -> 8-bit suffix#defineQMI_M0_WFMT_SUFFIX_LEN_RESET_u(0x0)#defineQMI_M0_WFMT_SUFFIX_LEN_BITS_u(0x0000c000)#defineQMI_M0_WFMT_SUFFIX_LEN_MSB_u(15)#defineQMI_M0_WFMT_SUFFIX_LEN_LSB_u(14)#defineQMI_M0_WFMT_SUFFIX_LEN_ACCESS"RW"#defineQMI_M0_WFMT_SUFFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_WFMT_SUFFIX_LEN_VALUE_8_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_PREFIX_LEN// Description : Length of command prefix, in units of 8 bits. (i.e. 2 cycles// for quad width, 4 for dual, 8 for single)// 0x0 -> No prefix// 0x1 -> 8-bit prefix#defineQMI_M0_WFMT_PREFIX_LEN_RESET_u(0x1)#defineQMI_M0_WFMT_PREFIX_LEN_BITS_u(0x00001000)#defineQMI_M0_WFMT_PREFIX_LEN_MSB_u(12)#defineQMI_M0_WFMT_PREFIX_LEN_LSB_u(12)#defineQMI_M0_WFMT_PREFIX_LEN_ACCESS"RW"#defineQMI_M0_WFMT_PREFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M0_WFMT_PREFIX_LEN_VALUE_8_u(0x1)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_DATA_WIDTH// Description : The width used for the data transfer// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_WFMT_DATA_WIDTH_RESET_u(0x0)#defineQMI_M0_WFMT_DATA_WIDTH_BITS_u(0x00000300)#defineQMI_M0_WFMT_DATA_WIDTH_MSB_u(9)#defineQMI_M0_WFMT_DATA_WIDTH_LSB_u(8)#defineQMI_M0_WFMT_DATA_WIDTH_ACCESS"RW"#defineQMI_M0_WFMT_DATA_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_WFMT_DATA_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_WFMT_DATA_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_DUMMY_WIDTH// Description : The width used for the dummy phase, if any.//// If width is single, SD0/MOSI is held asserted low during the// dummy phase, and SD1...SD3 are tristated. If width is// dual/quad, all IOs are tristated during the dummy phase.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_WFMT_DUMMY_WIDTH_RESET_u(0x0)#defineQMI_M0_WFMT_DUMMY_WIDTH_BITS_u(0x000000c0)#defineQMI_M0_WFMT_DUMMY_WIDTH_MSB_u(7)#defineQMI_M0_WFMT_DUMMY_WIDTH_LSB_u(6)#defineQMI_M0_WFMT_DUMMY_WIDTH_ACCESS"RW"#defineQMI_M0_WFMT_DUMMY_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_WFMT_DUMMY_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_WFMT_DUMMY_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_SUFFIX_WIDTH// Description : The width used for the post-address command suffix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_WFMT_SUFFIX_WIDTH_RESET_u(0x0)#defineQMI_M0_WFMT_SUFFIX_WIDTH_BITS_u(0x00000030)#defineQMI_M0_WFMT_SUFFIX_WIDTH_MSB_u(5)#defineQMI_M0_WFMT_SUFFIX_WIDTH_LSB_u(4)#defineQMI_M0_WFMT_SUFFIX_WIDTH_ACCESS"RW"#defineQMI_M0_WFMT_SUFFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_WFMT_SUFFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_WFMT_SUFFIX_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_ADDR_WIDTH// Description : The transfer width used for the address. The address phase// always transfers 24 bits in total.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_WFMT_ADDR_WIDTH_RESET_u(0x0)#defineQMI_M0_WFMT_ADDR_WIDTH_BITS_u(0x0000000c)#defineQMI_M0_WFMT_ADDR_WIDTH_MSB_u(3)#defineQMI_M0_WFMT_ADDR_WIDTH_LSB_u(2)#defineQMI_M0_WFMT_ADDR_WIDTH_ACCESS"RW"#defineQMI_M0_WFMT_ADDR_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_WFMT_ADDR_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_WFMT_ADDR_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M0_WFMT_PREFIX_WIDTH// Description : The transfer width used for the command prefix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M0_WFMT_PREFIX_WIDTH_RESET_u(0x0)#defineQMI_M0_WFMT_PREFIX_WIDTH_BITS_u(0x00000003)#defineQMI_M0_WFMT_PREFIX_WIDTH_MSB_u(1)#defineQMI_M0_WFMT_PREFIX_WIDTH_LSB_u(0)#defineQMI_M0_WFMT_PREFIX_WIDTH_ACCESS"RW"#defineQMI_M0_WFMT_PREFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M0_WFMT_PREFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M0_WFMT_PREFIX_WIDTH_VALUE_Q_u(0x2)// =============================================================================// Register : QMI_M0_WCMD// Description : Command constants used for writes to memory address window 0.//// The reset value of the M0_WCMD register is configured to// support a basic 02h serial write transfer with no additional// configuration.#defineQMI_M0_WCMD_OFFSET_u(0x0000001c)#defineQMI_M0_WCMD_BITS_u(0x0000ffff)#defineQMI_M0_WCMD_RESET_u(0x0000a002)// -----------------------------------------------------------------------------// Field : QMI_M0_WCMD_SUFFIX// Description : The command suffix bits following the address, if// Mx_WFMT_SUFFIX_LEN is nonzero.#defineQMI_M0_WCMD_SUFFIX_RESET_u(0xa0)#defineQMI_M0_WCMD_SUFFIX_BITS_u(0x0000ff00)#defineQMI_M0_WCMD_SUFFIX_MSB_u(15)#defineQMI_M0_WCMD_SUFFIX_LSB_u(8)#defineQMI_M0_WCMD_SUFFIX_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M0_WCMD_PREFIX// Description : The command prefix bits to prepend on each new transfer, if// Mx_WFMT_PREFIX_LEN is nonzero.#defineQMI_M0_WCMD_PREFIX_RESET_u(0x02)#defineQMI_M0_WCMD_PREFIX_BITS_u(0x000000ff)#defineQMI_M0_WCMD_PREFIX_MSB_u(7)#defineQMI_M0_WCMD_PREFIX_LSB_u(0)#defineQMI_M0_WCMD_PREFIX_ACCESS"RW"// =============================================================================// Register : QMI_M1_TIMING// Description : Timing configuration register for memory address window 1.#defineQMI_M1_TIMING_OFFSET_u(0x00000020)#defineQMI_M1_TIMING_BITS_u(0xf3fff7ff)#defineQMI_M1_TIMING_RESET_u(0x40000004)// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_COOLDOWN// Description : Chip select cooldown period. When a memory transfer finishes,// the chip select remains asserted for 64 x COOLDOWN system clock// cycles, plus half an SCK clock period (rounded up for odd SCK// divisors). After this cooldown expires, the chip select is// always deasserted to save power.//// If the next memory access arrives within the cooldown period,// the QMI may be able to append more SCK cycles to the currently// ongoing SPI transfer, rather than starting a new transfer. This// reduces access latency and increases bus throughput.//// Specifically, the next access must be in the same direction// (read/write), access the same memory window (chip select 0/1),// and follow sequentially the address of the last transfer. If// any of these are false, the new access will first deassert the// chip select, then begin a new transfer.//// If COOLDOWN is 0, the address alignment configured by PAGEBREAK// has been reached, or the total chip select assertion limit// MAX_SELECT has been reached, the cooldown period is skipped,// and the chip select will always be deasserted one half SCK// period after the transfer finishes.#defineQMI_M1_TIMING_COOLDOWN_RESET_u(0x1)#defineQMI_M1_TIMING_COOLDOWN_BITS_u(0xc0000000)#defineQMI_M1_TIMING_COOLDOWN_MSB_u(31)#defineQMI_M1_TIMING_COOLDOWN_LSB_u(30)#defineQMI_M1_TIMING_COOLDOWN_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_PAGEBREAK// Description : When page break is enabled, chip select will automatically// deassert when crossing certain power-of-2-aligned address// boundaries. The next access will always begin a new read/write// SPI burst, even if the address of the next access follows in// sequence with the last access before the page boundary.//// Some flash and PSRAM devices forbid crossing page boundaries// with a single read/write transfer, or restrict the operating// frequency for transfers that do cross page a boundary. This// option allows the QMI to safely support those devices.//// This field has no effect when COOLDOWN is disabled.// 0x0 -> No page boundary is enforced// 0x1 -> Break bursts crossing a 256-byte page boundary// 0x2 -> Break bursts crossing a 1024-byte quad-page boundary// 0x3 -> Break bursts crossing a 4096-byte sector boundary#defineQMI_M1_TIMING_PAGEBREAK_RESET_u(0x0)#defineQMI_M1_TIMING_PAGEBREAK_BITS_u(0x30000000)#defineQMI_M1_TIMING_PAGEBREAK_MSB_u(29)#defineQMI_M1_TIMING_PAGEBREAK_LSB_u(28)#defineQMI_M1_TIMING_PAGEBREAK_ACCESS"RW"#defineQMI_M1_TIMING_PAGEBREAK_VALUE_NONE_u(0x0)#defineQMI_M1_TIMING_PAGEBREAK_VALUE_256_u(0x1)#defineQMI_M1_TIMING_PAGEBREAK_VALUE_1024_u(0x2)#defineQMI_M1_TIMING_PAGEBREAK_VALUE_4096_u(0x3)// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_SELECT_SETUP// Description : Add up to one additional system clock cycle of setup between// chip select assertion and the first rising edge of SCK.//// The default setup time is one half SCK period, which is usually// sufficient except for very high SCK frequencies with some flash// devices.#defineQMI_M1_TIMING_SELECT_SETUP_RESET_u(0x0)#defineQMI_M1_TIMING_SELECT_SETUP_BITS_u(0x02000000)#defineQMI_M1_TIMING_SELECT_SETUP_MSB_u(25)#defineQMI_M1_TIMING_SELECT_SETUP_LSB_u(25)#defineQMI_M1_TIMING_SELECT_SETUP_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_SELECT_HOLD// Description : Add up to three additional system clock cycles of active hold// between the last falling edge of SCK and the deassertion of// this window's chip select.//// The default hold time is one system clock cycle. Note that// flash datasheets usually give chip select active hold time from// the last *rising* edge of SCK, and so even zero hold from the// last falling edge would be safe.//// Note that this is a minimum hold time guaranteed by the QMI:// the actual chip select active hold may be slightly longer for// read transfers with low clock divisors and/or high sample// delays. Specifically, if the point two cycles after the last RX// data sample is later than the last SCK falling edge, then the// hold time is measured from *this* point.//// Note also that, in case the final SCK pulse is masked to save// energy (true for non-DTR reads when COOLDOWN is disabled or// PAGE_BREAK is reached), all of QMI's timing logic behaves as// though the clock pulse were still present. The SELECT_HOLD time// is applied from the point where the last SCK falling edge would// be if the clock pulse were not masked.#defineQMI_M1_TIMING_SELECT_HOLD_RESET_u(0x0)#defineQMI_M1_TIMING_SELECT_HOLD_BITS_u(0x01800000)#defineQMI_M1_TIMING_SELECT_HOLD_MSB_u(24)#defineQMI_M1_TIMING_SELECT_HOLD_LSB_u(23)#defineQMI_M1_TIMING_SELECT_HOLD_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_MAX_SELECT// Description : Enforce a maximum assertion duration for this window's chip// select, in units of 64 system clock cycles. If 0, the QMI is// permitted to keep the chip select asserted indefinitely when// servicing sequential memory accesses (see COOLDOWN).//// This feature is required to meet timing constraints of PSRAM// devices, which specify a maximum chip select assertion so they// can perform DRAM refresh cycles. See also MIN_DESELECT, which// can enforce a minimum deselect time.//// If a memory access is in progress at the time MAX_SELECT is// reached, the QMI will wait for the access to complete before// deasserting the chip select. This additional time must be// accounted for to calculate a safe MAX_SELECT value. In the// worst case, this may be a fully-formed serial transfer,// including command prefix and address, with a data payload as// large as one cache line.#defineQMI_M1_TIMING_MAX_SELECT_RESET_u(0x00)#defineQMI_M1_TIMING_MAX_SELECT_BITS_u(0x007e0000)#defineQMI_M1_TIMING_MAX_SELECT_MSB_u(22)#defineQMI_M1_TIMING_MAX_SELECT_LSB_u(17)#defineQMI_M1_TIMING_MAX_SELECT_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_MIN_DESELECT// Description : After this window's chip select is deasserted, it remains// deasserted for half an SCK cycle (rounded up to an integer// number of system clock cycles), plus MIN_DESELECT additional// system clock cycles, before the QMI reasserts either chip// select pin.//// Nonzero values may be required for PSRAM devices which enforce// a longer minimum CS deselect time, so that they can perform// internal DRAM refresh cycles whilst deselected.#defineQMI_M1_TIMING_MIN_DESELECT_RESET_u(0x00)#defineQMI_M1_TIMING_MIN_DESELECT_BITS_u(0x0001f000)#defineQMI_M1_TIMING_MIN_DESELECT_MSB_u(16)#defineQMI_M1_TIMING_MIN_DESELECT_LSB_u(12)#defineQMI_M1_TIMING_MIN_DESELECT_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_RXDELAY// Description : Delay the read data sample timing, in units of one half of a// system clock cycle. (Not necessarily half of an SCK cycle.) An// RXDELAY of 0 means the sample is captured at the SDI input// registers simultaneously with the rising edge of SCK launched// from the SCK output register.//// At higher SCK frequencies, RXDELAY may need to be increased to// account for the round trip delay of the pads, and the clock-// to-Q delay of the QSPI memory device.#defineQMI_M1_TIMING_RXDELAY_RESET_u(0x0)#defineQMI_M1_TIMING_RXDELAY_BITS_u(0x00000700)#defineQMI_M1_TIMING_RXDELAY_MSB_u(10)#defineQMI_M1_TIMING_RXDELAY_LSB_u(8)#defineQMI_M1_TIMING_RXDELAY_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_TIMING_CLKDIV// Description : Clock divisor. Odd and even divisors are supported. Defines the// SCK clock period in units of 1 system clock cycle. Divisors// 1..255 are encoded directly, and a divisor of 256 is encoded// with a value of CLKDIV=0.//// The clock divisor can be changed on-the-fly, even when the QMI// is currently accessing memory in this address window. All other// parameters must only be changed when the QMI is idle.//// If software is increasing CLKDIV in anticipation of an increase// in the system clock frequency, a dummy access to either memory// window (and appropriate processor barriers/fences) must be// inserted after the Mx_TIMING write to ensure the SCK divisor// change is in effect _before_ the system clock is changed.#defineQMI_M1_TIMING_CLKDIV_RESET_u(0x04)#defineQMI_M1_TIMING_CLKDIV_BITS_u(0x000000ff)#defineQMI_M1_TIMING_CLKDIV_MSB_u(7)#defineQMI_M1_TIMING_CLKDIV_LSB_u(0)#defineQMI_M1_TIMING_CLKDIV_ACCESS"RW"// =============================================================================// Register : QMI_M1_RFMT// Description : Read transfer format configuration for memory address window 1.//// Configure the bus width of each transfer phase individually,// and configure the length or presence of the command prefix,// command suffix and dummy/turnaround transfer phases. Only// 24-bit addresses are supported.//// The reset value of the M1_RFMT register is configured to// support a basic 03h serial read transfer with no additional// configuration.#defineQMI_M1_RFMT_OFFSET_u(0x00000024)#defineQMI_M1_RFMT_BITS_u(0x1007d3ff)#defineQMI_M1_RFMT_RESET_u(0x00001000)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_DTR// Description : Enable double transfer rate (DTR) for read commands: address,// suffix and read data phases are active on both edges of SCK.// SDO data is launched centre-aligned on each SCK edge, and SDI// data is captured on the SCK edge that follows its launch.//// DTR is implemented by halving the clock rate; SCK has a period// of 2 x CLK_DIV throughout the transfer. The prefix and dummy// phases are still single transfer rate.//// If the suffix is quad-width, it must be 0 or 8 bits in length,// to ensure an even number of SCK edges.#defineQMI_M1_RFMT_DTR_RESET_u(0x0)#defineQMI_M1_RFMT_DTR_BITS_u(0x10000000)#defineQMI_M1_RFMT_DTR_MSB_u(28)#defineQMI_M1_RFMT_DTR_LSB_u(28)#defineQMI_M1_RFMT_DTR_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_DUMMY_LEN// Description : Length of dummy phase between command suffix and data phase, in// units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4// for single)// 0x0 -> No dummy phase// 0x1 -> 4 dummy bits// 0x2 -> 8 dummy bits// 0x3 -> 12 dummy bits// 0x4 -> 16 dummy bits// 0x5 -> 20 dummy bits// 0x6 -> 24 dummy bits// 0x7 -> 28 dummy bits#defineQMI_M1_RFMT_DUMMY_LEN_RESET_u(0x0)#defineQMI_M1_RFMT_DUMMY_LEN_BITS_u(0x00070000)#defineQMI_M1_RFMT_DUMMY_LEN_MSB_u(18)#defineQMI_M1_RFMT_DUMMY_LEN_LSB_u(16)#defineQMI_M1_RFMT_DUMMY_LEN_ACCESS"RW"#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_4_u(0x1)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_8_u(0x2)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_12_u(0x3)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_16_u(0x4)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_20_u(0x5)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_24_u(0x6)#defineQMI_M1_RFMT_DUMMY_LEN_VALUE_28_u(0x7)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_SUFFIX_LEN// Description : Length of post-address command suffix, in units of 4 bits.// (i.e. 1 cycle for quad width, 2 for dual, 4 for single)//// Only values of 0 and 8 bits are supported.// 0x0 -> No suffix// 0x2 -> 8-bit suffix#defineQMI_M1_RFMT_SUFFIX_LEN_RESET_u(0x0)#defineQMI_M1_RFMT_SUFFIX_LEN_BITS_u(0x0000c000)#defineQMI_M1_RFMT_SUFFIX_LEN_MSB_u(15)#defineQMI_M1_RFMT_SUFFIX_LEN_LSB_u(14)#defineQMI_M1_RFMT_SUFFIX_LEN_ACCESS"RW"#defineQMI_M1_RFMT_SUFFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_RFMT_SUFFIX_LEN_VALUE_8_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_PREFIX_LEN// Description : Length of command prefix, in units of 8 bits. (i.e. 2 cycles// for quad width, 4 for dual, 8 for single)// 0x0 -> No prefix// 0x1 -> 8-bit prefix#defineQMI_M1_RFMT_PREFIX_LEN_RESET_u(0x1)#defineQMI_M1_RFMT_PREFIX_LEN_BITS_u(0x00001000)#defineQMI_M1_RFMT_PREFIX_LEN_MSB_u(12)#defineQMI_M1_RFMT_PREFIX_LEN_LSB_u(12)#defineQMI_M1_RFMT_PREFIX_LEN_ACCESS"RW"#defineQMI_M1_RFMT_PREFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_RFMT_PREFIX_LEN_VALUE_8_u(0x1)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_DATA_WIDTH// Description : The width used for the data transfer// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_RFMT_DATA_WIDTH_RESET_u(0x0)#defineQMI_M1_RFMT_DATA_WIDTH_BITS_u(0x00000300)#defineQMI_M1_RFMT_DATA_WIDTH_MSB_u(9)#defineQMI_M1_RFMT_DATA_WIDTH_LSB_u(8)#defineQMI_M1_RFMT_DATA_WIDTH_ACCESS"RW"#defineQMI_M1_RFMT_DATA_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_RFMT_DATA_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_RFMT_DATA_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_DUMMY_WIDTH// Description : The width used for the dummy phase, if any.//// If width is single, SD0/MOSI is held asserted low during the// dummy phase, and SD1...SD3 are tristated. If width is// dual/quad, all IOs are tristated during the dummy phase.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_RFMT_DUMMY_WIDTH_RESET_u(0x0)#defineQMI_M1_RFMT_DUMMY_WIDTH_BITS_u(0x000000c0)#defineQMI_M1_RFMT_DUMMY_WIDTH_MSB_u(7)#defineQMI_M1_RFMT_DUMMY_WIDTH_LSB_u(6)#defineQMI_M1_RFMT_DUMMY_WIDTH_ACCESS"RW"#defineQMI_M1_RFMT_DUMMY_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_RFMT_DUMMY_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_RFMT_DUMMY_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_SUFFIX_WIDTH// Description : The width used for the post-address command suffix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_RFMT_SUFFIX_WIDTH_RESET_u(0x0)#defineQMI_M1_RFMT_SUFFIX_WIDTH_BITS_u(0x00000030)#defineQMI_M1_RFMT_SUFFIX_WIDTH_MSB_u(5)#defineQMI_M1_RFMT_SUFFIX_WIDTH_LSB_u(4)#defineQMI_M1_RFMT_SUFFIX_WIDTH_ACCESS"RW"#defineQMI_M1_RFMT_SUFFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_RFMT_SUFFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_RFMT_SUFFIX_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_ADDR_WIDTH// Description : The transfer width used for the address. The address phase// always transfers 24 bits in total.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_RFMT_ADDR_WIDTH_RESET_u(0x0)#defineQMI_M1_RFMT_ADDR_WIDTH_BITS_u(0x0000000c)#defineQMI_M1_RFMT_ADDR_WIDTH_MSB_u(3)#defineQMI_M1_RFMT_ADDR_WIDTH_LSB_u(2)#defineQMI_M1_RFMT_ADDR_WIDTH_ACCESS"RW"#defineQMI_M1_RFMT_ADDR_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_RFMT_ADDR_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_RFMT_ADDR_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_RFMT_PREFIX_WIDTH// Description : The transfer width used for the command prefix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_RFMT_PREFIX_WIDTH_RESET_u(0x0)#defineQMI_M1_RFMT_PREFIX_WIDTH_BITS_u(0x00000003)#defineQMI_M1_RFMT_PREFIX_WIDTH_MSB_u(1)#defineQMI_M1_RFMT_PREFIX_WIDTH_LSB_u(0)#defineQMI_M1_RFMT_PREFIX_WIDTH_ACCESS"RW"#defineQMI_M1_RFMT_PREFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_RFMT_PREFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_RFMT_PREFIX_WIDTH_VALUE_Q_u(0x2)// =============================================================================// Register : QMI_M1_RCMD// Description : Command constants used for reads from memory address window 1.//// The reset value of the M1_RCMD register is configured to// support a basic 03h serial read transfer with no additional// configuration.#defineQMI_M1_RCMD_OFFSET_u(0x00000028)#defineQMI_M1_RCMD_BITS_u(0x0000ffff)#defineQMI_M1_RCMD_RESET_u(0x0000a003)// -----------------------------------------------------------------------------// Field : QMI_M1_RCMD_SUFFIX// Description : The command suffix bits following the address, if// Mx_RFMT_SUFFIX_LEN is nonzero.#defineQMI_M1_RCMD_SUFFIX_RESET_u(0xa0)#defineQMI_M1_RCMD_SUFFIX_BITS_u(0x0000ff00)#defineQMI_M1_RCMD_SUFFIX_MSB_u(15)#defineQMI_M1_RCMD_SUFFIX_LSB_u(8)#defineQMI_M1_RCMD_SUFFIX_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_RCMD_PREFIX// Description : The command prefix bits to prepend on each new transfer, if// Mx_RFMT_PREFIX_LEN is nonzero.#defineQMI_M1_RCMD_PREFIX_RESET_u(0x03)#defineQMI_M1_RCMD_PREFIX_BITS_u(0x000000ff)#defineQMI_M1_RCMD_PREFIX_MSB_u(7)#defineQMI_M1_RCMD_PREFIX_LSB_u(0)#defineQMI_M1_RCMD_PREFIX_ACCESS"RW"// =============================================================================// Register : QMI_M1_WFMT// Description : Write transfer format configuration for memory address window// 1.//// Configure the bus width of each transfer phase individually,// and configure the length or presence of the command prefix,// command suffix and dummy/turnaround transfer phases. Only// 24-bit addresses are supported.//// The reset value of the M1_WFMT register is configured to// support a basic 02h serial write transfer. However, writes to// this window must first be enabled via the XIP_CTRL_WRITABLE_M1// bit, as XIP memory is read-only by default.#defineQMI_M1_WFMT_OFFSET_u(0x0000002c)#defineQMI_M1_WFMT_BITS_u(0x1007d3ff)#defineQMI_M1_WFMT_RESET_u(0x00001000)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_DTR// Description : Enable double transfer rate (DTR) for write commands: address,// suffix and write data phases are active on both edges of SCK.// SDO data is launched centre-aligned on each SCK edge, and SDI// data is captured on the SCK edge that follows its launch.//// DTR is implemented by halving the clock rate; SCK has a period// of 2 x CLK_DIV throughout the transfer. The prefix and dummy// phases are still single transfer rate.//// If the suffix is quad-width, it must be 0 or 8 bits in length,// to ensure an even number of SCK edges.#defineQMI_M1_WFMT_DTR_RESET_u(0x0)#defineQMI_M1_WFMT_DTR_BITS_u(0x10000000)#defineQMI_M1_WFMT_DTR_MSB_u(28)#defineQMI_M1_WFMT_DTR_LSB_u(28)#defineQMI_M1_WFMT_DTR_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_DUMMY_LEN// Description : Length of dummy phase between command suffix and data phase, in// units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4// for single)// 0x0 -> No dummy phase// 0x1 -> 4 dummy bits// 0x2 -> 8 dummy bits// 0x3 -> 12 dummy bits// 0x4 -> 16 dummy bits// 0x5 -> 20 dummy bits// 0x6 -> 24 dummy bits// 0x7 -> 28 dummy bits#defineQMI_M1_WFMT_DUMMY_LEN_RESET_u(0x0)#defineQMI_M1_WFMT_DUMMY_LEN_BITS_u(0x00070000)#defineQMI_M1_WFMT_DUMMY_LEN_MSB_u(18)#defineQMI_M1_WFMT_DUMMY_LEN_LSB_u(16)#defineQMI_M1_WFMT_DUMMY_LEN_ACCESS"RW"#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_4_u(0x1)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_8_u(0x2)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_12_u(0x3)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_16_u(0x4)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_20_u(0x5)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_24_u(0x6)#defineQMI_M1_WFMT_DUMMY_LEN_VALUE_28_u(0x7)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_SUFFIX_LEN// Description : Length of post-address command suffix, in units of 4 bits.// (i.e. 1 cycle for quad width, 2 for dual, 4 for single)//// Only values of 0 and 8 bits are supported.// 0x0 -> No suffix// 0x2 -> 8-bit suffix#defineQMI_M1_WFMT_SUFFIX_LEN_RESET_u(0x0)#defineQMI_M1_WFMT_SUFFIX_LEN_BITS_u(0x0000c000)#defineQMI_M1_WFMT_SUFFIX_LEN_MSB_u(15)#defineQMI_M1_WFMT_SUFFIX_LEN_LSB_u(14)#defineQMI_M1_WFMT_SUFFIX_LEN_ACCESS"RW"#defineQMI_M1_WFMT_SUFFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_WFMT_SUFFIX_LEN_VALUE_8_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_PREFIX_LEN// Description : Length of command prefix, in units of 8 bits. (i.e. 2 cycles// for quad width, 4 for dual, 8 for single)// 0x0 -> No prefix// 0x1 -> 8-bit prefix#defineQMI_M1_WFMT_PREFIX_LEN_RESET_u(0x1)#defineQMI_M1_WFMT_PREFIX_LEN_BITS_u(0x00001000)#defineQMI_M1_WFMT_PREFIX_LEN_MSB_u(12)#defineQMI_M1_WFMT_PREFIX_LEN_LSB_u(12)#defineQMI_M1_WFMT_PREFIX_LEN_ACCESS"RW"#defineQMI_M1_WFMT_PREFIX_LEN_VALUE_NONE_u(0x0)#defineQMI_M1_WFMT_PREFIX_LEN_VALUE_8_u(0x1)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_DATA_WIDTH// Description : The width used for the data transfer// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_WFMT_DATA_WIDTH_RESET_u(0x0)#defineQMI_M1_WFMT_DATA_WIDTH_BITS_u(0x00000300)#defineQMI_M1_WFMT_DATA_WIDTH_MSB_u(9)#defineQMI_M1_WFMT_DATA_WIDTH_LSB_u(8)#defineQMI_M1_WFMT_DATA_WIDTH_ACCESS"RW"#defineQMI_M1_WFMT_DATA_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_WFMT_DATA_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_WFMT_DATA_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_DUMMY_WIDTH// Description : The width used for the dummy phase, if any.//// If width is single, SD0/MOSI is held asserted low during the// dummy phase, and SD1...SD3 are tristated. If width is// dual/quad, all IOs are tristated during the dummy phase.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_WFMT_DUMMY_WIDTH_RESET_u(0x0)#defineQMI_M1_WFMT_DUMMY_WIDTH_BITS_u(0x000000c0)#defineQMI_M1_WFMT_DUMMY_WIDTH_MSB_u(7)#defineQMI_M1_WFMT_DUMMY_WIDTH_LSB_u(6)#defineQMI_M1_WFMT_DUMMY_WIDTH_ACCESS"RW"#defineQMI_M1_WFMT_DUMMY_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_WFMT_DUMMY_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_WFMT_DUMMY_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_SUFFIX_WIDTH// Description : The width used for the post-address command suffix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_WFMT_SUFFIX_WIDTH_RESET_u(0x0)#defineQMI_M1_WFMT_SUFFIX_WIDTH_BITS_u(0x00000030)#defineQMI_M1_WFMT_SUFFIX_WIDTH_MSB_u(5)#defineQMI_M1_WFMT_SUFFIX_WIDTH_LSB_u(4)#defineQMI_M1_WFMT_SUFFIX_WIDTH_ACCESS"RW"#defineQMI_M1_WFMT_SUFFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_WFMT_SUFFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_WFMT_SUFFIX_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_ADDR_WIDTH// Description : The transfer width used for the address. The address phase// always transfers 24 bits in total.// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_WFMT_ADDR_WIDTH_RESET_u(0x0)#defineQMI_M1_WFMT_ADDR_WIDTH_BITS_u(0x0000000c)#defineQMI_M1_WFMT_ADDR_WIDTH_MSB_u(3)#defineQMI_M1_WFMT_ADDR_WIDTH_LSB_u(2)#defineQMI_M1_WFMT_ADDR_WIDTH_ACCESS"RW"#defineQMI_M1_WFMT_ADDR_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_WFMT_ADDR_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_WFMT_ADDR_WIDTH_VALUE_Q_u(0x2)// -----------------------------------------------------------------------------// Field : QMI_M1_WFMT_PREFIX_WIDTH// Description : The transfer width used for the command prefix, if any// 0x0 -> Single width// 0x1 -> Dual width// 0x2 -> Quad width#defineQMI_M1_WFMT_PREFIX_WIDTH_RESET_u(0x0)#defineQMI_M1_WFMT_PREFIX_WIDTH_BITS_u(0x00000003)#defineQMI_M1_WFMT_PREFIX_WIDTH_MSB_u(1)#defineQMI_M1_WFMT_PREFIX_WIDTH_LSB_u(0)#defineQMI_M1_WFMT_PREFIX_WIDTH_ACCESS"RW"#defineQMI_M1_WFMT_PREFIX_WIDTH_VALUE_S_u(0x0)#defineQMI_M1_WFMT_PREFIX_WIDTH_VALUE_D_u(0x1)#defineQMI_M1_WFMT_PREFIX_WIDTH_VALUE_Q_u(0x2)// =============================================================================// Register : QMI_M1_WCMD// Description : Command constants used for writes to memory address window 1.//// The reset value of the M1_WCMD register is configured to// support a basic 02h serial write transfer with no additional// configuration.#defineQMI_M1_WCMD_OFFSET_u(0x00000030)#defineQMI_M1_WCMD_BITS_u(0x0000ffff)#defineQMI_M1_WCMD_RESET_u(0x0000a002)// -----------------------------------------------------------------------------// Field : QMI_M1_WCMD_SUFFIX// Description : The command suffix bits following the address, if// Mx_WFMT_SUFFIX_LEN is nonzero.#defineQMI_M1_WCMD_SUFFIX_RESET_u(0xa0)#defineQMI_M1_WCMD_SUFFIX_BITS_u(0x0000ff00)#defineQMI_M1_WCMD_SUFFIX_MSB_u(15)#defineQMI_M1_WCMD_SUFFIX_LSB_u(8)#defineQMI_M1_WCMD_SUFFIX_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_M1_WCMD_PREFIX// Description : The command prefix bits to prepend on each new transfer, if// Mx_WFMT_PREFIX_LEN is nonzero.#defineQMI_M1_WCMD_PREFIX_RESET_u(0x02)#defineQMI_M1_WCMD_PREFIX_BITS_u(0x000000ff)#defineQMI_M1_WCMD_PREFIX_MSB_u(7)#defineQMI_M1_WCMD_PREFIX_LSB_u(0)#defineQMI_M1_WCMD_PREFIX_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS0// Description : Configure address translation for XIP virtual addresses// 0x000000 through 0x3fffff (a 4 MiB window starting at +0 MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS0_OFFSET_u(0x00000034)#defineQMI_ATRANS0_BITS_u(0x07ff0fff)#defineQMI_ATRANS0_RESET_u(0x04000000)// -----------------------------------------------------------------------------// Field : QMI_ATRANS0_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS0_SIZE_RESET_u(0x400)#defineQMI_ATRANS0_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS0_SIZE_MSB_u(26)#defineQMI_ATRANS0_SIZE_LSB_u(16)#defineQMI_ATRANS0_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS0_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS0_BASE_RESET_u(0x000)#defineQMI_ATRANS0_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS0_BASE_MSB_u(11)#defineQMI_ATRANS0_BASE_LSB_u(0)#defineQMI_ATRANS0_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS1// Description : Configure address translation for XIP virtual addresses// 0x400000 through 0x7fffff (a 4 MiB window starting at +4 MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS1_OFFSET_u(0x00000038)#defineQMI_ATRANS1_BITS_u(0x07ff0fff)#defineQMI_ATRANS1_RESET_u(0x04000400)// -----------------------------------------------------------------------------// Field : QMI_ATRANS1_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS1_SIZE_RESET_u(0x400)#defineQMI_ATRANS1_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS1_SIZE_MSB_u(26)#defineQMI_ATRANS1_SIZE_LSB_u(16)#defineQMI_ATRANS1_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS1_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS1_BASE_RESET_u(0x400)#defineQMI_ATRANS1_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS1_BASE_MSB_u(11)#defineQMI_ATRANS1_BASE_LSB_u(0)#defineQMI_ATRANS1_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS2// Description : Configure address translation for XIP virtual addresses// 0x800000 through 0xbfffff (a 4 MiB window starting at +8 MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS2_OFFSET_u(0x0000003c)#defineQMI_ATRANS2_BITS_u(0x07ff0fff)#defineQMI_ATRANS2_RESET_u(0x04000800)// -----------------------------------------------------------------------------// Field : QMI_ATRANS2_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS2_SIZE_RESET_u(0x400)#defineQMI_ATRANS2_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS2_SIZE_MSB_u(26)#defineQMI_ATRANS2_SIZE_LSB_u(16)#defineQMI_ATRANS2_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS2_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS2_BASE_RESET_u(0x800)#defineQMI_ATRANS2_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS2_BASE_MSB_u(11)#defineQMI_ATRANS2_BASE_LSB_u(0)#defineQMI_ATRANS2_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS3// Description : Configure address translation for XIP virtual addresses// 0xc00000 through 0xffffff (a 4 MiB window starting at +12 MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS3_OFFSET_u(0x00000040)#defineQMI_ATRANS3_BITS_u(0x07ff0fff)#defineQMI_ATRANS3_RESET_u(0x04000c00)// -----------------------------------------------------------------------------// Field : QMI_ATRANS3_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS3_SIZE_RESET_u(0x400)#defineQMI_ATRANS3_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS3_SIZE_MSB_u(26)#defineQMI_ATRANS3_SIZE_LSB_u(16)#defineQMI_ATRANS3_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS3_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS3_BASE_RESET_u(0xc00)#defineQMI_ATRANS3_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS3_BASE_MSB_u(11)#defineQMI_ATRANS3_BASE_LSB_u(0)#defineQMI_ATRANS3_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS4// Description : Configure address translation for XIP virtual addresses// 0x1000000 through 0x13fffff (a 4 MiB window starting at +16// MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS4_OFFSET_u(0x00000044)#defineQMI_ATRANS4_BITS_u(0x07ff0fff)#defineQMI_ATRANS4_RESET_u(0x04000000)// -----------------------------------------------------------------------------// Field : QMI_ATRANS4_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS4_SIZE_RESET_u(0x400)#defineQMI_ATRANS4_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS4_SIZE_MSB_u(26)#defineQMI_ATRANS4_SIZE_LSB_u(16)#defineQMI_ATRANS4_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS4_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS4_BASE_RESET_u(0x000)#defineQMI_ATRANS4_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS4_BASE_MSB_u(11)#defineQMI_ATRANS4_BASE_LSB_u(0)#defineQMI_ATRANS4_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS5// Description : Configure address translation for XIP virtual addresses// 0x1400000 through 0x17fffff (a 4 MiB window starting at +20// MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS5_OFFSET_u(0x00000048)#defineQMI_ATRANS5_BITS_u(0x07ff0fff)#defineQMI_ATRANS5_RESET_u(0x04000400)// -----------------------------------------------------------------------------// Field : QMI_ATRANS5_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS5_SIZE_RESET_u(0x400)#defineQMI_ATRANS5_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS5_SIZE_MSB_u(26)#defineQMI_ATRANS5_SIZE_LSB_u(16)#defineQMI_ATRANS5_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS5_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS5_BASE_RESET_u(0x400)#defineQMI_ATRANS5_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS5_BASE_MSB_u(11)#defineQMI_ATRANS5_BASE_LSB_u(0)#defineQMI_ATRANS5_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS6// Description : Configure address translation for XIP virtual addresses// 0x1800000 through 0x1bfffff (a 4 MiB window starting at +24// MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS6_OFFSET_u(0x0000004c)#defineQMI_ATRANS6_BITS_u(0x07ff0fff)#defineQMI_ATRANS6_RESET_u(0x04000800)// -----------------------------------------------------------------------------// Field : QMI_ATRANS6_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS6_SIZE_RESET_u(0x400)#defineQMI_ATRANS6_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS6_SIZE_MSB_u(26)#defineQMI_ATRANS6_SIZE_LSB_u(16)#defineQMI_ATRANS6_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS6_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS6_BASE_RESET_u(0x800)#defineQMI_ATRANS6_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS6_BASE_MSB_u(11)#defineQMI_ATRANS6_BASE_LSB_u(0)#defineQMI_ATRANS6_BASE_ACCESS"RW"// =============================================================================// Register : QMI_ATRANS7// Description : Configure address translation for XIP virtual addresses// 0x1c00000 through 0x1ffffff (a 4 MiB window starting at +28// MiB).//// Address translation allows a program image to be executed in// place at multiple physical flash addresses (for example, a// double-buffered flash image for over-the-air updates), without// the overhead of position-independent code.//// At reset, the address translation registers are initialised to// an identity mapping, so that they can be ignored if address// translation is not required.//// Note that the XIP cache is fully virtually addressed, so a// cache flush is required after changing the address translation.#defineQMI_ATRANS7_OFFSET_u(0x00000050)#defineQMI_ATRANS7_BITS_u(0x07ff0fff)#defineQMI_ATRANS7_RESET_u(0x04000c00)// -----------------------------------------------------------------------------// Field : QMI_ATRANS7_SIZE// Description : Translation aperture size for this virtual address range, in// units of 4 kiB (one flash sector).//// Bits 21:12 of the virtual address are compared to SIZE. Offsets// greater than SIZE return a bus error, and do not cause a QSPI// access.#defineQMI_ATRANS7_SIZE_RESET_u(0x400)#defineQMI_ATRANS7_SIZE_BITS_u(0x07ff0000)#defineQMI_ATRANS7_SIZE_MSB_u(26)#defineQMI_ATRANS7_SIZE_LSB_u(16)#defineQMI_ATRANS7_SIZE_ACCESS"RW"// -----------------------------------------------------------------------------// Field : QMI_ATRANS7_BASE// Description : Physical address base for this virtual address range, in units// of 4 kiB (one flash sector).//// Taking a 24-bit virtual address, firstly bits 23:22 (the two// MSBs) are masked to zero, and then BASE is added to bits 23:12// (the upper 12 bits) to form the physical address. Translation// wraps on a 16 MiB boundary.#defineQMI_ATRANS7_BASE_RESET_u(0xc00)#defineQMI_ATRANS7_BASE_BITS_u(0x00000fff)#defineQMI_ATRANS7_BASE_MSB_u(11)#defineQMI_ATRANS7_BASE_LSB_u(0)#defineQMI_ATRANS7_BASE_ACCESS"RW"661 defines// =============================================================================/* ... */#endif// _HARDWARE_REGS_QMI_H
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.