Skip to contentSkip to conversation

Add support for hym8563 rtcs

PATCH In review Heiko Stübner 2 participants 4 messages Dec 9, 2013 – Dec 10, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Add support for hym8563 rtcs

This series adds support for the Haoyu Microelectronics HYM8563 rtc. This chip is often used in designs around the Cortex-A9 SoCs from Rockchip to provide rtc functionality and the 32kHz suspend clock the SoC needs.

changes since v3:
- follow suggestion from Mark Brown to use the interrupt without the gpio changes since v2:
- get size for devm_kzalloc from struct not from pointer changes since v1:
- add haoyu prefix to vendor-prefixes.txt
- use gpio_to_irq to get the alarm interrupt instead of specifying it separately to the gpio itself

Heiko Stuebner (2):
dt-bindings: add hym8563 binding
rtc: add hym8563 rtc-driver

 .../devicetree/bindings/rtc/haoyu,hym8563.txt      |   27 +
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 drivers/rtc/Kconfig                                |   11 +
 drivers/rtc/Makefile                               |    1 +
 drivers/rtc/rtc-hym8563.c                          |  601 ++++++++++++++++++++
 5 files changed, 641 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
 create mode 100644 drivers/rtc/rtc-hym8563.c
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v4 1/2 dt-bindings: add hym8563 binding

Add binding documentation for the hym8563 rtc chip.

---
 .../devicetree/bindings/rtc/haoyu,hym8563.txt      |   27 ++++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 2 files changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt new file +27 -0
new file mode 100644
index 0000000..31406fd
@@ -0,0 +1,27 @@
+Haoyu Microelectronics HYM8563 Real Time Clock
+
+The HYM8563 provides basic rtc and alarm functionality
+as well as a clock output of up to 32kHz.
+
+Required properties:
+- compatible: should be: "haoyu,hym8563"
+- reg: i2c address
+- interrupts: rtc alarm/event interrupt
+- #clock-cells: the value should be 0
+
+Example:
+
+hym8563: hym8563@51 {
+	compatible = "haoyu,hym8563";
+	reg = <0x51>;
+
+	interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+	#clock-cells = <0>;
+};
+
+device {
+...
+	clocks = <&hym8563>;
+...
+};
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index edbb8d8..bb86195 100644
@@ -33,6 +33,7 @@ fsl	Freescale Semiconductor
 GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gmt	Global Mixed-mode Technology, Inc.
+haoyu	Haoyu Microelectronic Co. Ltd.
 hisilicon	Hisilicon Limited.
 hp	Hewlett Packard
 ibm	International Business Machines (IBM)
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v4 2/2 rtc: add hym8563 rtc-driver

In reply to Heiko Stübner

The Haoyu Microelectronics HYM8563 provides rtc- and alarm functions as well as a clock output of up to 32kHz.

---
 drivers/rtc/Kconfig       |   11 +
 drivers/rtc/Makefile      |    1 +
 drivers/rtc/rtc-hym8563.c |  601 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 613 insertions(+)
 create mode 100644 drivers/rtc/rtc-hym8563.c
drivers/rtc/Kconfig +11 -0
index 0077302..4bd489c 100644
@@ -212,6 +212,17 @@ config RTC_DRV_DS3232
 	  This driver can also be built as a module.  If so, the module
 	  will be called rtc-ds3232.
 
+config RTC_DRV_HYM8563
+	tristate "Haoyu Microelectronics HYM8563"
+	depends on I2C && OF
+	help
+	  Say Y to enable support for the HYM8563 I2C RTC chip. Apart
+	  from the usual rtc functions it provides a clock output of
+	  up to 32kHz.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-hym8563.
+
 config RTC_DRV_LP8788
 	tristate "TI LP8788 RTC driver"
 	depends on MFD_LP8788
drivers/rtc/Makefile +1 -0
index 27b4bd8..913c5be 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_RTC_DRV_EP93XX)	+= rtc-ep93xx.o
 obj-$(CONFIG_RTC_DRV_FM3130)	+= rtc-fm3130.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
 obj-$(CONFIG_RTC_DRV_HID_SENSOR_TIME) += rtc-hid-sensor-time.o
+obj-$(CONFIG_RTC_DRV_HYM8563)	+= rtc-hym8563.o
 obj-$(CONFIG_RTC_DRV_IMXDI)	+= rtc-imxdi.o
 obj-$(CONFIG_RTC_DRV_ISL1208)	+= rtc-isl1208.o
 obj-$(CONFIG_RTC_DRV_ISL12022)	+= rtc-isl12022.o
drivers/rtc/rtc-hym8563.c new file +601 -0

601 lines not on this page · raw message

Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html