Commit d25a5ed3 authored by Sergey Yanovich's avatar Sergey Yanovich Committed by Alexandre Belloni

rtc: ds1302: rewrite using SPI

DS1302 is an half-duplex SPI device. The driver respects this fact now.
Pin configurations should be implemented using SPI subsystem.
Signed-off-by: default avatarSergei Ianovich <ynvich@gmail.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 2dcd0af5
* Maxim/Dallas Semiconductor DS-1302 RTC
Simple device which could be used to store date/time between reboots.
The device uses the standard MicroWire half-duplex transfer timing.
Master output is set on low clock and sensed by the RTC on the rising
edge. Master input is set by the RTC on the trailing edge and is sensed
by the master on low clock.
Required properties:
- compatible : Should be "maxim,ds1302"
Required SPI properties:
- reg : Should be address of the device chip select within
the controller.
- spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
and 2MHz if powered at 5V.
- spi-3wire : The device has a shared signal IN/OUT line.
- spi-lsb-first : DS-1302 requires least significant bit first
transfers.
- spi-cs-high: DS-1302 has active high chip select line. This is
required unless inverted in hardware.
Example:
spi@901c {
#address-cells = <1>;
#size-cells = <0>;
compatible = "icpdas,lp8841-spi-rtc";
reg = <0x901c 0x1>;
rtc@0 {
compatible = "maxim,ds1302";
reg = <0>;
spi-max-frequency = <500000>;
spi-3wire;
spi-lsb-first;
spi-cs-high;
};
};
......@@ -634,6 +634,15 @@ config RTC_DRV_M41T94
This driver can also be built as a module. If so, the module
will be called rtc-m41t94.
config RTC_DRV_DS1302
tristate "Dallas/Maxim DS1302"
depends on SPI
help
If you say yes here you get support for the Dallas DS1302 RTC chips.
This driver can also be built as a module. If so, the module
will be called rtc-ds1302.
config RTC_DRV_DS1305
tristate "Dallas/Maxim DS1305/DS1306"
help
......@@ -834,12 +843,6 @@ config RTC_DRV_DS1286
help
If you say yes here you get support for the Dallas DS1286 RTC chips.
config RTC_DRV_DS1302
tristate "Dallas DS1302"
depends on SH_SECUREEDGE5410
help
If you say yes here you get support for the Dallas DS1302 RTC chips.
config RTC_DRV_DS1511
tristate "Dallas DS1511"
depends on HAS_IOMEM
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment