Skip to content
Permalink
Browse files

drivers: pinmux: enable SPI pins on stm32wb

enable spi pins on stm32wb

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
  • Loading branch information...
Rick Conrey authored and galak committed Jul 8, 2019
1 parent 9d371d8 commit 3f58038c039607b450ed7b2c48b295ade8c57963
Showing with 65 additions and 0 deletions.
  1. +65 −0 drivers/pinmux/stm32/pinmux_stm32wbx.h
@@ -23,6 +23,28 @@
#define STM32WBX_PINMUX_FUNC_PA12_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)

/* SPI1 */
#define STM32WBX_PINMUX_FUNC_PA1_SPI1_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA4_SPI1_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA5_SPI1_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA6_SPI1_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA7_SPI1_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA11_SPI1_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA12_SPI1_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA15_SPI1_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* SPI2 */
#define STM32WBX_PINMUX_FUNC_PA9_SPI2_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* Port B */
#define STM32WBX_PINMUX_FUNC_PB5_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
@@ -39,6 +61,30 @@
#define STM32WBX_PINMUX_FUNC_PB11_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)

/* SPI1 */
#define STM32WBX_PINMUX_FUNC_PB2_SPI1_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB3_SPI1_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB4_SPI1_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB5_SPI1_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* SPI2 */
#define STM32WBX_PINMUX_FUNC_PB9_SPI2_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB10_SPI2_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB12_SPI2_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB13_SPI2_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB14_SPI2_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB15_SPI2_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* Port C */
#define STM32WBX_PINMUX_FUNC_PC0_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
@@ -49,7 +95,26 @@
#define STM32WBX_PINMUX_FUNC_PC1_I2C3_SDA \
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)

/* SPI2 */
#define STM32WBX_PINMUX_FUNC_PC1_SPI2_MOSI \
(STM32_PINMUX_ALT_FUNC_3 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PC2_SPI2_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PC3_SPI2_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* Port D */
/* SPI2 */
#define STM32WBX_PINMUX_FUNC_PD0_SPI2_NSS \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PD1_SPI2_SCK \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PD3_SPI2_SCK \
(STM32_PINMUX_ALT_FUNC_3 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PD3_SPI2_MISO \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PD4_SPI2_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

/* Port E */

0 comments on commit 3f58038

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