0001 Intersil ISL12057 I2C RTC/Alarm chip
0002
0003 ISL12057 is a trivial I2C device (it has simple device tree bindings,
0004 consisting of a compatible field, an address and possibly an interrupt
0005 line).
0006
0007 Nonetheless, it also supports an option boolean property
0008 ("wakeup-source") to handle the specific use-case found
0009 on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104
0010 and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip
0011 (associated with the alarm supported by the driver) is not connected
0012 to the SoC but to a PMIC. It allows the device to be powered up when
0013 RTC alarm rings. In order to mark the device has a wakeup source and
0014 get access to the 'wakealarm' sysfs entry, this specific property can
0015 be set when the IRQ#2 pin of the chip is not connected to the SoC but
0016 can wake up the device.
0017
0018 Required properties supported by the device:
0019
0020 - "compatible": must be "isil,isl12057"
0021 - "reg": I2C bus address of the device
0022
0023 Optional properties:
0024
0025 - "wakeup-source": mark the chip as a wakeup source, independently of
0026 the availability of an IRQ line connected to the SoC.
0027
0028
0029 Example isl12057 node without IRQ#2 pin connected (no alarm support):
0030
0031 isl12057: isl12057@68 {
0032 compatible = "isil,isl12057";
0033 reg = <0x68>;
0034 };
0035
0036
0037 Example isl12057 node with IRQ#2 pin connected to main SoC via MPP6 (note
0038 that the pinctrl-related properties below are given for completeness and
0039 may not be required or may be different depending on your system or
0040 SoC, and the main function of the MPP used as IRQ line, i.e.
0041 "interrupt-parent" and "interrupts" are usually sufficient):
0042
0043 pinctrl {
0044 ...
0045
0046 rtc_alarm_pin: rtc_alarm_pin {
0047 marvell,pins = "mpp6";
0048 marvell,function = "gpio";
0049 };
0050
0051 ...
0052
0053 };
0054
0055 ...
0056
0057 isl12057: isl12057@68 {
0058 compatible = "isil,isl12057";
0059 reg = <0x68>;
0060 pinctrl-0 = <&rtc_alarm_pin>;
0061 pinctrl-names = "default";
0062 interrupt-parent = <&gpio0>;
0063 interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
0064 };
0065
0066
0067 Example isl12057 node without IRQ#2 pin connected to the SoC but to a
0068 PMIC, allowing the device to be started based on configured alarm:
0069
0070 isl12057: isl12057@68 {
0071 compatible = "isil,isl12057";
0072 reg = <0x68>;
0073 wakeup-source;
0074 };