drivers/counter: stm32 rtc: Use dts to get RTC clock information
RTC clock information should be provided by dts files Fixes #10451 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
da744314ca
commit
3074e393db
10 changed files with 20 additions and 3 deletions
|
@ -320,8 +320,8 @@ static const struct rtc_stm32_config rtc_config = {
|
|||
.channels = 1,
|
||||
},
|
||||
.pclken = {
|
||||
.enr = LL_APB1_GRP1_PERIPH_PWR,
|
||||
.bus = STM32_CLOCK_BUS_APB1,
|
||||
.enr = DT_RTC_0_CLOCK_BITS,
|
||||
.bus = DT_RTC_0_CLOCK_BUS,
|
||||
},
|
||||
.ll_rtc_config = {
|
||||
.HourFormat = LL_RTC_HOURFORMAT_24HOUR,
|
||||
|
|
|
@ -288,6 +288,7 @@
|
|||
rtc: rtc@40002800 {
|
||||
compatible = "st,stm32-rtc";
|
||||
reg = <0x40002800 0x400>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>;
|
||||
interrupts = <41 0>;
|
||||
prescaler = <32768>;
|
||||
status = "disabled";
|
||||
|
|
|
@ -363,6 +363,7 @@
|
|||
compatible = "st,stm32-rtc";
|
||||
reg = <0x40002800 0x400>;
|
||||
interrupts = <41 0>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>;
|
||||
prescaler = <32768>;
|
||||
status = "disabled";
|
||||
label = "RTC_0";
|
||||
|
|
|
@ -578,6 +578,7 @@
|
|||
compatible = "st,stm32-rtc";
|
||||
reg = <0x40002800 0x300>;
|
||||
interrupts = <41 0>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>;
|
||||
prescaler = <32768>;
|
||||
status = "disabled";
|
||||
label = "RTC_0";
|
||||
|
|
|
@ -286,6 +286,7 @@
|
|||
compatible = "st,stm32-rtc";
|
||||
reg = <0x40002800 0x400>;
|
||||
interrupts = <41 0>;
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>;
|
||||
prescaler = <32768>;
|
||||
status = "disabled";
|
||||
label = "RTC_0";
|
||||
|
|
|
@ -25,4 +25,10 @@ properties:
|
|||
description: mmio register space
|
||||
generation: define
|
||||
category: required
|
||||
|
||||
clocks:
|
||||
type: array
|
||||
category: optional
|
||||
description: Clock gate information
|
||||
generation: define
|
||||
...
|
||||
|
|
|
@ -255,6 +255,7 @@
|
|||
#define CONFIG_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define DT_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define CONFIG_RTC_PRESCALER DT_ST_STM32_RTC_40002800_PRESCALER
|
||||
|
||||
#define DT_WDT_0_NAME DT_ST_STM32_WATCHDOG_0_LABEL
|
||||
#define DT_RTC_0_CLOCK_BITS DT_ST_STM32_RTC_40002800_CLOCK_BITS
|
||||
#define DT_RTC_0_CLOCK_BUS DT_ST_STM32_RTC_40002800_CLOCK_BUS
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -366,6 +366,8 @@
|
|||
#define CONFIG_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define DT_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define CONFIG_RTC_PRESCALER DT_ST_STM32_RTC_40002800_PRESCALER
|
||||
#define DT_RTC_0_CLOCK_BITS DT_ST_STM32_RTC_40002800_CLOCK_BITS
|
||||
#define DT_RTC_0_CLOCK_BUS DT_ST_STM32_RTC_40002800_CLOCK_BUS
|
||||
|
||||
#define DT_WDT_0_NAME DT_ST_STM32_WATCHDOG_0_LABEL
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -355,6 +355,8 @@
|
|||
#define CONFIG_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define DT_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define CONFIG_RTC_PRESCALER DT_ST_STM32_RTC_40002800_PRESCALER
|
||||
#define DT_RTC_0_CLOCK_BITS DT_ST_STM32_RTC_40002800_CLOCK_BITS
|
||||
#define DT_RTC_0_CLOCK_BUS DT_ST_STM32_RTC_40002800_CLOCK_BUS
|
||||
|
||||
#define DT_FLASH_DEV_BASE_ADDRESS DT_ST_STM32F7_FLASH_CONTROLLER_40023C00_BASE_ADDRESS
|
||||
#define DT_FLASH_DEV_NAME DT_ST_STM32F7_FLASH_CONTROLLER_40023C00_LABEL
|
||||
|
|
|
@ -177,6 +177,8 @@
|
|||
#define CONFIG_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define DT_RTC_0_NAME DT_ST_STM32_RTC_40002800_LABEL
|
||||
#define CONFIG_RTC_PRESCALER DT_ST_STM32_RTC_40002800_PRESCALER
|
||||
#define DT_RTC_0_CLOCK_BITS DT_ST_STM32_RTC_40002800_CLOCK_BITS
|
||||
#define DT_RTC_0_CLOCK_BUS DT_ST_STM32_RTC_40002800_CLOCK_BUS
|
||||
|
||||
#define DT_SPI_1_BASE_ADDRESS DT_ST_STM32_SPI_FIFO_40013000_BASE_ADDRESS
|
||||
#define DT_SPI_1_IRQ_PRI DT_ST_STM32_SPI_FIFO_40013000_IRQ_0_PRIORITY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue