Skip to content
Permalink
Browse files

pinmux: stm32f4: Add STM32_OSPEEDR_VERY_HIGH_SPEED to pinmux header

Since STM32_OSPEEDR_VERY_HIGH_SPEED flag is required for all I2S_CK
pins, lets add this to the STM32F4 pinmux header and remove the
duplicates in board files. While we are at it, let's add the missing
pinmux definitions for I2S_2 also.

Fixes: #9028

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  • Loading branch information...
Mani-Sadhasivam authored and galak committed Mar 5, 2019
1 parent 8515b84 commit 5274c38200a357aeb9632a9994e6e7d564e6fb00
@@ -47,8 +47,7 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI},
#endif /* CONFIG_SPI_2 */ #endif /* CONFIG_SPI_2 */
#ifdef CONFIG_I2S_5 #ifdef CONFIG_I2S_5
{STM32_PIN_PB0, STM32F4_PINMUX_FUNC_PB0_I2S5_CK | {STM32_PIN_PB0, STM32F4_PINMUX_FUNC_PB0_I2S5_CK},
STM32_OSPEEDR_VERY_HIGH_SPEED},
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2S5_SD}, {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2S5_SD},
#endif /* CONFIG_I2S_5 */ #endif /* CONFIG_I2S_5 */
}; };
@@ -55,8 +55,7 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI},
#endif /* CONFIG_SPI_2 */ #endif /* CONFIG_SPI_2 */
#ifdef CONFIG_I2S_2 #ifdef CONFIG_I2S_2
{STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_I2S2_CK | {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_I2S2_CK},
STM32_OSPEEDR_VERY_HIGH_SPEED},
{STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_I2S2_SD}, {STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_I2S2_SD},
#endif /* CONFIG_I2S_2 */ #endif /* CONFIG_I2S_2 */
#ifdef CONFIG_PWM_STM32_3 #ifdef CONFIG_PWM_STM32_3
@@ -62,7 +62,8 @@
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \ (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED) STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PA5_I2S1_CK \ #define STM32F4_PINMUX_FUNC_PA5_I2S1_CK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)


#define STM32F4_PINMUX_FUNC_PA6_SPI1_MISO \ #define STM32F4_PINMUX_FUNC_PA6_SPI1_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
@@ -114,13 +115,15 @@


/* Port B */ /* Port B */
#define STM32F4_PINMUX_FUNC_PB0_I2S5_CK \ #define STM32F4_PINMUX_FUNC_PB0_I2S5_CK \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PB0_ETH \ #define STM32F4_PINMUX_FUNC_PB0_ETH \
(STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \ (STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED) STM32_OSPEEDR_VERY_HIGH_SPEED)


#define STM32F4_PINMUX_FUNC_PB3_I2S3_CK \ #define STM32F4_PINMUX_FUNC_PB3_I2S3_CK \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PB3_USART1_RX \ #define STM32F4_PINMUX_FUNC_PB3_USART1_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F4_PINMUX_FUNC_PB3_UART7_RX \ #define STM32F4_PINMUX_FUNC_PB3_UART7_RX \
@@ -225,9 +228,11 @@
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \ (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED) STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PB13_I2S2_CK \ #define STM32F4_PINMUX_FUNC_PB13_I2S2_CK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PB13_I2S4_CK \ #define STM32F4_PINMUX_FUNC_PB13_I2S4_CK \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PB13_USART3_CTS \ #define STM32F4_PINMUX_FUNC_PB13_USART3_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_OPENDRAIN_PULLUP) (STM32_PINMUX_ALT_FUNC_7 | STM32_OPENDRAIN_PULLUP)
#define STM32F4_PINMUX_FUNC_PB13_UART5_TX \ #define STM32F4_PINMUX_FUNC_PB13_UART5_TX \
@@ -254,6 +259,8 @@
#define STM32F4_PINMUX_FUNC_PC1_ETH \ #define STM32F4_PINMUX_FUNC_PC1_ETH \
(STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \ (STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED) STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F4_PINMUX_FUNC_PC1_I2S2_SD \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)


#define STM32F4_PINMUX_FUNC_PC2_ETH \ #define STM32F4_PINMUX_FUNC_PC2_ETH \
(STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \ (STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | \
@@ -282,6 +289,9 @@
(STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL)
#define STM32F4_PINMUX_FUNC_PC7_USART6_RX \ #define STM32F4_PINMUX_FUNC_PC7_USART6_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
#define STM32F4_PINMUX_FUNC_PC7_I2S2_CK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)


#define STM32F4_PINMUX_FUNC_PC8_PWM3_CH3 \ #define STM32F4_PINMUX_FUNC_PC8_PWM3_CH3 \
(STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL) (STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL)

0 comments on commit 5274c38

Please sign in to comment.
You can’t perform that action at this time.