Skip to contentSkip to conversation

ARM: dts: qcom: pm8226: add node for RTC

PATCH Superseded Jack Matthews 2 participants 4 messages Feb 9, 2022 – Mar 30, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: qcom: pm8226: add node for RTC

Add a node for PM8226's real time clock.

---
 arch/arm/boot/dts/qcom-pm8226.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/qcom-pm8226.dtsi +7 -0
index 04d070d98f97..ecc38ab1dc4b 100644
@@ -17,6 +17,13 @@ pwrkey@800 {
 			bias-pull-up;
 		};
 
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>, <0x6100>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+		};
+
 		smbb: charger@1000 {
 			compatible = "qcom,pm8226-charger";
 			reg = <0x1000>;
Signature · 1 line
2.25.1
#1 lore raw

Hi Jack,

Quoted 13 lines · On Mittwoch, 9. Februar 2022 06:29:28 CET Jack Matthews wrote:

Add a node for PM8226's real time clock.

---
 arch/arm/boot/dts/qcom-pm8226.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/qcom-pm8226.dtsi index 04d070d98f97..ecc38ab1dc4b 100644

arch/arm/boot/dts/qcom-pm8226.dtsi pwrkey@800 { · line 20

Quoted 4 lines
arch/arm/boot/dts/qcom-pm8226.dtsi +1 -0
@@ -17,6 +17,13 @@ pwrkey@800 {
 			bias-pull-up;
 		};
 
+		rtc@6000 {

Please keep the nodes sorted by address, so don't put @6000 between @800 and @1000 please ;)

Regards
Luca

arch/arm/boot/dts/qcom-pm8226.dtsi pwrkey@800 {

Quoted 4 lines
arch/arm/boot/dts/qcom-pm8226.dtsi +4 -0
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>, <0x6100>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 

IRQ_TYPE_EDGE_RISING>;

Quoted 5 lines
arch/arm/boot/dts/qcom-pm8226.dtsi +2 -0
+		};
+
 		smbb: charger@1000 {
 			compatible = "qcom,pm8226-charger";
 			reg = <0x1000>;
#2 lore raw

PATCH v2 1/1 ARM: dts: qcom: pm8226: add node for RTC

In reply to Jack Matthews

Add a node for PM8226's real time clock.

---
 arch/arm/boot/dts/qcom-pm8226.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/qcom-pm8226.dtsi +7 -0
index 872724490a5d..8ee628ce88a9 100644
@@ -73,6 +73,13 @@ adc-chan@f {
 			};
 		};
 
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>, <0x6100>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+		};
+
 		pm8226_mpps: mpps@a000 {
 			compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
 			reg = <0xa000>;
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#3 lore raw
Quoted 3 lines · On Mittwoch, 9. Februar 2022 17:57:41 CEST Jack Matthews wrote:

Add a node for PM8226's real time clock.

Also on lg-lenok at least "allow-set-time;" seems to allow writing to the RTC. As I'm quite unsure of the reasoning of it normally being read-only and the implementation details behind what might restrict this I don't think we can safely add this to all pm8226.

Regards
Luca

Quoted 10 lines
---
 arch/arm/boot/dts/qcom-pm8226.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/qcom-pm8226.dtsi index 872724490a5d..8ee628ce88a9 100644

arch/arm/boot/dts/qcom-pm8226.dtsi adc-chan@f { · line 80

Quoted 8 lines
arch/arm/boot/dts/qcom-pm8226.dtsi +5 -0
@@ -73,6 +73,13 @@ adc-chan@f {
 			};
 		};
 
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>, <0x6100>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 

IRQ_TYPE_EDGE_RISING>;

arch/arm/boot/dts/qcom-pm8226.dtsi adc-chan@f {

Quoted 4 lines
arch/arm/boot/dts/qcom-pm8226.dtsi +2 -0
+		};
+
 		pm8226_mpps: mpps@a000 {
 			compatible = "qcom,pm8226-mpp", "qcom,spmi-

mpp";

Quoted 1 line
arch/arm/boot/dts/qcom-pm8226.dtsi +0 -0
 			reg = <0xa000>;