aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/serial_stm32x7.c
AgeCommit message (Collapse)Author
2017-10-08serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flagPatrice Chotard
This driver is currently used by STM32F7 and STM32H7 SoCs. As CONFIG_CLK and OF_CONTROL flags are set by default for these 2 SoCs, this flag becomes useless in this driver, so remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add STM32F4 supportPatrice Chotard
stm32f4 doesn't support FIFO and OVERRUN feature. The enable bit is not at the same location in CR1 register than for STM32F7 and STM32H7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add fifo support for STM32H7Patrice Chotard
Add fifo mode support for rx and tx. As only STM32H7 supports this feature, add has_fifo flag to uart configuration to use fifo only when possible. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: prepare the ground to STM32F4 supportPatrice Chotard
STM32F4 serial IP is similar to F7 and H7, but registers are not located at the same offset and some feature are only supported by F7 and H7 version. Registers offset must be added for each version and also some flags indicated the supported feature. Update registers name to match with datasheet (sr to isr, rx_dr to rdr and tx_dr to tdr) and remove unused regs (cr2, gtpr, rtor, and rqr). Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatiblePatrice Chotard
This patch remove the extra compatibility string "st,stm32h7-usart" and "st,stm32f7-usart" to avoid confusion, save some time & space. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-09-22serial: stm32x7: add STM32H7 supportPatrice Chotard
STM32F7 and STM32H7 shares the same UART block, add STM32H7 compatible string. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26serial: stm32x7: add clk_get_rate() supportPatrice Chotard
Replace proprietary clock_get() by clk_get_rate() The stm32x7 serial driver is now "generic" and can be used by other STM32 SoCs. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26serial: stm32x7: migrate serial struct to driverPatrice Chotard
This allow to remove include/dm/platform_data/serial_stm32x7.h which was included in the past by stm32x7 driver and by stm32f746-disco.c board file. Since patch 42bf5e7c27 "serial: stm32f7: add device tree support" this file is no more needed in board file. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-06-12serial: stm32x7: simplify baud rate register calculationPatrice Chotard
Simplify baud rate register formula and use the oversampling uart feature. This code is aligned with what is implemented in kernel driver drivers/tty/serial/stm32-usart.c since kernel v4.9. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Christophe KERELLO <christophe.kerello@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-06-12serial: stm32x7: align compatible with kernel onePatrice Chotard
stm32x7.c driver is dedicated for STM32F7. In kernel, "st,stm32-usart" and "st,stm32-uart" compatible strings are dedicated for STM32F4. To keep U-boot and kernel aligned, replace the serial compatible string from "st,stm32-usart", "st,stm32-uart" to "st,stm32f7-usart", "st,stm32f7-uart" specific for STM32F7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Christophe KERELLO <christophe.kerello@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-06-09serial: stm32f7: disable overrunVikas Manocha
With overrun enabled, serial port console freezes & stops receiving data with overun error if we keep sending data. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-06-01dm: Rename dev_addr..() functionsSimon Glass
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion. In the end we will have: 1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree only All drivers will be written to use 1. That function will in turn call either 2 or 3 depending on whether the flat or live tree is in use. Note this involves changing some dead code - the imx_lpi2c.c file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-03-17stm32f7: serial: use clock driver to enable clockVikas Manocha
Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-17serial: stm32f7: add device tree supportVikas Manocha
This patch adds device tree support for stm32f7 serial driver & removes serial platform data structure. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-07-14stm32: clk: Add 200MHz clock configuration for stm32f746 discovery boardToshifumi NISHINAGA
This patch adds 200MHz clock configuration for stm32f746 discovery board. This patch is based on STM32F4 and emcraft's[1]. [1]: https://github.com/EmcraftSystems/u-boot Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
2016-02-24stm32x7: add support for stm32x7 serial driverVikas Manocha
This patch adds support for stm32f7 family usart peripheral. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>