Skip to content

Commit 430aa33

Browse files
jhovoldalexandrebelloni
authored andcommitted
dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset
On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. Add an 'offset' nvmem cell which can be used to store a 32-bit offset from the Unix epoch so that the RTC time can be updated on such platforms. Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: David Collins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent c978414 commit 430aa33

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ properties:
4040
description:
4141
Indicates that the setting of RTC time is allowed by the host CPU.
4242

43+
nvmem-cells:
44+
items:
45+
- description:
46+
four-byte nvmem cell holding a little-endian offset from the Unix
47+
epoch representing the time when the RTC timer was last reset
48+
49+
nvmem-cell-names:
50+
items:
51+
- const: offset
52+
4353
wakeup-source: true
4454

4555
required:
@@ -69,6 +79,8 @@ examples:
6979
compatible = "qcom,pm8921-rtc";
7080
reg = <0x11d>;
7181
interrupts = <0x27 0>;
82+
nvmem-cells = <&rtc_offset>;
83+
nvmem-cell-names = "offset";
7284
};
7385
};
7486
};

0 commit comments

Comments
 (0)