drivers: gpio: Add STM32G0X pinmux support

Add gpio support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>

# Conflicts:
#	drivers/gpio/gpio_stm32.h
This commit is contained in:
Francois Ramu 2019-07-01 16:46:34 +02:00 committed by Maureen Helm
commit dd3ee06af7
5 changed files with 111 additions and 0 deletions

View file

@ -15,6 +15,14 @@ config SOC_SERIES
if GPIO_STM32
# GPIO ports A, B and C are set in ../common/Kconfig.defconfig.series
config GPIO_STM32_PORTD
default y
config GPIO_STM32_PORTF
default y
endif # GPIO_STM32
endif # SOC_SERIES_STM32G0X

View file

@ -14,4 +14,51 @@
#define DT_PWM_STM32_3_DEV_NAME DT_ST_STM32_PWM_40000400_PWM_LABEL
#define DT_PWM_STM32_3_PRESCALER DT_ST_STM32_PWM_40000400_PWM_ST_PRESCALER
/* there is no reference to GPIOE, GPIOG and GPIOH in the dts files */
#define DT_GPIO_STM32_GPIOA_BASE_ADDRESS DT_ST_STM32_GPIO_50000000_BASE_ADDRESS
#define DT_GPIO_STM32_GPIOA_CLOCK_BITS_0 DT_ST_STM32_GPIO_50000000_CLOCK_BITS_0
#define DT_GPIO_STM32_GPIOA_CLOCK_BUS_0 DT_ST_STM32_GPIO_50000000_CLOCK_BUS_0
#define DT_GPIO_STM32_GPIOA_CLOCK_CONTROLLER DT_ST_STM32_GPIO_50000000_CLOCK_CONTROLLER
#define DT_GPIO_STM32_GPIOA_LABEL DT_ST_STM32_GPIO_50000000_LABEL
#define DT_GPIO_STM32_GPIOA_SIZE DT_ST_STM32_GPIO_50000000_SIZE
#define DT_GPIO_STM32_GPIOA_CLOCK_BITS DT_ST_STM32_GPIO_50000000_CLOCK_BITS
#define DT_GPIO_STM32_GPIOA_CLOCK_BUS DT_ST_STM32_GPIO_50000000_CLOCK_BUS
#define DT_GPIO_STM32_GPIOB_BASE_ADDRESS DT_ST_STM32_GPIO_50000400_BASE_ADDRESS
#define DT_GPIO_STM32_GPIOB_CLOCK_BITS_0 DT_ST_STM32_GPIO_50000400_CLOCK_BITS_0
#define DT_GPIO_STM32_GPIOB_CLOCK_BUS_0 DT_ST_STM32_GPIO_50000400_CLOCK_BUS_0
#define DT_GPIO_STM32_GPIOB_CLOCK_CONTROLLER DT_ST_STM32_GPIO_50000400_CLOCK_CONTROLLER
#define DT_GPIO_STM32_GPIOB_LABEL DT_ST_STM32_GPIO_50000400_LABEL
#define DT_GPIO_STM32_GPIOB_SIZE DT_ST_STM32_GPIO_50000400_SIZE
#define DT_GPIO_STM32_GPIOB_CLOCK_BITS DT_ST_STM32_GPIO_50000400_CLOCK_BITS
#define DT_GPIO_STM32_GPIOB_CLOCK_BUS DT_ST_STM32_GPIO_50000400_CLOCK_BUS
#define DT_GPIO_STM32_GPIOC_BASE_ADDRESS DT_ST_STM32_GPIO_50000800_BASE_ADDRESS
#define DT_GPIO_STM32_GPIOC_CLOCK_BITS_0 DT_ST_STM32_GPIO_50000800_CLOCK_BITS_0
#define DT_GPIO_STM32_GPIOC_CLOCK_BUS_0 DT_ST_STM32_GPIO_50000800_CLOCK_BUS_0
#define DT_GPIO_STM32_GPIOC_CLOCK_CONTROLLER DT_ST_STM32_GPIO_50000800_CLOCK_CONTROLLER
#define DT_GPIO_STM32_GPIOC_LABEL DT_ST_STM32_GPIO_50000800_LABEL
#define DT_GPIO_STM32_GPIOC_SIZE DT_ST_STM32_GPIO_50000800_SIZE
#define DT_GPIO_STM32_GPIOC_CLOCK_BITS DT_ST_STM32_GPIO_50000800_CLOCK_BITS
#define DT_GPIO_STM32_GPIOC_CLOCK_BUS DT_ST_STM32_GPIO_50000800_CLOCK_BUS
#define DT_GPIO_STM32_GPIOD_BASE_ADDRESS DT_ST_STM32_GPIO_50000C00_BASE_ADDRESS
#define DT_GPIO_STM32_GPIOD_CLOCK_BITS_0 DT_ST_STM32_GPIO_50000C00_CLOCK_BITS_0
#define DT_GPIO_STM32_GPIOD_CLOCK_BUS_0 DT_ST_STM32_GPIO_50000C00_CLOCK_BUS_0
#define DT_GPIO_STM32_GPIOD_CLOCK_CONTROLLER DT_ST_STM32_GPIO_50000C00_CLOCK_CONTROLLER
#define DT_GPIO_STM32_GPIOD_LABEL DT_ST_STM32_GPIO_50000C00_LABEL
#define DT_GPIO_STM32_GPIOD_SIZE DT_ST_STM32_GPIO_50000C00_SIZE
#define DT_GPIO_STM32_GPIOD_CLOCK_BITS DT_ST_STM32_GPIO_50000C00_CLOCK_BITS
#define DT_GPIO_STM32_GPIOD_CLOCK_BUS DT_ST_STM32_GPIO_50000C00_CLOCK_BUS
#define DT_GPIO_STM32_GPIOF_BASE_ADDRESS DT_ST_STM32_GPIO_50001400_BASE_ADDRESS
#define DT_GPIO_STM32_GPIOF_CLOCK_BITS_0 DT_ST_STM32_GPIO_50001400_CLOCK_BITS_0
#define DT_GPIO_STM32_GPIOF_CLOCK_BUS_0 DT_ST_STM32_GPIO_50001400_CLOCK_BUS_0
#define DT_GPIO_STM32_GPIOF_CLOCK_CONTROLLER DT_ST_STM32_GPIO_50001400_CLOCK_CONTROLLER
#define DT_GPIO_STM32_GPIOF_LABEL DT_ST_STM32_GPIO_50001400_LABEL
#define DT_GPIO_STM32_GPIOF_SIZE DT_ST_STM32_GPIO_50001400_SIZE
#define DT_GPIO_STM32_GPIOF_CLOCK_BITS DT_ST_STM32_GPIO_50001400_CLOCK_BITS
#define DT_GPIO_STM32_GPIOF_CLOCK_BUS DT_ST_STM32_GPIO_50001400_CLOCK_BUS
/* End of SoC Level DTS fixup file */

View file

@ -36,6 +36,10 @@
#include <stm32g0xx_ll_rcc.h>
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */
#ifdef CONFIG_GPIO_STM32
#include <stm32g0xx_ll_gpio.h>
#endif
#endif /* !_ASMLANGUAGE */
#endif /* _STM32G0_SOC_H_ */