AMLogic Meson SoC RTC driver
v4 cover AMLogic Meson SoC RTC driver
This series adds support for the on SoC RTC driver on the AMLogic Meson devices. The device-tree updates are not included as they depend on the reset-controller support in -next.
The series does not have any build dependencies, but does require the reset controller and device-tree entries for the device-tree files for the relevant boards.
The series tested by myself on the ODroid-C1 board with a battery pack attached. It has also been tested by Kevin Hilman.
I will send the DT changes in a second series so that they can be merged once the dependencies have been satisified.
Changes since V3:
<[email protected]>
- Added Kevin's tested by
Changes since V1:
<[email protected]>
- Fixed checkpatch and sparse errors
- Fixed minor locking bug when writing static-control register
- Updated the code ordering in the rtc-meson.c driver
- Fixed alphanumeric ordering in on-cpu rtc block
- Added Rob Hering's ack for the DT binding documentation
- Added better description to the RTC driver header.
Ben Dooks (2):
rtc: support for amlogic meson rtc
meson-rtc: add device-tree binding
.../devicetree/bindings/rtc/rtc-amlogic.txt | 21 ++ drivers/rtc/Kconfig | 9 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-meson.c | 349 +++++++++++++++++++++ 4 files changed, 380 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-amlogic.txt create mode 100644 drivers/rtc/rtc-meson.c
Signature · 1 line
2.8.1
PATCH v4 1/2 rtc: support for amlogic meson rtc
Add support for the AMLogic meson8b/meson6 RTC block.
---
V4:
- Added Kevin Hilman's tested-by
V3..V1:
- Fixed alpha-ordering in Kconfig
- Fixed checkpatch errors
- Added basic driver information
- Re-organised static-register access functions above rtc driver layer
--- drivers/rtc/Kconfig | 9 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-meson.c | 349 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+) create mode 100644 drivers/rtc/rtc-meson.c
drivers/rtc/Kconfig +9 -0
@@ -1181,6 +1181,15 @@ config RTC_DRV_ASM9260 This driver can also be built as a module. If so, the module will be called rtc-asm9260. +config RTC_DRV_MESON + tristate "AMLogic Meson Real Time Clock" + depends on ARCH_MESON || COMPILE_TEST + help + Support for AMLogic Meson RTC block. + + This driver can also be built as a module, if so, the module + will be called "rtc-meson". + config RTC_DRV_DAVINCI tristate "TI DaVinci RTC" depends on ARCH_DAVINCI_DM365 || COMPILE_TEST
drivers/rtc/Makefile +1 -0
@@ -92,6 +92,7 @@ obj-$(CONFIG_RTC_DRV_MAX8997) += rtc-max8997.o obj-$(CONFIG_RTC_DRV_MAX8998) += rtc-max8998.o obj-$(CONFIG_RTC_DRV_MC13XXX) += rtc-mc13xxx.o obj-$(CONFIG_RTC_DRV_MCP795) += rtc-mcp795.o +obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o obj-$(CONFIG_RTC_DRV_MOXART) += rtc-moxart.o obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
drivers/rtc/rtc-meson.c new file +349 -0
349 lines not on this page · raw message
Signature · 1 line
2.8.1
PATCH v4 2/2 meson-rtc: add device-tree binding
In reply to Ben DooksAdd documentation for the AMLogic Meson RTC.
--- .../devicetree/bindings/rtc/rtc-amlogic.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-amlogic.txt
Documentation/devicetree/bindings/rtc/rtc-amlogic.txt new file +21 -0
@@ -0,0 +1,21 @@ +* AMlogic Meson RTC + +Required properties: +- compatible: should be one of the following describing the hardware: + * "amlogic,meson6-rtc" + * "amlogic,meson8-rtc" + * "amlogic,meson8b-rtc" + +- reg: physical register space for the controller's memory mapped registers. + +Optional properties: +- resets: reset controller reference to allow reset of the controller +- interrupts: single interrupt reference if interrupt support needed + +Example: + + rtc: rtc at c8100740 { + compatible = "amlogic,meson6-rtc"; + reg = <0xc8100740 0x14>; + status = "disabled"; + };
Signature · 1 line
2.8.1
v4 cover AMLogic Meson SoC RTC driver
In reply to Ben DooksWell, I hoped I could send my review before v4 but I was a bit too late...
Quoted 43 lines · Ben Dooks
This series adds support for the on SoC RTC driver on the AMLogic Meson devices. The device-tree updates are not included as they depend on the reset-controller support in -next.
The series does not have any build dependencies, but does require the reset controller and device-tree entries for the device-tree files for the relevant boards.
The series tested by myself on the ODroid-C1 board with a battery pack attached. It has also been tested by Kevin Hilman.
I will send the DT changes in a second series so that they can be merged once the dependencies have been satisified.
Changes since V3:
<[email protected]>
- Added Kevin's tested byChanges since V1:
<[email protected]>- Fixed checkpatch and sparse errors
- Fixed minor locking bug when writing static-control register
- Updated the code ordering in thertc-meson.cdriver
- Fixed alphanumeric ordering in on-cpu rtc block
- Added Rob Hering's ack for the DT binding documentation
- Added better description to the RTC driver header.Ben Dooks (2):
rtc: support for amlogic meson rtc
meson-rtc: add device-tree binding.../devicetree/bindings/rtc/rtc-amlogic.txt | 21 ++ drivers/rtc/Kconfig | 9 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-meson.c | 349 +++++++++++++++++++++ 4 files changed, 380 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-amlogic.txt create mode 100644 drivers/rtc/rtc-meson.cSignature · 1 line
2.8.1
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com