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