pinmux: stm32f4: Add SPI2 pins on PB12, PB13, PB14 & PB15

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Jorge Ramirez-Ortiz 2017-05-24 13:28:24 +02:00 committed by Anas Nashif
commit dd2eeaf352
2 changed files with 22 additions and 0 deletions

View file

@ -232,10 +232,24 @@ static const stm32_pin_func_t pin_pb11_funcs[] = {
static const stm32_pin_func_t pin_pb12_funcs[] = { static const stm32_pin_func_t pin_pb12_funcs[] = {
PINMUX_UART(PB12, UART5, RX) PINMUX_UART(PB12, UART5, RX)
[STM32F4_PINMUX_FUNC_PB12_SPI2_NSS - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
}; };
static const stm32_pin_func_t pin_pb13_funcs[] = { static const stm32_pin_func_t pin_pb13_funcs[] = {
PINMUX_UART(PB13, UART5, TX) PINMUX_UART(PB13, UART5, TX)
[STM32F4_PINMUX_FUNC_PB13_SPI2_SCK - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};
static const stm32_pin_func_t pin_pb14_funcs[] = {
[STM32F4_PINMUX_FUNC_PB14_SPI2_MISO - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};
static const stm32_pin_func_t pin_pb15_funcs[] = {
[STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
}; };
/* Port C */ /* Port C */
@ -432,6 +446,8 @@ static const struct stm32_pinmux_conf pins[] = {
STM32_PIN_CONF(STM32_PIN_PB11, pin_pb11_funcs), STM32_PIN_CONF(STM32_PIN_PB11, pin_pb11_funcs),
STM32_PIN_CONF(STM32_PIN_PB12, pin_pb12_funcs), STM32_PIN_CONF(STM32_PIN_PB12, pin_pb12_funcs),
STM32_PIN_CONF(STM32_PIN_PB13, pin_pb13_funcs), STM32_PIN_CONF(STM32_PIN_PB13, pin_pb13_funcs),
STM32_PIN_CONF(STM32_PIN_PB14, pin_pb14_funcs),
STM32_PIN_CONF(STM32_PIN_PB15, pin_pb15_funcs),
/* Port C */ /* Port C */
STM32_PIN_CONF(STM32_PIN_PC5, pin_pc5_funcs), STM32_PIN_CONF(STM32_PIN_PC5, pin_pc5_funcs),

View file

@ -74,10 +74,16 @@
#define STM32F4_PINMUX_FUNC_PB11_I2C2_SDA STM32_PINMUX_FUNC_ALT_4 #define STM32F4_PINMUX_FUNC_PB11_I2C2_SDA STM32_PINMUX_FUNC_ALT_4
#define STM32F4_PINMUX_FUNC_PB11_USART3_RX STM32_PINMUX_FUNC_ALT_7 #define STM32F4_PINMUX_FUNC_PB11_USART3_RX STM32_PINMUX_FUNC_ALT_7
#define STM32F4_PINMUX_FUNC_PB12_SPI2_NSS STM32_PINMUX_FUNC_ALT_5
#define STM32F4_PINMUX_FUNC_PB12_UART5_RX STM32_PINMUX_FUNC_ALT_11 #define STM32F4_PINMUX_FUNC_PB12_UART5_RX STM32_PINMUX_FUNC_ALT_11
#define STM32F4_PINMUX_FUNC_PB13_SPI2_SCK STM32_PINMUX_FUNC_ALT_5
#define STM32F4_PINMUX_FUNC_PB13_UART5_TX STM32_PINMUX_FUNC_ALT_11 #define STM32F4_PINMUX_FUNC_PB13_UART5_TX STM32_PINMUX_FUNC_ALT_11
#define STM32F4_PINMUX_FUNC_PB14_SPI2_MISO STM32_PINMUX_FUNC_ALT_5
#define STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI STM32_PINMUX_FUNC_ALT_5
/* Port C */ /* Port C */
#define STM32F4_PINMUX_FUNC_PC5_USART3_RX STM32_PINMUX_FUNC_ALT_7 #define STM32F4_PINMUX_FUNC_PC5_USART3_RX STM32_PINMUX_FUNC_ALT_7