summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/stm32-usart.h
diff options
context:
space:
mode:
authorBich HEMON <bich.hemon@st.com>2018-03-12 09:50:05 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-14 13:35:37 +0100
commit1bcda09d291081a7732fcaa9d1745312404a4e36 (patch)
treeb339ce40f103539e7c94b1dddc70bf5f91b4b2ad /drivers/tty/serial/stm32-usart.h
parent241672cb4b166da3d2f4deb66bac335f44e04d4a (diff)
downloadlinux-1bcda09d291081a7732fcaa9d1745312404a4e36.tar.gz
linux-1bcda09d291081a7732fcaa9d1745312404a4e36.tar.bz2
linux-1bcda09d291081a7732fcaa9d1745312404a4e36.zip
serial: stm32: add support for RS485 hardware control mode
Implement Driver Enable signal (DE) to activate the transmission mode of the external transceiver. Signed-off-by: Yves Coppeaux <yves.coppeaux@st.com> Signed-off-by: Bich Hemon <bich.hemon@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/stm32-usart.h')
-rw-r--r--drivers/tty/serial/stm32-usart.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index 2294d0f05872..6f294e280ea3 100644
--- a/drivers/tty/serial/stm32-usart.h
+++ b/drivers/tty/serial/stm32-usart.h
@@ -135,6 +135,7 @@ struct stm32_usart_info stm32h7_info = {
#define USART_BRR_DIV_F_MASK GENMASK(3, 0)
#define USART_BRR_DIV_M_MASK GENMASK(15, 4)
#define USART_BRR_DIV_M_SHIFT 4
+#define USART_BRR_04_R_SHIFT 1
/* USART_CR1 */
#define USART_CR1_SBK BIT(0)
@@ -162,6 +163,8 @@ struct stm32_usart_info stm32h7_info = {
#define USART_CR1_M1 BIT(28) /* F7 */
#define USART_CR1_IE_MASK (GENMASK(8, 4) | BIT(14) | BIT(26) | BIT(27))
#define USART_CR1_FIFOEN BIT(29) /* H7 */
+#define USART_CR1_DEAT_SHIFT 21
+#define USART_CR1_DEDT_SHIFT 16
/* USART_CR2 */
#define USART_CR2_ADD_MASK GENMASK(3, 0) /* F4 */