drivers: serial: add dts peripherals to stm32g0
Added device tree nodes and associated headers for defined uarts on the stm32g0 and stm32g07x 8x parts. Tested with uart on stm32g071rb disco board with usart3 going to stlink. Using shell. Signed-off-by: Kieran Levin <ktl@frame.work>
This commit is contained in:
parent
1a0ba4c6ec
commit
acac1584bc
4 changed files with 37 additions and 1 deletions
|
@ -99,7 +99,7 @@ config UART_10
|
|||
|
||||
config LPUART_1
|
||||
bool "Enable STM32 LPUART1 Port"
|
||||
depends on SOC_SERIES_STM32L0X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32WBX || SOC_SERIES_STM32H7X || SOC_SERIES_STM32G4X
|
||||
depends on SOC_SERIES_STM32L0X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32WBX || SOC_SERIES_STM32H7X || SOC_SERIES_STM32G4X || SOC_SERIES_STM32G0X
|
||||
help
|
||||
Enable support for LPUART1 port in the driver.
|
||||
Say y here if you want to use LPUART1 device.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2019 Philippe Retornaz <philippe@shapescale.com>
|
||||
* Copyright (c) 2019 ST Microelectronics
|
||||
* Copyright (c) 2019 Centaur Analytics, Inc
|
||||
* Copyright (C) 2020 Framework Computer LLC <ktl@frame.work>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -121,6 +122,16 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
lpuart1: serial@40008000 {
|
||||
compatible = "st,stm32-lpuart", "st,stm32-uart";
|
||||
reg = <0x40008000 0x400>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00100000>;
|
||||
interrupts = <29 3>;
|
||||
interrupt-names = "combined";
|
||||
status = "disabled";
|
||||
label = "LPUART_1";
|
||||
};
|
||||
|
||||
usart1: serial@40013800 {
|
||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||
reg = <0x40013800 0x400>;
|
||||
|
|
|
@ -6,3 +6,27 @@
|
|||
*/
|
||||
|
||||
#include <st/g0/stm32g0.dtsi>
|
||||
|
||||
/ {
|
||||
soc {
|
||||
usart3: serial@40004800 {
|
||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||
reg = <0x40004800 0x400>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||
interrupts = <29 0>;
|
||||
interrupt-names = "combined";
|
||||
status = "disabled";
|
||||
label = "UART_3";
|
||||
};
|
||||
|
||||
usart4: serial@40004c00 {
|
||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||
reg = <0x40004c00 0x400>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
|
||||
interrupts = <29 1>;
|
||||
interrupt-names = "combined";
|
||||
status = "disabled";
|
||||
label = "UART_4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
#ifdef CONFIG_SERIAL_HAS_DRIVER
|
||||
#include <stm32g0xx_ll_usart.h>
|
||||
#include <stm32g0xx_ll_lpuart.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HWINFO_STM32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue