drivers/rtc: Enable RTC driver for STM32F7 series

Enable RTC driver for STM32F7 series.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
This commit is contained in:
Christian Taedcke 2018-10-16 21:51:00 +02:00 committed by Kumar Gala
commit 2e06fd50fd
5 changed files with 25 additions and 2 deletions

View file

@ -15,7 +15,7 @@ config RTC_STM32
select USE_STM32_LL_EXTI
select NEWLIB_LIBC
help
Build RTC driver for STM32 SoCs. Tested on STM32 F3, F4, L4 series.
Build RTC driver for STM32 SoCs. Tested on STM32 F3, F4, L4, F7 series.
choice RTC_STM32_CLOCK_SRC
bool "RTC clock source"

View file

@ -19,7 +19,9 @@
#if defined(CONFIG_SOC_SERIES_STM32L4X)
#define EXTI_LINE LL_EXTI_LINE_18
#elif defined(CONFIG_SOC_SERIES_STM32F4X) || defined(CONFIG_SOC_SERIES_STM32F3X)
#elif defined(CONFIG_SOC_SERIES_STM32F4X) \
|| defined(CONFIG_SOC_SERIES_STM32F3X) \
|| defined(CONFIG_SOC_SERIES_STM32F7X)
#define EXTI_LINE LL_EXTI_LINE_17
#endif

View file

@ -474,6 +474,15 @@
status = "disabled";
label= "OTGHS";
};
rtc: rtc@40002800 {
compatible = "st,stm32-rtc";
reg = <0x40002800 0x300>;
interrupts = <41 0>;
prescaler = <32768>;
status = "disabled";
label = "RTC_0";
};
};
};

View file

@ -134,4 +134,10 @@
#define CONFIG_PWM_STM32_14_DEV_NAME ST_STM32_PWM_40002000_PWM_LABEL
#define CONFIG_PWM_STM32_14_PRESCALER ST_STM32_PWM_40002000_PWM_ST_PRESCALER
#define CONFIG_RTC_0_BASE_ADDRESS ST_STM32_RTC_40002800_BASE_ADDRESS
#define CONFIG_RTC_0_IRQ_PRI ST_STM32_RTC_40002800_IRQ_0_PRIORITY
#define CONFIG_RTC_0_IRQ ST_STM32_RTC_40002800_IRQ_0
#define CONFIG_RTC_0_NAME ST_STM32_RTC_40002800_LABEL
#define CONFIG_RTC_PRESCALER ST_STM32_RTC_40002800_PRESCALER
/* End of SoC Level DTS fixup file */

View file

@ -50,6 +50,12 @@
#include <stm32f7xx_ll_rng.h>
#endif
#ifdef CONFIG_RTC_STM32
#include <stm32f7xx_ll_rtc.h>
#include <stm32f7xx_ll_exti.h>
#include <stm32f7xx_ll_pwr.h>
#endif
#endif /* !_ASMLANGUAGE */
#endif /* _STM32F7_SOC_H_ */