dts: arm: Add clocks u(s)art on stm32 family
Add "clocks" property on u(s)arts nodes on stm32 socs Add a dt clocks binding file and rework clock_control header file include new device tree binding file. include/dt-bindings folder is introduced as dt-bindings placeholder Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
c8852fb379
commit
f8240018d0
15 changed files with 70 additions and 10 deletions
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -52,6 +54,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -60,6 +63,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -52,6 +54,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -60,6 +63,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40011000 {
|
usart1: serial@40011000 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40011000 0x400>;
|
reg = <0x40011000 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart6: serial@40011400 {
|
usart6: serial@40011400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40011400 0x400>;
|
reg = <0x40011400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000020>;
|
||||||
interrupts = <71 0>;
|
interrupts = <71 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_6";
|
label = "UART_6";
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
uart4: serial@40004c00 {
|
uart4: serial@40004c00 {
|
||||||
compatible ="st,stm32-uart";
|
compatible ="st,stm32-uart";
|
||||||
reg = <0x40004c00 0x400>;
|
reg = <0x40004c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
|
||||||
interrupts = <52 0>;
|
interrupts = <52 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_4";
|
label = "UART_4";
|
||||||
|
@ -27,6 +29,7 @@
|
||||||
uart5: serial@40005000 {
|
uart5: serial@40005000 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40005000 0x400>;
|
reg = <0x40005000 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00100000>;
|
||||||
interrupts = <53 0>;
|
interrupts = <53 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_5";
|
label = "UART_5";
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
uart4: serial@40004c00 {
|
uart4: serial@40004c00 {
|
||||||
compatible ="st,stm32-uart";
|
compatible ="st,stm32-uart";
|
||||||
reg = <0x40004c00 0x400>;
|
reg = <0x40004c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
|
||||||
interrupts = <52 0>;
|
interrupts = <52 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_4";
|
label = "UART_4";
|
||||||
|
@ -27,6 +29,7 @@
|
||||||
uart5: serial@40005000 {
|
uart5: serial@40005000 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40005000 0x400>;
|
reg = <0x40005000 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00100000>;
|
||||||
interrupts = <53 0>;
|
interrupts = <53 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_5";
|
label = "UART_5";
|
||||||
|
@ -35,6 +38,7 @@
|
||||||
uart7: serial@40007800 {
|
uart7: serial@40007800 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40007800 0x400>;
|
reg = <0x40007800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x40000000>;
|
||||||
interrupts = <82 0>;
|
interrupts = <82 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_7";
|
label = "UART_7";
|
||||||
|
@ -43,6 +47,7 @@
|
||||||
uart8: serial@40007c00 {
|
uart8: serial@40007c00 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40007c00 0x400>;
|
reg = <0x40007c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>;
|
||||||
interrupts = <83 0>;
|
interrupts = <83 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_8";
|
label = "UART_8";
|
||||||
|
@ -51,6 +56,7 @@
|
||||||
uart9: serial@40011800 {
|
uart9: serial@40011800 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40011800 0x400>;
|
reg = <0x40011800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000040>;
|
||||||
interrupts = <88 0>;
|
interrupts = <88 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_9";
|
label = "UART_9";
|
||||||
|
@ -59,6 +65,7 @@
|
||||||
uart10: serial@40011c00 {
|
uart10: serial@40011c00 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40011c00 0x400>;
|
reg = <0x40011c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000080>;
|
||||||
interrupts = <89 0>;
|
interrupts = <89 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_10";
|
label = "UART_10";
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
uart7: serial@40007800 {
|
uart7: serial@40007800 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40007800 0x400>;
|
reg = <0x40007800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x40000000>;
|
||||||
interrupts = <82 0>;
|
interrupts = <82 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_7";
|
label = "UART_7";
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
uart8: serial@40007c00 {
|
uart8: serial@40007c00 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40007c00 0x400>;
|
reg = <0x40007c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>;
|
||||||
interrupts = <83 0>;
|
interrupts = <83 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_8";
|
label = "UART_8";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
@ -65,6 +69,7 @@
|
||||||
uart4: serial@40004c00 {
|
uart4: serial@40004c00 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40004c00 0x400>;
|
reg = <0x40004c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
|
||||||
interrupts = <52 0>;
|
interrupts = <52 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_4";
|
label = "UART_4";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <st/mem.h>
|
#include <st/mem.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
usart1: serial@40013800 {
|
usart1: serial@40013800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40013800 0x400>;
|
reg = <0x40013800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
|
||||||
interrupts = <37 0>;
|
interrupts = <37 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_1";
|
label = "UART_1";
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
usart2: serial@40004400 {
|
usart2: serial@40004400 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004400 0x400>;
|
reg = <0x40004400 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
|
||||||
interrupts = <38 0>;
|
interrupts = <38 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_2";
|
label = "UART_2";
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
usart3: serial@40004800 {
|
usart3: serial@40004800 {
|
||||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||||
reg = <0x40004800 0x400>;
|
reg = <0x40004800 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
|
||||||
interrupts = <39 0>;
|
interrupts = <39 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_3";
|
label = "UART_3";
|
||||||
|
@ -65,6 +69,7 @@
|
||||||
uart4: serial@40004c00 {
|
uart4: serial@40004c00 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40004c00 0x400>;
|
reg = <0x40004c00 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
|
||||||
interrupts = <52 0>;
|
interrupts = <52 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_4";
|
label = "UART_4";
|
||||||
|
@ -73,6 +78,7 @@
|
||||||
uart5: serial@40005000 {
|
uart5: serial@40005000 {
|
||||||
compatible = "st,stm32-uart";
|
compatible = "st,stm32-uart";
|
||||||
reg = <0x40005000 0x400>;
|
reg = <0x40005000 0x400>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00100000>;
|
||||||
interrupts = <53 0>;
|
interrupts = <53 0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
label = "UART_5";
|
label = "UART_5";
|
||||||
|
|
|
@ -10,20 +10,11 @@
|
||||||
#define _STM32_CLOCK_CONTROL_H_
|
#define _STM32_CLOCK_CONTROL_H_
|
||||||
|
|
||||||
#include <clock_control.h>
|
#include <clock_control.h>
|
||||||
|
#include <dt-bindings/clock/stm32_clock.h>
|
||||||
|
|
||||||
/* common clock control device name for all STM32 chips */
|
/* common clock control device name for all STM32 chips */
|
||||||
#define STM32_CLOCK_CONTROL_NAME "stm32-cc"
|
#define STM32_CLOCK_CONTROL_NAME "stm32-cc"
|
||||||
|
|
||||||
/* Bus */
|
|
||||||
enum {
|
|
||||||
STM32_CLOCK_BUS_AHB1,
|
|
||||||
STM32_CLOCK_BUS_AHB2,
|
|
||||||
STM32_CLOCK_BUS_APB1,
|
|
||||||
#ifdef CONFIG_SOC_SERIES_STM32L4X
|
|
||||||
STM32_CLOCK_BUS_APB1_2,
|
|
||||||
#endif
|
|
||||||
STM32_CLOCK_BUS_APB2,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct stm32_pclken {
|
struct stm32_pclken {
|
||||||
u32_t bus;
|
u32_t bus;
|
||||||
|
|
17
include/dt-bindings/clock/stm32_clock.h
Normal file
17
include/dt-bindings/clock/stm32_clock.h
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017 Linaro Limited
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#ifndef __STM32_CLOCK_H
|
||||||
|
#define __STM32_CLOCK_H
|
||||||
|
|
||||||
|
/* clock bus references */
|
||||||
|
#define STM32_CLOCK_BUS_AHB1 0
|
||||||
|
#define STM32_CLOCK_BUS_AHB2 1
|
||||||
|
#define STM32_CLOCK_BUS_APB1 2
|
||||||
|
#define STM32_CLOCK_BUS_APB2 3
|
||||||
|
#define STM32_CLOCK_BUS_APB1_2 4
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __STM32_CLOCK_H */
|
Loading…
Add table
Add a link
Reference in a new issue