stm32:f4/f412 pinmap Remove GPIO_SPEED_xxx and add legacy pinmap

Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
This commit is contained in:
David Sidrane
2023-04-10 09:28:31 -07:00
committed by Mateusz Szafoni
parent 1ce84fff01
commit 39c5931462
7 changed files with 3315 additions and 1261 deletions
+20
View File
@@ -3452,6 +3452,26 @@ config STM32_NOEXT_VECTORS
Sometimes you may not need any Vector support beyond SysTick
and wish to save memory. This applies only to ARMv7-M architectures.
config STM32_USE_LEGACY_PINMAP
bool "Use the legacy pinmap with GPIO_SPEED_xxx included."
default y
---help---
In the past, pinmap files included GPIO_SPEED_xxxMhz. These speed
settings should have come from the board.h as it describes the wiring
of the SoC to the board. The speed is really slew rate control and
therefore is related to the layout and can only be properly set
in board.h.
STM32_USE_LEGACY_PINMAP is provided, to allow lazy migration to
using pinmaps without speeds. The work required to do this can be aided
by running tools/stm32_pinmap_tool.py. The tools will take a board.h
file and a legacy pinmap and output the required changes that one needs
to make to a board.h file.
Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
pinmaps removed from NuttX. Any new boards added should set
STM32_USE_LEGACY_PINMAP=n and fully define the pins in board.h
config STM32_SYSCFG_IOCOMPENSATION
bool "SYSCFG I/O Compensation"
default n
+10 -2
View File
@@ -115,12 +115,20 @@
/* STM32 F412 Family ********************************************************/
#elif defined(CONFIG_STM32_STM32F412)
# include "hardware/stm32f412xx_pinmap.h"
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
# include "hardware/stm32f412xx_pinmap_legacy.h"
# else
# include "hardware/stm32f412xx_pinmap.h"
# endif
/* STM32 F4 Family **********************************************************/
#elif defined(CONFIG_STM32_STM32F4XXX)
# include "hardware/stm32f40xxx_pinmap.h"
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
# include "hardware/stm32f40xxx_pinmap_legacy.h"
# else
# include "hardware/stm32f40xxx_pinmap.h"
# endif
/* STM32 G4 Family **********************************************************/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -37,6 +37,10 @@
#include "stm32_syscfg.h"
#include "stm32_gpio.h"
#if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
# pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
#endif
/****************************************************************************
* Public Data
****************************************************************************/