stm32f7: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_STM32F7_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, STM32F7_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32F7_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
This commit is contained in:
David Sidrane
2023-04-10 07:36:23 -07:00
committed by Mateusz Szafoni
parent 14a0e08386
commit 1ce84fff01
9 changed files with 5826 additions and 2357 deletions
+21
View File
@@ -1749,6 +1749,27 @@ config STM32F7_WWDG
endmenu
config STM32F7_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.
STM32F7_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, STM32F7_USE_LEGACY_PINMAP will be deprecated and the legacy
pinmaps removed from NuttX. Any new boards added should set
STM32F7_USE_LEGACY_PINMAP=n and fully define the pins in board.h
config STM32F7_SYSCFG_IOCOMPENSATION
bool "SYSCFG I/O Compensation"
default n
+19 -8
View File
@@ -28,14 +28,25 @@
#include <nuttx/config.h>
#include "chip.h"
#if defined(CONFIG_STM32F7_STM32F72XX) || defined(CONFIG_STM32F7_STM32F73XX)
# include "hardware/stm32f72xx73xx_pinmap.h"
#elif defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX)
# include "hardware/stm32f74xx75xx_pinmap.h"
#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX)
# include "hardware/stm32f76xx77xx_pinmap.h"
#if defined(CONFIG_STM32F7_USE_LEGACY_PINMAP)
# if defined(CONFIG_STM32F7_STM32F72XX) || defined(CONFIG_STM32F7_STM32F73XX)
# include "hardware/stm32f72xx73xx_pinmap_legacy.h"
# elif defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX)
# include "hardware/stm32f74xx75xx_pinmap_legacy.h"
# elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX)
# include "hardware/stm32f76xx77xx_pinmap_legacy.h"
# else
# error "Unsupported STM32 F7 Pin map"
# endif
#else
# error "Unsupported STM32 F7 Pin map"
# if defined(CONFIG_STM32F7_STM32F72XX) || defined(CONFIG_STM32F7_STM32F73XX)
# include "hardware/stm32f72xx73xx_pinmap.h"
# elif defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX)
# include "hardware/stm32f74xx75xx_pinmap.h"
# elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX)
# include "hardware/stm32f76xx77xx_pinmap.h"
# else
# error "Unsupported STM32 F7 Pin map"
# endif
#endif
#endif /* __ARCH_ARM_SRC_STM32F7_HARDWARE_STM32_PINMAP_H */
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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -45,6 +45,10 @@
|| defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \
|| defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX)
#if defined(CONFIG_STM32F7_USE_LEGACY_PINMAP)
# pragma message "CONFIG_STM32F7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
#endif
/****************************************************************************
* Public Data
****************************************************************************/