summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@kymetacorp.com>2016-05-19 23:39:32 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-30 07:12:19 +0200
commit24fcf5fceec8a3af9fab21f2ba702da08ba7c430 (patch)
treeb83db8ef00cb564dc26e720fd11ae725212c9de5 /Documentation/devicetree
parent61ddbd35207af8dbd9b1a0c17619148179235203 (diff)
downloadbarebox-24fcf5fceec8a3af9fab21f2ba702da08ba7c430.tar.gz
barebox-24fcf5fceec8a3af9fab21f2ba702da08ba7c430.tar.xz
rtc: ds1307: Add support for configuring external clock pin
The DS1307 has a square wave output pin, which can be used to output a clock signal from the DS1307. Additionally, the DS1308 supports configuring this pin as an input from an external clock source to which it should sync itself. Add support with OF device tree properties to configure these settings. Supported features are using the clock pin as an output, an input, the rate of the pin, and if it should be enabled on battery backup power. The driver does not check that the selected features are supported by the clock chip being used. It is the designer's responsibility to create a valid device tree node; the bootloader does not attempt to be a device tree validator. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/bindings/rtc/dallas,ds1307.rst33
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/rtc/dallas,ds1307.rst b/Documentation/devicetree/bindings/rtc/dallas,ds1307.rst
new file mode 100644
index 0000000000..602f74b4dc
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/dallas,ds1307.rst
@@ -0,0 +1,33 @@
+Dallas DS1307 I2C Serial Real-Time Clock
+========================================
+
+Required properties:
+* ``compatible``: ``dallas,ds1307``, ``dallas,ds1308``, ``dallas,ds1338``
+ "maxim" can be used in place of "dallas"
+
+* ``reg``: I2C address for chip
+
+Optional properties:
+* ``ext-clock-input``: Enable external clock input pin
+* ``ext-clock-output``: Enable square wave output. The above two
+ properties are mutually exclusive
+* ``ext-clock-bb``: Enable external clock on battery power
+* ``ext-clock-rate``: Expected/Generated rate on external clock pin
+ in Hz. Allowable values are 1, 50, 60, 4096, 8192, and 32768 Hz.
+ Not all values are valid for all configurations.
+
+The default is ext-clock-input, ext-clock-output, and ext-clock-bb
+disabled and ext-clock-rate of 1 Hz.
+
+Example::
+ ds1307: rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+ };
+
+ ds1308: rtc@68 {
+ compatible = "maxim,ds1308";
+ reg = <0x68>;
+ ext-clock-output;
+ ext-clock-rate = <32768>;
+ };