Skip to contentSkip to conversation

rtc: Add rtc driver for stm32mp1

PATCH Superseded Benjamin Gaignard 2 participants 2 messages Jul 9, 2019 – Jul 11, 2019

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 rtc: Add rtc driver for stm32mp1

Add support of STM32MP1 rtc driver.
Enable it for basic and trusted configurations.

---
version 2:
- release clock on on error cases.

 configs/stm32mp15_basic_defconfig   |   2 +
 configs/stm32mp15_trusted_defconfig |   2 +
 drivers/rtc/Kconfig                 |   6 +
 drivers/rtc/Makefile                |   1 +
 drivers/rtc/stm32_rtc.c             | 323 ++++++++++++++++++++++++++++++++++++
 5 files changed, 334 insertions(+)
 create mode 100644 drivers/rtc/stm32_rtc.c
configs/stm32mp15_basic_defconfig +2 -0
index 4aa184fb5b..6352075307 100644
@@ -94,6 +94,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_REGULATOR_STM32_VREFBUF=y
 CONFIG_DM_REGULATOR_STPMIC1=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_STM32=y
 CONFIG_SERIAL_RX_BUFFER=y
 CONFIG_STM32_SERIAL=y
 CONFIG_SPI=y
configs/stm32mp15_trusted_defconfig +2 -0
index 5fe9477823..a663477735 100644
@@ -84,6 +84,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_REGULATOR_STM32_VREFBUF=y
 CONFIG_DM_REGULATOR_STPMIC1=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_STM32=y
 CONFIG_SERIAL_RX_BUFFER=y
 CONFIG_STM32_SERIAL=y
 CONFIG_SPI=y
drivers/rtc/Kconfig +6 -0
index fd0009b2e2..a383e632ad 100644
@@ -110,4 +110,10 @@ config RTC_M41T62
 	  Enable driver for ST's M41T62 compatible RTC devices (like RV-4162).
 	  It is a serial (I2C) real-time clock (RTC) with alarm.
 
+config RTC_STM32
+	bool "Enable STM32 RTC driver"
+	depends on DM_RTC
+	help
+	  Enable STM32 RTC driver. This driver supports the rtc that is present
+	  on some STM32 SoCs.
 endmenu
drivers/rtc/Makefile +1 -0
index 1724602f1c..90e79fb30d 100644
@@ -50,5 +50,6 @@ obj-$(CONFIG_RTC_RX8025) += rx8025.o
 obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o
 obj-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o
 obj-$(CONFIG_RTC_S35392A) += s35392a.o
+obj-$(CONFIG_RTC_STM32) += stm32_rtc.o
 obj-$(CONFIG_SANDBOX) += sandbox_rtc.o
 obj-$(CONFIG_RTC_X1205) += x1205.o
drivers/rtc/stm32_rtc.c new file +323 -0

323 lines not on this page · raw message

Signature · 1 line
2.15.0
#1 lore raw

PATCH v2 1/1 rtc: Add rtc driver for stm32mp1

Hi Benjamin,

Quoted 10 lines

From: Benjamin GAIGNARD <[email protected]>
Sent: mardi 9 juillet 2019 14:48

Add support of STM32MP1 rtc driver.
Enable it for basic and trusted configurations.

---
version 2:
- release clock on on error cases.

In V2, you also drop a part of the initial patch v1 for clock entry

[PATCH 1/2] clk: stm32mp1: Add RTC clock entry

So RTC is not functional.
Can you sent a v3 with the missing part.

Regards,

Patrick