Back to home page

OSCL-LXR

 
 

    


0001 * ICP DAS LP-8841 SPI Controller for RTC
0002 
0003 ICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO
0004 memory register, which acts as an SPI master device.
0005 
0006 The device uses the standard MicroWire half-duplex transfer timing.
0007 Master output is set on low clock and sensed by the RTC on the rising
0008 edge. Master input is set by the RTC on the trailing edge and is sensed
0009 by the master on low clock.
0010 
0011 Required properties:
0012 
0013 - #address-cells: should be 1
0014 
0015 - #size-cells: should be 0
0016 
0017 - compatible: should be "icpdas,lp8841-spi-rtc"
0018 
0019 - reg: should provide IO memory address
0020 
0021 Requirements to SPI slave nodes:
0022 
0023 - There can be only one slave device.
0024 
0025 - The spi slave node should claim the following flags which are
0026   required by the spi controller.
0027 
0028   - spi-3wire: The master itself has only 3 wire. It cannor work in
0029     full duplex mode.
0030 
0031   - spi-cs-high: DS-1302 has active high chip select line. The master
0032     doesn't support active low.
0033 
0034   - spi-lsb-first: DS-1302 requires least significant bit first
0035     transfers. The master only support this type of bit ordering.
0036 
0037 
0038 Example:
0039 
0040 spi@901c {
0041         #address-cells = <1>;
0042         #size-cells = <0>;
0043         compatible = "icpdas,lp8841-spi-rtc";
0044         reg = <0x901c 0x1>;
0045 
0046         rtc@0 {
0047                 compatible = "maxim,ds1302";
0048                 reg = <0>;
0049                 spi-max-frequency = <500000>;
0050                 spi-3wire;
0051                 spi-lsb-first;
0052                 spi-cs-high;
0053         };
0054 };