Back to home page

OSCL-LXR

 
 

    


0001 * Maxim/Dallas Semiconductor DS-1302 RTC
0002 
0003 Simple device which could be used to store date/time between reboots.
0004 
0005 The device uses the standard MicroWire half-duplex transfer timing.
0006 Master output is set on low clock and sensed by the RTC on the rising
0007 edge. Master input is set by the RTC on the trailing edge and is sensed
0008 by the master on low clock.
0009 
0010 Required properties:
0011 
0012 - compatible : Should be "maxim,ds1302"
0013 
0014 Required SPI properties:
0015 
0016 - reg : Should be address of the device chip select within
0017   the controller.
0018 
0019 - spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
0020   and 2MHz if powered at 5V.
0021 
0022 - spi-3wire : The device has a shared signal IN/OUT line.
0023 
0024 - spi-lsb-first : DS-1302 requires least significant bit first
0025   transfers.
0026 
0027 - spi-cs-high: DS-1302 has active high chip select line. This is
0028   required unless inverted in hardware.
0029 
0030 Example:
0031 
0032 spi@901c {
0033         #address-cells = <1>;
0034         #size-cells = <0>;
0035         compatible = "icpdas,lp8841-spi-rtc";
0036         reg = <0x901c 0x1>;
0037 
0038         rtc@0 {
0039                 compatible = "maxim,ds1302";
0040                 reg = <0>;
0041                 spi-max-frequency = <500000>;
0042                 spi-3wire;
0043                 spi-lsb-first;
0044                 spi-cs-high;
0045         };
0046 };