162306a36Sopenharmony_ci* ICP DAS LP-8841 SPI Controller for RTC
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO
462306a36Sopenharmony_cimemory register, which acts as an SPI master device.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciThe device uses the standard MicroWire half-duplex transfer timing.
762306a36Sopenharmony_ciMaster output is set on low clock and sensed by the RTC on the rising
862306a36Sopenharmony_ciedge. Master input is set by the RTC on the trailing edge and is sensed
962306a36Sopenharmony_ciby the master on low clock.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciRequired properties:
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci- #address-cells: should be 1
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci- #size-cells: should be 0
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci- compatible: should be "icpdas,lp8841-spi-rtc"
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci- reg: should provide IO memory address
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciRequirements to SPI slave nodes:
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci- There can be only one slave device.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci- The spi slave node should claim the following flags which are
2662306a36Sopenharmony_ci  required by the spi controller.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  - spi-3wire: The master itself has only 3 wire. It cannor work in
2962306a36Sopenharmony_ci    full duplex mode.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci  - spi-cs-high: DS-1302 has active high chip select line. The master
3262306a36Sopenharmony_ci    doesn't support active low.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci  - spi-lsb-first: DS-1302 requires least significant bit first
3562306a36Sopenharmony_ci    transfers. The master only support this type of bit ordering.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciExample:
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_cispi@901c {
4162306a36Sopenharmony_ci	#address-cells = <1>;
4262306a36Sopenharmony_ci	#size-cells = <0>;
4362306a36Sopenharmony_ci	compatible = "icpdas,lp8841-spi-rtc";
4462306a36Sopenharmony_ci	reg = <0x901c 0x1>;
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci	rtc@0 {
4762306a36Sopenharmony_ci		compatible = "maxim,ds1302";
4862306a36Sopenharmony_ci		reg = <0>;
4962306a36Sopenharmony_ci		spi-max-frequency = <500000>;
5062306a36Sopenharmony_ci		spi-3wire;
5162306a36Sopenharmony_ci		spi-lsb-first;
5262306a36Sopenharmony_ci		spi-cs-high;
5362306a36Sopenharmony_ci	};
5462306a36Sopenharmony_ci};
55