arm64: dts: qcom: pm8450a: add rtc node
PATCH v2 1/3 arm64: dts: qcom: pm8450a: add rtc node
Add the rtc block on pm8450a first pmic to enable the rtc for sa8540p-ride.
--- arch/arm64/boot/dts/qcom/pm8450a.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/qcom/pm8450a.dtsi +8 -0
@@ -13,6 +13,14 @@ pm8450a: pmic@0 { #address-cells = <1>; #size-cells = <0>; + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + wakeup-source; + }; + pm8450a_gpios: gpio@c000 { compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
Signature · 1 line
2.38.1
PATCH v2 2/3 arm64: dts: qcom: sa8295p-adp: use pm8450a dtsi
Include the dtsi to use a single pmic descriptions.
Both sa8295p-adp and sa8540p-adp have the same spmi pmic apparently.
--- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 79 +----------------------- 1 file changed, 1 insertion(+), 78 deletions(-)
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +1 -78
@@ -11,6 +11,7 @@ #include <dt-bindings/spmi/spmi.h> #include "sa8540p.dtsi" +#include "pm8450a.dtsi" / { model = "Qualcomm SA8295P ADP";
@@ -260,84 +261,6 @@ &remoteproc_nsp1 { status = "okay"; }; -&spmi_bus { - pm8450a: pmic@0 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - rtc@6000 { - compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; - reg-names = "rtc", "alarm"; - interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - wakeup-source; - }; - - pm8450a_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450a_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450c: pmic@4 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x4 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450c_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450c_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450e: pmic@8 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x8 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450e_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450e_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450g: pmic@c { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0xc SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450g_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450g_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; -}; - &ufs_mem_hc { reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.38.1
Re: [PATCH v2 2/3] arm64: dts: qcom: sa8295p-adp: use pm8450a dtsi
Quoted 13 lines · Eric Chanudet
Include the dtsi to use a single pmic descriptions.
Both sa8295p-adp and sa8540p-adp have the same spmi pmic apparently.Signed-off-by Eric Chanudet <[email protected]>--- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 79 +----------------------- 1 file changed, 1 insertion(+), 78 deletions(-)arch/arm64/boot/dts/qcom/sa8295p-adp.dts +0
-0
arch/arm64/boot/dts/qcom/sa8295p-adp.dts line 14
Quoted 4 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +1
-0@@ -11,6 +11,7 @@ #include <dt-bindings/spmi/spmi.h> #include "sa8540p.dtsi" +#include "pm8450a.dtsi"
I feel like naming it sa8540p-pmics.dtsi (like sc8280xp-pmics.dtsi) would be more representative of what's really going on (unless it's a single chip providing 4 virtual PMICs on different SIDs).
Konrad
Quoted 88 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +0
-78/ { model = "Qualcomm SA8295P ADP";@@ -260,84 +261,6 @@ &remoteproc_nsp1 { status = "okay"; }; -&spmi_bus { - pm8450a: pmic@0 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - rtc@6000 { - compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; - reg-names = "rtc", "alarm"; - interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - wakeup-source; - }; - - pm8450a_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450a_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450c: pmic@4 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x4 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450c_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450c_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450e: pmic@8 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x8 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450e_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450e_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pm8450g: pmic@c { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0xc SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8450g_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8450g_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; -}; - &ufs_mem_hc { reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
Re: [PATCH v2 2/3] arm64: dts: qcom: sa8295p-adp: use pm8450a dtsi
Quoted 16 lines · Konrad Dybcio
Quoted 15 lines · Eric Chanudet
Include the dtsi to use a single pmic descriptions.
Both sa8295p-adp and sa8540p-adp have the same spmi pmic apparently.Signed-off-by Eric Chanudet <[email protected]>--- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 79 +----------------------- 1 file changed, 1 insertion(+), 78 deletions(-)arch/arm64/boot/dts/qcom/sa8295p-adp.dts +0
-0@@ -11,6 +11,7 @@ #include <dt-bindings/spmi/spmi.h>
Quoted 5 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts line 14
Quoted 2 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +1
-0#include "sa8540p.dtsi" +#include "pm8450a.dtsi"I feel like naming it
sa8540p-pmics.dtsi(likesc8280xp-pmics.dtsi) would be more representative of what's really going on (unless it's a single chip providing 4 virtual PMICs on different SIDs).
I can make a v3 renaming this. The initial commit from Parikshit mentions it is to be re-used on sa8540 based boards.
Side note: A quick look also shows pm8450.dtsi[1] is not included by any of its intended targets (sm8350 and sm8450 IIUC). Was this lost?
Thanks,
[1] https://lore.kernel.org/r/[email protected]
Signature · 1 line
Eric Chanudet
Re: [PATCH v2 2/3] arm64: dts: qcom: sa8295p-adp: use pm8450a dtsi
Quoted 23 lines · Eric Chanudet
Quoted 16 lines · Konrad Dybcio
Quoted 15 lines · Eric Chanudet
Include the dtsi to use a single pmic descriptions.
Both sa8295p-adp and sa8540p-adp have the same spmi pmic apparently.Signed-off-by Eric Chanudet <[email protected]>--- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 79 +----------------------- 1 file changed, 1 insertion(+), 78 deletions(-)arch/arm64/boot/dts/qcom/sa8295p-adp.dts +0
-0@@ -11,6 +11,7 @@ #include <dt-bindings/spmi/spmi.h>Quoted 5 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts line 14
Quoted 2 lines
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +1
-0#include "sa8540p.dtsi" +#include "pm8450a.dtsi"I feel like naming it
sa8540p-pmics.dtsi(likesc8280xp-pmics.dtsi) would be more representative of what's really going on (unless it's a single chip providing 4 virtual PMICs on different SIDs).
Quoted 5 lines
I can make a v3 renaming this. The initial commit from Parikshit mentions it is to be re-used on sa8540 based boards.
Side note: A quick look also shows pm8450.dtsi[1] is not included by any of its intended targets (sm8350 and sm8450 IIUC). Was this lost?
sm8450 only. They were not included, as SPMI was not enabled on sm8450. They will be included in 6.3 once that's merged.
Konrad
Quoted 5 lines
Thanks,
PATCH v2 3/3 arm64: dts: qcom: pm8941-rtc add alarm register
In reply to Eric ChanudetA few descriptions including a qcom,pm8941-rtc describe two reg-names for the "rtc" and "alarm" register banks, but only one offset. For consistency with reg-names, add the "alarm" register offset. No functional change is expected from this.
--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8916.dtsi | 3 ++- arch/arm64/boot/dts/qcom/pm8950.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmm8155au_1.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmp8074.dtsi | 2 +- arch/arm64/boot/dts/qcom/pms405.dtsi | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/pm8150.dtsi +1 -1
@@ -121,7 +121,7 @@ pm8150_adc_tm: adc-tm@3500 { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };
arch/arm64/boot/dts/qcom/pm8916.dtsi +2 -1
@@ -93,7 +93,8 @@ adc-chan@f { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; };
arch/arm64/boot/dts/qcom/pm8950.dtsi +1 -1
@@ -126,7 +126,7 @@ xo-therm-buf@3c { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };
arch/arm64/boot/dts/qcom/pmm8155au_1.dtsi +1 -1
@@ -108,7 +108,7 @@ pmm8155au_1_adc_tm: adc-tm@3500 { pmm8155au_1_rtc: rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
arch/arm64/boot/dts/qcom/pmp8074.dtsi +1 -1
@@ -74,7 +74,7 @@ vph-pwr@131 { pmp8074_rtc: rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; allow-set-time;
arch/arm64/boot/dts/qcom/pms405.dtsi +1 -1
@@ -125,7 +125,7 @@ xo_therm: xo_temp@76 { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };
Signature · 1 line
2.38.1
Re: [PATCH v2 3/3] arm64: dts: qcom: pm8941-rtc add alarm register
Quoted 7 lines · Eric Chanudet
A few descriptions including a qcom,pm8941-rtc describe two reg-names for the "rtc" and "alarm" register banks, but only one offset. For consistency with reg-names, add the "alarm" register offset. No functional change is expected from this.
Signed-off-by Eric Chanudet <[email protected]>---
Konrad
Quoted 87 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8916.dtsi | 3 ++- arch/arm64/boot/dts/qcom/pm8950.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmm8155au_1.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmp8074.dtsi | 2 +- arch/arm64/boot/dts/qcom/pms405.dtsi | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-)arch/arm64/boot/dts/qcom/pm8150.dtsi +1
-1@@ -121,7 +121,7 @@ pm8150_adc_tm: adc-tm@3500 { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };arch/arm64/boot/dts/qcom/pm8916.dtsi +2
-1@@ -93,7 +93,8 @@ adc-chan@f { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; };arch/arm64/boot/dts/qcom/pm8950.dtsi +1
-1@@ -126,7 +126,7 @@ xo-therm-buf@3c { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };arch/arm64/boot/dts/qcom/pmm8155au_1.dtsi +1
-1@@ -108,7 +108,7 @@ pmm8155au_1_adc_tm: adc-tm@3500 { pmm8155au_1_rtc: rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;arch/arm64/boot/dts/qcom/pmp8074.dtsi +1
-1@@ -74,7 +74,7 @@ vph-pwr@131 { pmp8074_rtc: rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; allow-set-time;arch/arm64/boot/dts/qcom/pms405.dtsi +1
-1@@ -125,7 +125,7 @@ xo_therm: xo_temp@76 { rtc@6000 { compatible = "qcom,pm8941-rtc"; - reg = <0x6000>; + reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; };
Quoted 5 lines · Eric Chanudet
Add the rtc block on pm8450a first pmic to enable the rtc for sa8540p-ride.
Signed-off-by Eric Chanudet <[email protected]>---
Konrad
Quoted 22 lines
arch/arm64/boot/dts/qcom/pm8450a.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm64/boot/dts/qcom/pm8450a.dtsi +8
-0@@ -13,6 +13,14 @@ pm8450a: pmic@0 { #address-cells = <1>; #size-cells = <0>; + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + wakeup-source; + }; + pm8450a_gpios: gpio@c000 { compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;