Skip to content

Commit

Permalink
arch: arm: soc: stm32l0: add LPUART1 pinmux options
Browse files Browse the repository at this point in the history
Add obvious and easily testable PA2/PA3 configuration
(same pins as USART2).

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
  • Loading branch information
tagunil authored and galak committed May 25, 2018
1 parent 1e6d827 commit 8b7c3cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pinmux/stm32/pinmux_stm32l0.h
Expand Up @@ -31,6 +31,11 @@
#define STM32L0_PINMUX_FUNC_PA15_USART2_RX \
(STM32_PINMUX_ALT_FUNC_4 | STM32_PUPDR_NO_PULL)

#define STM32L0_PINMUX_FUNC_PA2_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
#define STM32L0_PINMUX_FUNC_PA3_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUPDR_NO_PULL)

#define STM32L0_PINMUX_FUNC_PB8_I2C1_SCL \
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
#define STM32L0_PINMUX_FUNC_PB9_I2C1_SDA \
Expand Down
6 changes: 6 additions & 0 deletions dts/arm/st/stm32l0-pinctrl.dtsi
Expand Up @@ -21,6 +21,12 @@
tx = <STM32_PIN_PA2 (STM32_PINMUX_ALT_FUNC_4 | STM32_PUSHPULL_NOPULL)>;
};
};
lpuart1_pins_a: lpuart1@0 {
rx_tx {
rx = <STM32_PIN_PA3 (STM32_PINMUX_ALT_FUNC_6 | STM32_PUPDR_NO_PULL)>;
tx = <STM32_PIN_PA2 (STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)>;
};
};
};
};
};

0 comments on commit 8b7c3cf

Please sign in to comment.