arm64: dts: qcom: pm8009: Add base dts file
PATCH 1/7 arm64: dts: qcom: pm8009: Add base dts file
Add base DTS file for pm8009 along with GPIOs and power-on nodes.
--- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited + */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h> + +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};
Signature · 1 line
2.26.2
PATCH 2/7 arm64: dts: qcom: sm8250: change spmi node label
PMIC dtsi files (pm8150*.dtsi) expect to have spmi_bus label, rather than just spmi. Rename spmi label accordingly.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -991,7 +991,7 @@ pdc: interrupt-controller@b220000 { interrupt-controller; }; - spmi: qcom,spmi@c440000 { + spmi_bus: qcom,spmi@c440000 { compatible = "qcom,spmi-pmic-arb"; reg = <0x0 0x0c440000 0x0 0x0001100>, <0x0 0x0c600000 0x0 0x2000000>,
Signature · 1 line
2.26.2
Re: [PATCH 2/7] arm64: dts: qcom: sm8250: change spmi node label
Quoted 4 lines · Dmitry Baryshkov
PMIC dtsi files (pm8150*.dtsi) expect to have
spmi_buslabel, rather than just spmi. Rename spmi label accordingly.Signed-off-by Dmitry Baryshkov <[email protected]>
Thanks,
Mani
Quoted 20 lines
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sm8250.dtsi +1
-1@@ -991,7 +991,7 @@ pdc: interrupt-controller@b220000 { interrupt-controller; }; - spmi: qcom,spmi@c440000 { + spmi_bus: qcom,spmi@c440000 { compatible = "qcom,spmi-pmic-arb"; reg = <0x0 0x0c440000 0x0 0x0001100>, <0x0 0x0c600000 0x0 0x2000000>,Signature · 1 line
2.26.2
PATCH 3/7 arm64: dts: qcom: sm8250-mtp: include pmic files
In reply to Dmitry BaryshkovInclude files describing used PMIC chips, GPIOs, power on, etc nodes.
--- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-mtp.dts +4 -0
@@ -7,6 +7,10 @@ #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "sm8250.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" +#include "pm8009.dtsi" / { model = "Qualcomm Technologies, Inc. SM8250 MTP";
Signature · 1 line
2.26.2
PATCH 4/7 arm64: dts: qcom: sm8x50: add empty thermal zone nodes
In reply to Dmitry BaryshkovAdd empty thermal_zone nodes. They will be populated by PMIC dtsi files, describing thermal sensors and trip points for zones handled by PMICs.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 3 +++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 3 +++ 2 files changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -0
@@ -857,6 +857,9 @@ cpufreq_hw: cpufreq@18323000 { }; }; + thermal_zones: thermal-zones { + }; + timer { compatible = "arm,armv8-timer"; interrupts = <GIC_PPI 1 IRQ_TYPE_LEVEL_LOW>,
arch/arm64/boot/dts/qcom/sm8250.dtsi +3 -0
@@ -1736,6 +1736,9 @@ cpufreq_hw: cpufreq@18591000 { }; }; + thermal_zones: thermal-zones { + }; + timer { compatible = "arm,armv8-timer"; interrupts = <GIC_PPI 13
Signature · 1 line
2.26.2
Re: [PATCH 4/7] arm64: dts: qcom: sm8x50: add empty thermal zone nodes
Quoted 3 lines · Dmitry Baryshkov
Add empty
thermal_zonenodes. They will be populated by PMIC dtsi files, describing thermal sensors and trip points for zones handled by PMICs.
This is unnecessary. I've already started preparing patches that add the thermal zones for the two socs.
Quoted 37 lines
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 3 +++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 3 +++ 2 files changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8150.dtsi +3
-0@@ -857,6 +857,9 @@ cpufreq_hw: cpufreq@18323000 { }; }; + thermal_zones: thermal-zones { + }; + timer { compatible = "arm,armv8-timer"; interrupts = <GIC_PPI 1 IRQ_TYPE_LEVEL_LOW>,arch/arm64/boot/dts/qcom/sm8250.dtsi +3
-1@@ -1736,6 +1736,9 @@ cpufreq_hw: cpufreq@18591000 { }; }; + thermal_zones: thermal-zones { + }; + timer { compatible = "arm,armv8-timer"; interrupts = <GIC_PPI 13 --2.26.2
PATCH 5/7 arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
In reply to Dmitry BaryshkovAdd temperature alarm and thermal zone configuration to all three pm8150 instances. Configuration is largely based on the msm-4.19 tree. These alarms use main adc of the pmic. Separate temperature adc is not supported yet.
--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 +++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 43 +++++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 43 +++++++++++++++++++++++++-- 3 files changed, 119 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/qcom/pm8150.dtsi +39 -2
@@ -30,6 +30,15 @@ pwrkey { }; }; + pm8150_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;
@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; - ref-gnd@0 { reg = <ADC5_REF_GND>; qcom,pre-scaling = <1 1>;
@@ -85,3 +92,33 @@ pmic@1 { #size-cells = <0>; }; }; + +&thermal_zones { + pm8150_temp { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + }; +};
arch/arm64/boot/dts/qcom/pm8150b.dtsi +40 -3
58 lines not on this page · raw message
arch/arm64/boot/dts/qcom/pm8150l.dtsi +40 -3
58 lines not on this page · raw message
Signature · 1 line
2.26.2
Re: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
Quoted 33 lines · Dmitry Baryshkov
Add temperature alarm and thermal zone configuration to all three pm8150 instances. Configuration is largely based on the msm-4.19 tree. These alarms use main adc of the pmic. Separate temperature adc is not supported yet.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 +++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 43 +++++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 43 +++++++++++++++++++++++++-- 3 files changed, 119 insertions(+), 8 deletions(-)arch/arm64/boot/dts/qcom/pm8150.dtsi +9
-0@@ -30,6 +30,15 @@ pwrkey { }; }; + pm8150_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;
arch/arm64/boot/dts/qcom/pm8150.dtsi pm8150_adc: adc@3100 { · line 42
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; -
This should not be removed, rather than this please add enabled in you board dts file
Quoted 26 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +19
-0ref-gnd@0 { reg = <ADC5_REF_GND>; qcom,pre-scaling = <1 1>;@@ -85,3 +92,33 @@ pmic@1 { #size-cells = <0>; }; }; + +&thermal_zones { + pm8150_temp { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive";
arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 123
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +10
-0+ }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + };
Not sure about this, Amit..? Should this also not be in board dts?
Similar comments on similar ones for rest of the patch as well..
Signature · 1 line
~Vinod
Re: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
Quoted 82 lines · Vinod Koul
Quoted 33 lines · Dmitry Baryshkov
Add temperature alarm and thermal zone configuration to all three pm8150 instances. Configuration is largely based on the msm-4.19 tree. These alarms use main adc of the pmic. Separate temperature adc is not supported yet.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 +++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 43 +++++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 43 +++++++++++++++++++++++++-- 3 files changed, 119 insertions(+), 8 deletions(-)arch/arm64/boot/dts/qcom/pm8150.dtsi +9
-0@@ -30,6 +30,15 @@ pwrkey { }; }; + pm8150_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;arch/arm64/boot/dts/qcom/pm8150.dtsi pm8150_adc: adc@3100 { · line 42
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; -This should not be removed, rather than this please add enabled in you board dts file
Quoted 26 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +19
-0ref-gnd@0 { reg = <ADC5_REF_GND>; qcom,pre-scaling = <1 1>;@@ -85,3 +92,33 @@ pmic@1 { #size-cells = <0>; }; }; + +&thermal_zones { + pm8150_temp { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive";arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 123
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +10
-0+ }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + };Not sure about this, Amit..? Should this also not be in board dts?
Quoted 1 line
Similar comments on similar ones for rest of the patch as well..
I'm not so sure. This part of the configuration seems generic to me. Unlike adc-tm config, which definitely goes to the board file.
I can split this into a separate pm8150-temp.dtsi file. Does that sound better?
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
Sorry missed ccing Amit, done now.
Quoted 14 lines · Dmitry Baryshkov
Quoted 13 lines · Vinod Koul
arch/arm64/boot/dts/qcom/pm8150.dtsi pm8150_adc: adc@3100 { · line 41
Quoted 8 lines · Dmitry Baryshkov
pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; -This should not be removed, rather than this please add enabled in you board dts file
...
Quoted 31 lines
Quoted 31 lines
Quoted 18 lines
+&thermal_zones {
arch/arm64/boot/dts/qcom/pm8150.dtsi +17
-0+ pm8150_temp { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive";arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 123
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +10
-0+ }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + };Not sure about this, Amit..? Should this also not be in board dts?
Quoted 4 lines
Quoted 1 line
Similar comments on similar ones for rest of the patch as well..
I'm not so sure. This part of the configuration seems generic to me. Unlike adc-tm config, which definitely goes to the board file.
I think the temperature values may be board specific, Amit can confirm that. If that is the case then this belongs to board dts, otherwise here :)
Quoted 2 lines
I can split this into a separate
pm8150-temp.dtsifile. Does that sound better?
That might make it worse, we don't do splitting.
Signature · 1 line
~Vinod
Re: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
Hello,
Quoted 19 lines · Vinod Koul
Sorry missed ccing Amit, done now.
Quoted 14 lines · Dmitry Baryshkov
Quoted 13 lines · Vinod Koul
arch/arm64/boot/dts/qcom/pm8150.dtsi pm8150_adc: adc@3100 { · line 41
Quoted 8 lines · Dmitry Baryshkov
pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; -This should not be removed, rather than this please add enabled in you board dts file
Compare this with pm8998.dtsi. It has all nodes enabled by default.
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 18 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +18
-0+&thermal_zones { + pm8150_temp { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive";arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 123
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +10
-0+ }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + };Not sure about this, Amit..? Should this also not be in board dts?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Similar comments on similar ones for rest of the patch as well..
I'm not so sure. This part of the configuration seems generic to me. Unlike adc-tm config, which definitely goes to the board file.
I think the temperature values may be board specific, Amit can confirm that. If that is the case then this belongs to board dts, otherwise here :)
Again, pm8998 has these thermal values in the dtsi file. In V2 I will update these three files to follow pm8998.dtsi.
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
In reply to Vinod KoulQuoted 19 lines · Vinod Koul
Sorry missed ccing Amit, done now.
Quoted 14 lines · Dmitry Baryshkov
Quoted 13 lines · Vinod Koul
arch/arm64/boot/dts/qcom/pm8150.dtsi pm8150_adc: adc@3100 { · line 41
Quoted 8 lines · Dmitry Baryshkov
pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>;arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -38,8 +47,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; -This should not be removed, rather than this please add enabled in you board dts file
Is the default disabled for a reason?
I'd expect the default to be enabled and then board-specific dts to disable a specific adc if needed.
Quoted 12 lines
...
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+&thermal_zones {
+pm8150_temp{arch/arm64/boot/dts/qcom/pm8150.dtsi +8
-0+ polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 113
Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +8
-0+ hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive";
Since there is not cooling map associated with these two trips i.e. no mitigation action, this trip is informational. So make it of type "hot".
Is there really a need for two passive trip points? Just one at 115 should be enough?
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 117
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +4
-0+ }; + + trip2 { + temperature = <145000>;
Are you sure about this? That is a very toasty temperature. :-)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ hysteresis = <0>; + type = "passive";
The last trip should typically be of type "critical". That is the temperature at which the system will initiate a shutdown.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi pmic@1 { · line 120
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +4
-0+ }; + }; + + };Not sure about this, Amit..? Should this also not be in board dts?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Similar comments on similar ones for rest of the patch as well..
I'm not so sure. This part of the configuration seems generic to me. Unlike adc-tm config, which definitely goes to the board file.
I think the temperature values may be board specific, Amit can confirm that. If that is the case then this belongs to board dts, otherwise here :)
While the temp values can be board-specific e.g. if the same SoC is used in a mobile phone and a laptop, the thresholds rarely change, in my experience.
I think they can stay in the pmic dtsi file and any specific board can override if necessary.
Quoted 4 lines
Quoted 2 lines
I can split this into a separate
pm8150-temp.dtsifile. Does that sound better?That might make it worse, we don't do splitting.
Right, let's not split it.
Quoted 3 lines
--
~Vinod
PATCH 6/7 arm64: dts: qcom: pm8150: enable rtc device
In reply to Dmitry BaryshkovEnable rtc device provided by the pmic.
--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/qcom/pm8150.dtsi +0 -2
@@ -71,8 +71,6 @@ rtc@6000 { reg = <0x6000>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - - status = "disabled"; }; pm8150_gpios: gpio@c000 {
Signature · 1 line
2.26.2
Re: [PATCH 6/7] arm64: dts: qcom: pm8150: enable rtc device
Quoted 3 lines · Dmitry Baryshkov
Enable rtc device provided by the pmic.
Signed-off-by Dmitry Baryshkov <[email protected]>
Thanks,
Mani
Quoted 20 lines
--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 -- 1 file changed, 2 deletions(-)arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -71,8 +71,6 @@ rtc@6000 { reg = <0x6000>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - - status = "disabled"; }; pm8150_gpios: gpio@c000 {Signature · 1 line
2.26.2
Re: [PATCH 6/7] arm64: dts: qcom: pm8150: enable rtc device
In reply to Dmitry BaryshkovQuoted 12 lines · Dmitry Baryshkov
Enable rtc device provided by the pmic.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 -- 1 file changed, 2 deletions(-)arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-0
arch/arm64/boot/dts/qcom/pm8150.dtsi rtc@6000 { · line 75
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +0
-2@@ -71,8 +71,6 @@ rtc@6000 { reg = <0x6000>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - - status = "disabled";
Again, pls enable in your board dts...
Thanks
Signature · 1 line
~Vinod
PATCH 7/7 arm64: dts: qcom: sm8250: add watchdog device
In reply to Dmitry BaryshkovAdd on-SoC watchdog device node.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +6 -0
@@ -1662,6 +1662,12 @@ config { }; }; + watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt"; + reg = <0 0x17c10000 0 0x1000>; + clocks = <&sleep_clk>; + }; + timer@17c20000 { #address-cells = <2>; #size-cells = <2>;
Signature · 1 line
2.26.2
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
Quoted 3 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>
Thanks,
Mani
Quoted 24 lines
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +6
-0@@ -1662,6 +1662,12 @@ config { }; }; + watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt"; + reg = <0 0x17c10000 0 0x1000>; + clocks = <&sleep_clk>; + }; + timer@17c20000 { #address-cells = <2>; #size-cells = <2>;Signature · 1 line
2.26.2
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
In reply to Dmitry BaryshkovQuoted 1 line · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signature · 1 line
~Vinod
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
In reply to Dmitry BaryshkovQuoted 13 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-0
arch/arm64/boot/dts/qcom/sm8250.dtsi config { · line 1666
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2
-0@@ -1662,6 +1662,12 @@ config { }; }; + watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";
Need to add this compatible to bindings.
Thanks,
Sai
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
Quoted 17 lines · Sai Prakash Ranjan
Quoted 16 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-0@@ -1662,6 +1662,12 @@ config { }; };
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi config { · line 1666
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2
-0+ watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";Need to add this compatible to bindings.
I did look into this but the binding says, "compatible : shall contain only one of the following"
So clearly the fallback is not going to work and there is no need to add a dedicated compatible in the driver. The binding is not in the YAML format to be validated but still... Other option is to convert the binding to YAML and make the compatibles listed as 'enum' and 'const' elements appropriately.
Thanks,
Mani
Quoted 5 lines
Thanks,
SaiSignature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
Quoted 24 lines · Manivannan Sadhasivam
Quoted 17 lines · Sai Prakash Ranjan
Quoted 16 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-0@@ -1662,6 +1662,12 @@ config { }; };Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi config { · line 1666
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2
-0+ watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";Need to add this compatible to bindings.
Quoted 8 lines
I did look into this but the binding says, "compatible : shall contain only one of the following"
So clearly the fallback is not going to work and there is no need to add a dedicated compatible in the driver. The binding is not in the YAML format to be validated but still... Other option is to convert the binding to YAML and make the compatibles listed as 'enum' and 'const' elements appropriately.
I already converted the bindings to YAML and added the missing compatibles for other SoCs[1] . I thought it was already merged since Rob has already reviewed them, but seems like it was missed. Bjorn, can you please take it?
[1] https://lore.kernel.org/patchwork/cover/1192757/
Thanks,
Sai
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
Quoted 38 lines · Sai Prakash Ranjan
Quoted 27 lines · Manivannan Sadhasivam
Quoted 17 lines · Sai Prakash Ranjan
Quoted 16 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-0@@ -1662,6 +1662,12 @@ config { }; };Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi config { · line 1666
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2
-0+ watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";Need to add this compatible to bindings.
I did look into this but the binding says, "compatible : shall contain only one of the following"
Quoted 9 lines
So clearly the fallback is not going to work and there is no need to add a
dedicated compatible in the driver. The binding is not in the YAML format to
be validated but still... Other option is to convert the binding to YAML and
make the compatibles listed as 'enum' and 'const' elements appropriately.
Quoted 3 lines
I already converted the bindings to YAML and added the missing compatibles for
other SoCs[1] .
Ah, okay. I didn't find it in linux-next. Anyway, for adding "qcom,apss-wdt-sm8250" compatible, we need to group the compatibles wisely using 'enum' and 'const'.
Quoted 4 lines
I thought it was already merged since Rob has already reviewed
them, but seems like it was missed. Bjorn, can you please take it?
Perhaps for v5.9...
Thanks,
Mani
Quoted 8 lines
[1] https://lore.kernel.org/patchwork/cover/1192757/
Thanks,
SaiSignature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device
Quoted 39 lines · Manivannan Sadhasivam
Quoted 38 lines · Sai Prakash Ranjan
Quoted 36 lines · Manivannan Sadhasivam
Quoted 17 lines · Sai Prakash Ranjan
Quoted 16 lines · Dmitry Baryshkov
Add on-SoC watchdog device node.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-0@@ -1662,6 +1662,12 @@ config { }; };Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi config { · line 1666
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2
-0+ watchdog@17c10000 { + compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";Need to add this compatible to bindings.
I did look into this but the binding says, "compatible : shall contain only one of the following"
So clearly the fallback is not going to work and there is no need to add a
dedicated compatible in the driver. The binding is not in the YAML format to
be validated but still... Other option is to convert the binding to YAML and
make the compatibles listed as 'enum' and 'const' elements appropriately.
Quoted 8 lines
Quoted 3 lines
I already converted the bindings to YAML and added the missing compatibles for
other SoCs[1] .Ah, okay. I didn't find it in linux-next. Anyway, for adding "qcom,apss-wdt-sm8250" compatible, we need to group the compatibles wisely using 'enum' and 'const'.
Yes.
Quoted 7 lines
Quoted 4 lines
I thought it was already merged since Rob has already reviewed
them, but seems like it was missed. Bjorn, can you please take it?Perhaps for v5.9...
Sure, no problem.
Thanks,
Sai
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Quoted 14 lines · Dmitry Baryshkov
Add base DTS file for pm8009 along with GPIOs and power-on nodes.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsiarch/arm64/boot/dts/qcom/pm8009.dtsi new file +0
-0
arch/arm64/boot/dts/qcom/pm8009.dtsi line 4
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +4
-0@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited
2020
arch/arm64/boot/dts/qcom/pm8009.dtsi line 10
Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +6
-0+ */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
Sort includes alphabetically.
Thanks,
Mani
Quoted 33 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +30
-0+ +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};Signature · 1 line
2.26.2
Quoted 14 lines · Dmitry Baryshkov
Add base DTS file for pm8009 along with GPIOs and power-on nodes.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsiarch/arm64/boot/dts/qcom/pm8009.dtsi new file +0
-0
arch/arm64/boot/dts/qcom/pm8009.dtsi line 4
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +4
-0@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited
We are in 2020 :)
arch/arm64/boot/dts/qcom/pm8009.dtsi line 8
Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +4
-0+ */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h>
DO you need these headers for base patch, we should add them when adding uses of this file
arch/arm64/boot/dts/qcom/pm8009.dtsi line 10
Quoted 2 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +2
-0+#include <dt-bindings/spmi/spmi.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
This one too
Quoted 32 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +30
-0+ +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};Signature · 1 line
2.26.2
Signature · 1 line
~Vinod
Quoted 23 lines · Dmitry Baryshkov
Add base DTS file for pm8009 along with GPIOs and power-on nodes.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsiarch/arm64/boot/dts/qcom/pm8009.dtsi new file +9
-0@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited + */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h>
arch/arm64/boot/dts/qcom/pm8009.dtsi line 19
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +10
-0+#include <dt-bindings/iio/qcom,spmi-vadc.h> + +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 {
Please name this "pon", just for consistency.
arch/arm64/boot/dts/qcom/pm8009.dtsi line 20
Quoted 1 line
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +1
-0+ compatible = "qcom,pm8916-pon";
Can you confirm that pm8009 is subtype 1, and hence the reboot reason going into RB_SPARE should be shifted 2 steps, rather than 1 as in the newer PMICs?
Would be nice if we had a generic compatible that read the subtype, rather than having to add new compatibles for each pmic (or use the old ones)...
Regards,
Bjorn
Quoted 23 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +20
-0+ reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};Signature · 1 line
2.26.2
Quoted 39 lines · Bjorn Andersson
Quoted 23 lines · Dmitry Baryshkov
Add base DTS file for pm8009 along with GPIOs and power-on nodes.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsiarch/arm64/boot/dts/qcom/pm8009.dtsi new file +9
-0@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited + */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h>arch/arm64/boot/dts/qcom/pm8009.dtsi line 19
Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +10
-0+#include <dt-bindings/iio/qcom,spmi-vadc.h> + +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 {Please name this "pon", just for consistency.
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8009.dtsi line 20
Quoted 1 line
arch/arm64/boot/dts/qcom/pm8009.dtsi new file +1
-0+ compatible = "qcom,pm8916-pon";Can you confirm that pm8009 is subtype 1, and hence the reboot reason going into
RB_SPAREshould be shifted 2 steps, rather than 1 as in the newer PMICs?
For pm8009 the subtype reads as 0x07, while according to msm-4.19 gen2 handling is only enabled for subtypes 0x04 and 0x05.
Quoted 3 lines
Would be nice if we had a generic compatible that read the subtype, rather than having to add new compatibles for each pmic (or use the old ones)...
Will do it in a separate patch.
Signature · 2 lines
With best wishes Dmitry