1*4882a593Smuzhiyun* ICP DAS LP-8841 SPI Controller for RTC 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO 4*4882a593Smuzhiyunmemory register, which acts as an SPI master device. 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThe device uses the standard MicroWire half-duplex transfer timing. 7*4882a593SmuzhiyunMaster output is set on low clock and sensed by the RTC on the rising 8*4882a593Smuzhiyunedge. Master input is set by the RTC on the trailing edge and is sensed 9*4882a593Smuzhiyunby the master on low clock. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunRequired properties: 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun- #address-cells: should be 1 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun- #size-cells: should be 0 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun- compatible: should be "icpdas,lp8841-spi-rtc" 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun- reg: should provide IO memory address 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunRequirements to SPI slave nodes: 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun- There can be only one slave device. 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun- The spi slave node should claim the following flags which are 26*4882a593Smuzhiyun required by the spi controller. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun - spi-3wire: The master itself has only 3 wire. It cannor work in 29*4882a593Smuzhiyun full duplex mode. 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun - spi-cs-high: DS-1302 has active high chip select line. The master 32*4882a593Smuzhiyun doesn't support active low. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun - spi-lsb-first: DS-1302 requires least significant bit first 35*4882a593Smuzhiyun transfers. The master only support this type of bit ordering. 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunExample: 39*4882a593Smuzhiyun 40*4882a593Smuzhiyunspi@901c { 41*4882a593Smuzhiyun #address-cells = <1>; 42*4882a593Smuzhiyun #size-cells = <0>; 43*4882a593Smuzhiyun compatible = "icpdas,lp8841-spi-rtc"; 44*4882a593Smuzhiyun reg = <0x901c 0x1>; 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun rtc@0 { 47*4882a593Smuzhiyun compatible = "maxim,ds1302"; 48*4882a593Smuzhiyun reg = <0>; 49*4882a593Smuzhiyun spi-max-frequency = <500000>; 50*4882a593Smuzhiyun spi-3wire; 51*4882a593Smuzhiyun spi-lsb-first; 52*4882a593Smuzhiyun spi-cs-high; 53*4882a593Smuzhiyun }; 54*4882a593Smuzhiyun}; 55