stm32: enable quadspi for f7/g4/l4

Seeing as we'd started it, might as well finish enabling all the common
platforms.
This commit is contained in:
Karl Palsson
2021-01-29 14:03:46 +00:00
parent ca479ad7d2
commit 8722a03e2f
9 changed files with 59 additions and 1 deletions

View File

@@ -146,7 +146,8 @@
#define FMC3_BASE (PERIPH_BASE_AHB3 + 0x20000000U)
#define QSPI_BASE (PERIPH_BASE_AHB3 + 0x30000000U)
#define FMCC_BASE (PERIPH_BASE_AHB3 + 0x40000000U)
#define QSPIC_BASE (PERIPH_BASE_AHB3 + 0x40001000U)
#define QUADSPI_BASE (PERIPH_BASE_AHB3 + 0x40001000U)
#define QSPIC_BASE QUADSPI_BASE /* Deprecated compat */
#define FMC5_BASE (PERIPH_BASE_AHB3 + 0x60000000U)
#define FMC6_BASE (PERIPH_BASE_AHB3 + 0x70000000U)

View File

@@ -0,0 +1,15 @@
/** @defgroup quadspi_defines QuadSPI Defines
* @brief Defined constants and types for the STM32F7 QuadSPI peripheral
* @ingroup STM32F7xx_defines
* @copyright SPDX: LGPL-3.0-or-later
* @{
*/
#pragma once
#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/quadspi_common_v1.h>
#define QUADSPI_CR_DMAEN (1 << 2)
/**@}*/

View File

@@ -0,0 +1,15 @@
/** @defgroup quadspi_defines QuadSPI Defines
* @brief Defined constants and types for the STM32G4 QuadSPI peripheral
* @ingroup STM32G4xx_defines
* @copyright SPDX: LGPL-3.0-or-later
* @{
*/
#pragma once
#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/quadspi_common_v1.h>
#define QUADSPI_CR_DMAEN (1 << 2)
/**@}*/

View File

@@ -110,6 +110,9 @@
#define AES_BASE (0x50000000U + 0x60000)
#define RNG_BASE (0x50000000U + 0x60800)
#define FMC_BASE (0xa0000000U)
#define QUADSPI_BASE (0xa0001000U)
/* Private peripherals */
#define DBGMCU_BASE (PPBI_BASE + 0x00042000)

View File

@@ -0,0 +1,15 @@
/** @defgroup quadspi_defines QuadSPI Defines
* @brief Defined constants and types for the STM32L4 QuadSPI peripheral
* @ingroup STM32L4xx_defines
* @copyright SPDX: LGPL-3.0-or-later
* @{
*/
#pragma once
#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/quadspi_common_v1.h>
#define QUADSPI_CR_DMAEN (1 << 2)
/**@}*/

View File

@@ -22,8 +22,14 @@
#if defined(STM32F4)
# include <libopencm3/stm32/f4/quadspi.h>
#elif defined(STM32F7)
# include <libopencm3/stm32/f7/quadspi.h>
#elif defined(STM32G4)
# include <libopencm3/stm32/g4/quadspi.h>
#elif defined(STM32H7)
# include <libopencm3/stm32/h7/quadspi.h>
#elif defined(STM32L4)
# include <libopencm3/stm32/l4/quadspi.h>
#else
# error "quadspi.h not available for this family."
#endif