* [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring
@ 2023-06-30 6:13 Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name Dmitry Baryshkov
` (6 more replies)
0 siblings, 7 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
Improve thermal monitoring on 8450-HDK board. First set of patches fix
c&p typos in PMIC include files (mea culpa). The rest of patches enable
ADC-TM usage on the SM8450 HDK.
Dmitry Baryshkov (7):
arm64: dts: qcom: pm8350: fix thermal zone name
arm64: dts: qcom: pm8350b: fix thermal zone name
arm64: dts: qcom: pmr735b: fix thermal zone name
arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion
arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels
arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 288 +++++++++++++++++++++++-
5 files changed, 291 insertions(+), 5 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:11 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 2/7] arm64: dts: qcom: pm8350b: " Dmitry Baryshkov
` (5 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
The name of the thermal zone in pm8350.dtsi (pm8350c-thermal) conflicts
with the thermal zone in pm8350c.dtsi. Rename the thermal zone according
to the chip name.
Fixes: 7a79b95f4288 ("arm64: dts: qcom: pm8350: add temp sensor and thermal zone config")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi
index 2dfeb99300d7..9ed9ba23e81e 100644
--- a/arch/arm64/boot/dts/qcom/pm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pm8350_thermal: pm8350c-thermal {
+ pm8350_thermal: pm8350-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm8350_temp_alarm>;
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 2/7] arm64: dts: qcom: pm8350b: fix thermal zone name
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:12 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 3/7] arm64: dts: qcom: pmr735b: " Dmitry Baryshkov
` (4 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
The name of the thermal zone in pm8350b.dtsi (pm8350c-thermal) conflicts
with the thermal zone in pm8350c.dtsi. Rename the thermal zone according
to the chip name.
Fixes: 5c1399299d9d ("arm64: dts: qcom: pm8350b: add temp sensor and thermal zone config")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/pm8350b.dtsi b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
index f1c7bd9d079c..05c105898892 100644
--- a/arch/arm64/boot/dts/qcom/pm8350b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pm8350b_thermal: pm8350c-thermal {
+ pm8350b_thermal: pm8350b-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm8350b_temp_alarm>;
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 3/7] arm64: dts: qcom: pmr735b: fix thermal zone name
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 2/7] arm64: dts: qcom: pm8350b: " Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:12 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string Dmitry Baryshkov
` (3 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
The name of the thermal zone in pmr735b.dtsi (pmr735a-thermal) conflicts
with the thermal zone in pmr735a.dtsi. Rename the thermal zone according
to the chip name.
Fixes: 6f3426b3dea4 ("arm64: dts: qcom: pmr735b: add temp sensor and thermal zone config")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/pmr735b.dtsi b/arch/arm64/boot/dts/qcom/pmr735b.dtsi
index ec24c4478005..f7473e247322 100644
--- a/arch/arm64/boot/dts/qcom/pmr735b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmr735b.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pmr735a_thermal: pmr735a-thermal {
+ pmr735b_thermal: pmr735b-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pmr735b_temp_alarm>;
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
` (2 preceding siblings ...)
2023-06-30 6:13 ` [PATCH 3/7] arm64: dts: qcom: pmr735b: " Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion Dmitry Baryshkov
` (2 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
The commit b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for
pmk8350") for the ADC TM (thermal monitoring device) have used the
compatible string from the vendor kernel ("qcom,adc-tm7"). Use the
proper compatible string that is defined in the upstream kernel
("qcom,spmi-adc-tm5-gen2").
Fixes: b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for pmk8350")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
index bc6297e7253e..1eb74017062d 100644
--- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
@@ -59,7 +59,7 @@ pmk8350_vadc: adc@3100 {
};
pmk8350_adc_tm: adc-tm@3400 {
- compatible = "qcom,adc-tm7";
+ compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#address-cells = <1>;
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
` (3 preceding siblings ...)
2023-06-30 6:13 ` [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones Dmitry Baryshkov
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
The 8450-HDK doesn't use PMR735B PMIC. Drop its inclusion to remove the
warning during the HDK bootup.
Fixes: 30464456a1ea ("arm64: dts: qcom: sm8450-hdk: add pmic files")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index bc4c125d1832..dabb7e872f38 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -14,7 +14,6 @@
#include "pm8450.dtsi"
#include "pmk8350.dtsi"
#include "pmr735a.dtsi"
-#include "pmr735b.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SM8450 HDK";
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
` (4 preceding siblings ...)
2023-06-30 6:13 ` [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:15 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones Dmitry Baryshkov
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
Declare the DIE_TEMP channels provided by PMICs. Use them to provide
temperature reading for the spmi-temp-alarm thermal zones.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 43 +++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index dabb7e872f38..d07e402eaba3 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -6,6 +6,10 @@
/dts-v1/;
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350b.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
#include "sm8450.dtsi"
#include "pm8350.dtsi"
@@ -588,6 +592,45 @@ &pcie1_phy {
vdda-pll-supply = <&vreg_l6b_1p2>;
};
+&pm8350_temp_alarm {
+ io-channels = <&pmk8350_vadc PM8350_ADC7_DIE_TEMP(1)>;
+ io-channel-names = "thermal";
+};
+
+&pm8350b_temp_alarm {
+ io-channels = <&pmk8350_vadc PM8350B_ADC7_DIE_TEMP>;
+ io-channel-names = "thermal";
+};
+
+&pmr735a_temp_alarm {
+ io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>;
+ io-channel-names = "thermal";
+};
+
+&pmk8350_vadc {
+ status = "okay";
+
+ channel@3 {
+ reg = <PMK8350_ADC7_DIE_TEMP>;
+ label = "pmk8350_die_temp";
+ };
+
+ channel@103 {
+ reg = <PM8350_ADC7_DIE_TEMP(1)>;
+ label = "pm8350_die_temp";
+ };
+
+ channel@303 {
+ reg = <PM8350B_ADC7_DIE_TEMP>;
+ label = "pm8350b_die_temp";
+ };
+
+ channel@403 {
+ reg = <PMR735A_ADC7_DIE_TEMP>;
+ label = "pmr735a_die_temp";
+ };
+};
+
&remoteproc_adsp {
status = "okay";
firmware-name = "qcom/sm8450/adsp.mbn";
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
` (5 preceding siblings ...)
2023-06-30 6:13 ` [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels Dmitry Baryshkov
@ 2023-06-30 6:13 ` Dmitry Baryshkov
2023-06-30 8:19 ` Konrad Dybcio
6 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 6:13 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
PMIC interface. This includes several onboard sensors and the XO thermal
sensor.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 244 ++++++++++++++++++++++++
1 file changed, 244 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index d07e402eaba3..4dfc964a4bb1 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -133,6 +133,120 @@ pmic_glink_sbu: endpoint {
};
};
+ thermal-zones {
+ camera-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 2>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ rear-tof-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 5>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ skin-msm-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 1>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ therm1-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 3>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ therm2-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 6>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ usb-conn-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 7>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ wide-rfc-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 4>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ xo-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 0>;
+
+ trips {
+ active-config0 {
+ temperature = <50000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@@ -607,6 +721,66 @@ &pmr735a_temp_alarm {
io-channel-names = "thermal";
};
+&pmk8350_adc_tm {
+ status = "okay";
+
+ xo-therm@0 {
+ reg = <0>;
+ io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ skin-msm-therm@1 {
+ reg = <1>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ camera-therm@2 {
+ reg = <2>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ therm1-therm@3 {
+ reg = <3>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ wide-rfc-therm@4 {
+ reg = <4>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ rear-tof-therm@5 {
+ reg = <5>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ therm2-therm@6 {
+ reg = <6>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_GPIO3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ usb-conn-therm@7 {
+ reg = <7>;
+ io-channels = <&pmk8350_vadc PM8350B_ADC7_AMUX_THM5_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
&pmk8350_vadc {
status = "okay";
@@ -615,20 +789,90 @@ channel@3 {
label = "pmk8350_die_temp";
};
+ channel@44 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "pmk8350_xo_therm";
+ };
+
channel@103 {
reg = <PM8350_ADC7_DIE_TEMP(1)>;
label = "pm8350_die_temp";
};
+ channel@144 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "skin_msm_temp";
+ };
+
+ channel@145 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "camera_temp";
+ };
+
+ channel@146 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "therm1_temp";
+ };
+
+ channel@147 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "wide_rfc_temp";
+ };
+
+ channel@148 {
+ reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "rear_tof_temp";
+ };
+
+ channel@14c {
+ reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "therm2_temp";
+ };
+
channel@303 {
reg = <PM8350B_ADC7_DIE_TEMP>;
label = "pm8350b_die_temp";
};
+ channel@348 {
+ reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "usb_conn_temp";
+ };
+
channel@403 {
reg = <PMR735A_ADC7_DIE_TEMP>;
label = "pmr735a_die_temp";
};
+
+ channel@44a {
+ reg = <PMR735A_ADC7_GPIO1_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "qtm_w_temp";
+ };
+
+ channel@44b {
+ reg = <PMR735A_ADC7_GPIO2_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "qtm_n_temp";
+ };
};
&remoteproc_adsp {
--
2.39.2
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name
2023-06-30 6:13 ` [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name Dmitry Baryshkov
@ 2023-06-30 8:11 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:11 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> The name of the thermal zone in pm8350.dtsi (pm8350c-thermal) conflicts
> with the thermal zone in pm8350c.dtsi. Rename the thermal zone according
> to the chip name.
>
> Fixes: 7a79b95f4288 ("arm64: dts: qcom: pm8350: add temp sensor and thermal zone config")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
DTC really needs some sus overwrite warnings!
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi
> index 2dfeb99300d7..9ed9ba23e81e 100644
> --- a/arch/arm64/boot/dts/qcom/pm8350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi
> @@ -8,7 +8,7 @@
>
> / {
> thermal-zones {
> - pm8350_thermal: pm8350c-thermal {
> + pm8350_thermal: pm8350-thermal {
> polling-delay-passive = <100>;
> polling-delay = <0>;
> thermal-sensors = <&pm8350_temp_alarm>;
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/7] arm64: dts: qcom: pm8350b: fix thermal zone name
2023-06-30 6:13 ` [PATCH 2/7] arm64: dts: qcom: pm8350b: " Dmitry Baryshkov
@ 2023-06-30 8:12 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:12 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> The name of the thermal zone in pm8350b.dtsi (pm8350c-thermal) conflicts
> with the thermal zone in pm8350c.dtsi. Rename the thermal zone according
> to the chip name.
>
> Fixes: 5c1399299d9d ("arm64: dts: qcom: pm8350b: add temp sensor and thermal zone config")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8350b.dtsi b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
> index f1c7bd9d079c..05c105898892 100644
> --- a/arch/arm64/boot/dts/qcom/pm8350b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
> @@ -8,7 +8,7 @@
>
> / {
> thermal-zones {
> - pm8350b_thermal: pm8350c-thermal {
> + pm8350b_thermal: pm8350b-thermal {
> polling-delay-passive = <100>;
> polling-delay = <0>;
> thermal-sensors = <&pm8350b_temp_alarm>;
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: pmr735b: fix thermal zone name
2023-06-30 6:13 ` [PATCH 3/7] arm64: dts: qcom: pmr735b: " Dmitry Baryshkov
@ 2023-06-30 8:12 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:12 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> The name of the thermal zone in pmr735b.dtsi (pmr735a-thermal) conflicts
> with the thermal zone in pmr735a.dtsi. Rename the thermal zone according
> to the chip name.
>
> Fixes: 6f3426b3dea4 ("arm64: dts: qcom: pmr735b: add temp sensor and thermal zone config")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pmr735b.dtsi b/arch/arm64/boot/dts/qcom/pmr735b.dtsi
> index ec24c4478005..f7473e247322 100644
> --- a/arch/arm64/boot/dts/qcom/pmr735b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmr735b.dtsi
> @@ -8,7 +8,7 @@
>
> / {
> thermal-zones {
> - pmr735a_thermal: pmr735a-thermal {
> + pmr735b_thermal: pmr735b-thermal {
> polling-delay-passive = <100>;
> polling-delay = <0>;
> thermal-sensors = <&pmr735b_temp_alarm>;
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
2023-06-30 6:13 ` [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string Dmitry Baryshkov
@ 2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 10:11 ` Dmitry Baryshkov
0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:13 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> The commit b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for
> pmk8350") for the ADC TM (thermal monitoring device) have used the
> compatible string from the vendor kernel ("qcom,adc-tm7"). Use the
> proper compatible string that is defined in the upstream kernel
> ("qcom,spmi-adc-tm5-gen2").
>
> Fixes: b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for pmk8350")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Well actually, adc-tm7 would be the correct compatible (PM8350X is PMIC7)
but it never landed on the driver side..
Konrad
> arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> index bc6297e7253e..1eb74017062d 100644
> --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> @@ -59,7 +59,7 @@ pmk8350_vadc: adc@3100 {
> };
>
> pmk8350_adc_tm: adc-tm@3400 {
> - compatible = "qcom,adc-tm7";
> + compatible = "qcom,spmi-adc-tm5-gen2";
> reg = <0x3400>;
> interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
> #address-cells = <1>;
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion
2023-06-30 6:13 ` [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion Dmitry Baryshkov
@ 2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 8:25 ` Neil Armstrong
0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:13 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> The 8450-HDK doesn't use PMR735B PMIC. Drop its inclusion to remove the
> warning during the HDK bootup.
>
> Fixes: 30464456a1ea ("arm64: dts: qcom: sm8450-hdk: add pmic files")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
That's.. strange.. Did you confirm this with schematics, or even better,
socinfo?
Konrad
> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> index bc4c125d1832..dabb7e872f38 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> @@ -14,7 +14,6 @@
> #include "pm8450.dtsi"
> #include "pmk8350.dtsi"
> #include "pmr735a.dtsi"
> -#include "pmr735b.dtsi"
>
> / {
> model = "Qualcomm Technologies, Inc. SM8450 HDK";
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels
2023-06-30 6:13 ` [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels Dmitry Baryshkov
@ 2023-06-30 8:15 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:15 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> Declare the DIE_TEMP channels provided by PMICs. Use them to provide
> temperature reading for the spmi-temp-alarm thermal zones.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 43 +++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> index dabb7e872f38..d07e402eaba3 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> @@ -6,6 +6,10 @@
> /dts-v1/;
>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pm8350b.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
> #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
> #include "sm8450.dtsi"
> #include "pm8350.dtsi"
> @@ -588,6 +592,45 @@ &pcie1_phy {
> vdda-pll-supply = <&vreg_l6b_1p2>;
> };
>
> +&pm8350_temp_alarm {
> + io-channels = <&pmk8350_vadc PM8350_ADC7_DIE_TEMP(1)>;
> + io-channel-names = "thermal";
> +};
> +
> +&pm8350b_temp_alarm {
> + io-channels = <&pmk8350_vadc PM8350B_ADC7_DIE_TEMP>;
> + io-channel-names = "thermal";
> +};
> +
> +&pmr735a_temp_alarm {
> + io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>;
> + io-channel-names = "thermal";
> +};
> +
> +&pmk8350_vadc {
> + status = "okay";
> +
> + channel@3 {
> + reg = <PMK8350_ADC7_DIE_TEMP>;
> + label = "pmk8350_die_temp";
> + };
> +
> + channel@103 {
> + reg = <PM8350_ADC7_DIE_TEMP(1)>;
> + label = "pm8350_die_temp";
> + };
> +
> + channel@303 {
> + reg = <PM8350B_ADC7_DIE_TEMP>;
> + label = "pm8350b_die_temp";
> + };
> +
> + channel@403 {
> + reg = <PMR735A_ADC7_DIE_TEMP>;
> + label = "pmr735a_die_temp";
> + };
> +};
> +
> &remoteproc_adsp {
> status = "okay";
> firmware-name = "qcom/sm8450/adsp.mbn";
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 6:13 ` [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones Dmitry Baryshkov
@ 2023-06-30 8:19 ` Konrad Dybcio
2023-06-30 10:07 ` Dmitry Baryshkov
0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 8:19 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> PMIC interface. This includes several onboard sensors and the XO thermal
> sensor.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
[...]
>
> + channel@144 {
> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
This define should be cleaned up.. Since it takes a sid argument,
it really is ADC7_AMUX_THM1_100K_PU(sid)
Konrad
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "skin_msm_temp";
> + };
> +
> + channel@145 {
> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "camera_temp";
> + };
> +
> + channel@146 {
> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "therm1_temp";
> + };
> +
> + channel@147 {
> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "wide_rfc_temp";
> + };
> +
> + channel@148 {
> + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "rear_tof_temp";
> + };
> +
> + channel@14c {
> + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "therm2_temp";
> + };
> +
> channel@303 {
> reg = <PM8350B_ADC7_DIE_TEMP>;
> label = "pm8350b_die_temp";
> };
>
> + channel@348 {
> + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "usb_conn_temp";
> + };
> +
> channel@403 {
> reg = <PMR735A_ADC7_DIE_TEMP>;
> label = "pmr735a_die_temp";
> };
> +
> + channel@44a {
> + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "qtm_w_temp";
> + };
> +
> + channel@44b {
> + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
> + qcom,hw-settle-time = <200>;
> + qcom,ratiometric;
> + label = "qtm_n_temp";
> + };
> };
>
> &remoteproc_adsp {
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion
2023-06-30 8:13 ` Konrad Dybcio
@ 2023-06-30 8:25 ` Neil Armstrong
0 siblings, 0 replies; 25+ messages in thread
From: Neil Armstrong @ 2023-06-30 8:25 UTC (permalink / raw)
To: Konrad Dybcio, Dmitry Baryshkov, Andy Gross, Bjorn Andersson,
Rob Herring, Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On 30/06/2023 10:13, Konrad Dybcio wrote:
> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
>> The 8450-HDK doesn't use PMR735B PMIC. Drop its inclusion to remove the
>> warning during the HDK bootup.
>>
>> Fixes: 30464456a1ea ("arm64: dts: qcom: sm8450-hdk: add pmic files")
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
> That's.. strange.. Did you confirm this with schematics, or even better,
> socinfo?
I confirm it doesn't have a 735b from the Schematics
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
>
> Konrad
>> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
>> index bc4c125d1832..dabb7e872f38 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
>> @@ -14,7 +14,6 @@
>> #include "pm8450.dtsi"
>> #include "pmk8350.dtsi"
>> #include "pmr735a.dtsi"
>> -#include "pmr735b.dtsi"
>>
>> / {
>> model = "Qualcomm Technologies, Inc. SM8450 HDK";
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 8:19 ` Konrad Dybcio
@ 2023-06-30 10:07 ` Dmitry Baryshkov
2023-06-30 11:27 ` Konrad Dybcio
0 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 10:07 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> > Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> > PMIC interface. This includes several onboard sensors and the XO thermal
> > sensor.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> [...]
> >
> > + channel@144 {
> > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> This define should be cleaned up.. Since it takes a sid argument,
> it really is ADC7_AMUX_THM1_100K_PU(sid)
I don't think I understood your comment. The define itself is specific
to PM8350, other PMICs might have different channel assignments.
>
> Konrad
>
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "skin_msm_temp";
> > + };
> > +
> > + channel@145 {
> > + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "camera_temp";
> > + };
> > +
> > + channel@146 {
> > + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "therm1_temp";
> > + };
> > +
> > + channel@147 {
> > + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "wide_rfc_temp";
> > + };
> > +
> > + channel@148 {
> > + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "rear_tof_temp";
> > + };
> > +
> > + channel@14c {
> > + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "therm2_temp";
> > + };
> > +
> > channel@303 {
> > reg = <PM8350B_ADC7_DIE_TEMP>;
> > label = "pm8350b_die_temp";
> > };
> >
> > + channel@348 {
> > + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "usb_conn_temp";
> > + };
> > +
> > channel@403 {
> > reg = <PMR735A_ADC7_DIE_TEMP>;
> > label = "pmr735a_die_temp";
> > };
> > +
> > + channel@44a {
> > + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "qtm_w_temp";
> > + };
> > +
> > + channel@44b {
> > + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
> > + qcom,hw-settle-time = <200>;
> > + qcom,ratiometric;
> > + label = "qtm_n_temp";
> > + };
> > };
> >
> > &remoteproc_adsp {
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
2023-06-30 8:13 ` Konrad Dybcio
@ 2023-06-30 10:11 ` Dmitry Baryshkov
2023-06-30 11:26 ` Konrad Dybcio
0 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 10:11 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On Fri, 30 Jun 2023 at 11:13, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> > The commit b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for
> > pmk8350") for the ADC TM (thermal monitoring device) have used the
> > compatible string from the vendor kernel ("qcom,adc-tm7"). Use the
> > proper compatible string that is defined in the upstream kernel
> > ("qcom,spmi-adc-tm5-gen2").
> >
> > Fixes: b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for pmk8350")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> Well actually, adc-tm7 would be the correct compatible (PM8350X is PMIC7)
> but it never landed on the driver side..
I also thought so (and started implementing adc-tm7), but then I
stumbled upon the commit 96f6f333bcf0 ("thermal/drivers/qcom: Add
support for PMIC5 Gen2 ADCTM"), which clearly tells:
Add support for PMIC5 Gen2 ADC_TM, used on PMIC7 chips. It is a
close counterpart of PMIC7 ADC and has the same functionality as
PMIC5 ADC_TM, for threshold monitoring and interrupt generation.
It is present on PMK8350 alone, ....
So, this is the right compatible for PMK8350.
>
> Konrad
> > arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> > index bc6297e7253e..1eb74017062d 100644
> > --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
> > @@ -59,7 +59,7 @@ pmk8350_vadc: adc@3100 {
> > };
> >
> > pmk8350_adc_tm: adc-tm@3400 {
> > - compatible = "qcom,adc-tm7";
> > + compatible = "qcom,spmi-adc-tm5-gen2";
> > reg = <0x3400>;
> > interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
> > #address-cells = <1>;
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
2023-06-30 10:11 ` Dmitry Baryshkov
@ 2023-06-30 11:26 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 11:26 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On 30.06.2023 12:11, Dmitry Baryshkov wrote:
> On Fri, 30 Jun 2023 at 11:13, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
>>> The commit b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for
>>> pmk8350") for the ADC TM (thermal monitoring device) have used the
>>> compatible string from the vendor kernel ("qcom,adc-tm7"). Use the
>>> proper compatible string that is defined in the upstream kernel
>>> ("qcom,spmi-adc-tm5-gen2").
>>>
>>> Fixes: b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for pmk8350")
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>> Well actually, adc-tm7 would be the correct compatible (PM8350X is PMIC7)
>> but it never landed on the driver side..
>
> I also thought so (and started implementing adc-tm7), but then I
> stumbled upon the commit 96f6f333bcf0 ("thermal/drivers/qcom: Add
> support for PMIC5 Gen2 ADCTM"), which clearly tells:
>
> Add support for PMIC5 Gen2 ADC_TM, used on PMIC7 chips. It is a
> close counterpart of PMIC7 ADC and has the same functionality as
> PMIC5 ADC_TM, for threshold monitoring and interrupt generation.
> It is present on PMK8350 alone, ....
>
> So, this is the right compatible for PMK8350.
Oh, ok!
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
>
>>
>> Konrad
>>> arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
>>> index bc6297e7253e..1eb74017062d 100644
>>> --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
>>> @@ -59,7 +59,7 @@ pmk8350_vadc: adc@3100 {
>>> };
>>>
>>> pmk8350_adc_tm: adc-tm@3400 {
>>> - compatible = "qcom,adc-tm7";
>>> + compatible = "qcom,spmi-adc-tm5-gen2";
>>> reg = <0x3400>;
>>> interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
>>> #address-cells = <1>;
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 10:07 ` Dmitry Baryshkov
@ 2023-06-30 11:27 ` Konrad Dybcio
2023-06-30 12:57 ` Dmitry Baryshkov
0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 11:27 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
>>> PMIC interface. This includes several onboard sensors and the XO thermal
>>> sensor.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>> [...]
>>>
>>> + channel@144 {
>>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
>> This define should be cleaned up.. Since it takes a sid argument,
>> it really is ADC7_AMUX_THM1_100K_PU(sid)
>
> I don't think I understood your comment. The define itself is specific
> to PM8350, other PMICs might have different channel assignments.
include/dt-bindings/iio/qcom,spmi-vadc.h
263:#define ADC7_AMUX_THM1_100K_PU 0x44
Konrad
>
>>
>> Konrad
>>
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "skin_msm_temp";
>>> + };
>>> +
>>> + channel@145 {
>>> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "camera_temp";
>>> + };
>>> +
>>> + channel@146 {
>>> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "therm1_temp";
>>> + };
>>> +
>>> + channel@147 {
>>> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "wide_rfc_temp";
>>> + };
>>> +
>>> + channel@148 {
>>> + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "rear_tof_temp";
>>> + };
>>> +
>>> + channel@14c {
>>> + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "therm2_temp";
>>> + };
>>> +
>>> channel@303 {
>>> reg = <PM8350B_ADC7_DIE_TEMP>;
>>> label = "pm8350b_die_temp";
>>> };
>>>
>>> + channel@348 {
>>> + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "usb_conn_temp";
>>> + };
>>> +
>>> channel@403 {
>>> reg = <PMR735A_ADC7_DIE_TEMP>;
>>> label = "pmr735a_die_temp";
>>> };
>>> +
>>> + channel@44a {
>>> + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "qtm_w_temp";
>>> + };
>>> +
>>> + channel@44b {
>>> + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
>>> + qcom,hw-settle-time = <200>;
>>> + qcom,ratiometric;
>>> + label = "qtm_n_temp";
>>> + };
>>> };
>>>
>>> &remoteproc_adsp {
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 11:27 ` Konrad Dybcio
@ 2023-06-30 12:57 ` Dmitry Baryshkov
2023-06-30 16:15 ` Konrad Dybcio
0 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 12:57 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> > On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>
> >> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> >>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> >>> PMIC interface. This includes several onboard sensors and the XO thermal
> >>> sensor.
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>> ---
> >> [...]
> >>>
> >>> + channel@144 {
> >>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> >> This define should be cleaned up.. Since it takes a sid argument,
> >> it really is ADC7_AMUX_THM1_100K_PU(sid)
> >
> > I don't think I understood your comment. The define itself is specific
> > to PM8350, other PMICs might have different channel assignments.
>
> include/dt-bindings/iio/qcom,spmi-vadc.h
> 263:#define ADC7_AMUX_THM1_100K_PU 0x44
Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
ADC7_AMUX_THM1_100K_PU ?
Or to make all users use ADC7_AMUX_THM1_100K_PU? Or add the SID
argument to ADC7_AMUX_THM1_100K_PU and switch to it?
>
> Konrad
> >
> >>
> >> Konrad
> >>
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "skin_msm_temp";
> >>> + };
> >>> +
> >>> + channel@145 {
> >>> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "camera_temp";
> >>> + };
> >>> +
> >>> + channel@146 {
> >>> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "therm1_temp";
> >>> + };
> >>> +
> >>> + channel@147 {
> >>> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "wide_rfc_temp";
> >>> + };
> >>> +
> >>> + channel@148 {
> >>> + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "rear_tof_temp";
> >>> + };
> >>> +
> >>> + channel@14c {
> >>> + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "therm2_temp";
> >>> + };
> >>> +
> >>> channel@303 {
> >>> reg = <PM8350B_ADC7_DIE_TEMP>;
> >>> label = "pm8350b_die_temp";
> >>> };
> >>>
> >>> + channel@348 {
> >>> + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "usb_conn_temp";
> >>> + };
> >>> +
> >>> channel@403 {
> >>> reg = <PMR735A_ADC7_DIE_TEMP>;
> >>> label = "pmr735a_die_temp";
> >>> };
> >>> +
> >>> + channel@44a {
> >>> + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "qtm_w_temp";
> >>> + };
> >>> +
> >>> + channel@44b {
> >>> + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
> >>> + qcom,hw-settle-time = <200>;
> >>> + qcom,ratiometric;
> >>> + label = "qtm_n_temp";
> >>> + };
> >>> };
> >>>
> >>> &remoteproc_adsp {
> >
> >
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 12:57 ` Dmitry Baryshkov
@ 2023-06-30 16:15 ` Konrad Dybcio
2023-06-30 17:42 ` Dmitry Baryshkov
0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2023-06-30 16:15 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On 30.06.2023 14:57, Dmitry Baryshkov wrote:
> On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
>>> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>>
>>>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
>>>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
>>>>> PMIC interface. This includes several onboard sensors and the XO thermal
>>>>> sensor.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>> [...]
>>>>>
>>>>> + channel@144 {
>>>>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
>>>> This define should be cleaned up.. Since it takes a sid argument,
>>>> it really is ADC7_AMUX_THM1_100K_PU(sid)
>>>
>>> I don't think I understood your comment. The define itself is specific
>>> to PM8350, other PMICs might have different channel assignments.
>>
>> include/dt-bindings/iio/qcom,spmi-vadc.h
>> 263:#define ADC7_AMUX_THM1_100K_PU 0x44
>
> Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
> ADC7_AMUX_THM1_100K_PU ?
> Or to make all users use ADC7_AMUX_THM1_100K_PU?
>Or add the SID
> argument to ADC7_AMUX_THM1_100K_PU and switch to it?
This.
Since we have a generic binding for it (not sure what sort of ABI-ish rules
apply here, probably not very many since it's just a dumb preprocessor define),
we should not redefine it for each PMIC, especially since the SIDs are variable
nowadays :/
Sorry for being too vague.
Konrad
>
>>
>> Konrad
>>>
>>>>
>>>> Konrad
>>>>
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "skin_msm_temp";
>>>>> + };
>>>>> +
>>>>> + channel@145 {
>>>>> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "camera_temp";
>>>>> + };
>>>>> +
>>>>> + channel@146 {
>>>>> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "therm1_temp";
>>>>> + };
>>>>> +
>>>>> + channel@147 {
>>>>> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "wide_rfc_temp";
>>>>> + };
>>>>> +
>>>>> + channel@148 {
>>>>> + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "rear_tof_temp";
>>>>> + };
>>>>> +
>>>>> + channel@14c {
>>>>> + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "therm2_temp";
>>>>> + };
>>>>> +
>>>>> channel@303 {
>>>>> reg = <PM8350B_ADC7_DIE_TEMP>;
>>>>> label = "pm8350b_die_temp";
>>>>> };
>>>>>
>>>>> + channel@348 {
>>>>> + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "usb_conn_temp";
>>>>> + };
>>>>> +
>>>>> channel@403 {
>>>>> reg = <PMR735A_ADC7_DIE_TEMP>;
>>>>> label = "pmr735a_die_temp";
>>>>> };
>>>>> +
>>>>> + channel@44a {
>>>>> + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "qtm_w_temp";
>>>>> + };
>>>>> +
>>>>> + channel@44b {
>>>>> + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
>>>>> + qcom,hw-settle-time = <200>;
>>>>> + qcom,ratiometric;
>>>>> + label = "qtm_n_temp";
>>>>> + };
>>>>> };
>>>>>
>>>>> &remoteproc_adsp {
>>>
>>>
>>>
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 16:15 ` Konrad Dybcio
@ 2023-06-30 17:42 ` Dmitry Baryshkov
2023-06-30 20:59 ` Bjorn Andersson
0 siblings, 1 reply; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 17:42 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On Fri, 30 Jun 2023 at 19:15, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.06.2023 14:57, Dmitry Baryshkov wrote:
> > On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>
> >> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> >>> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>>>
> >>>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> >>>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> >>>>> PMIC interface. This includes several onboard sensors and the XO thermal
> >>>>> sensor.
> >>>>>
> >>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>>>> ---
> >>>> [...]
> >>>>>
> >>>>> + channel@144 {
> >>>>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> >>>> This define should be cleaned up.. Since it takes a sid argument,
> >>>> it really is ADC7_AMUX_THM1_100K_PU(sid)
> >>>
> >>> I don't think I understood your comment. The define itself is specific
> >>> to PM8350, other PMICs might have different channel assignments.
> >>
> >> include/dt-bindings/iio/qcom,spmi-vadc.h
> >> 263:#define ADC7_AMUX_THM1_100K_PU 0x44
> >
> > Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
> > ADC7_AMUX_THM1_100K_PU ?
> > Or to make all users use ADC7_AMUX_THM1_100K_PU?
>
>
> >Or add the SID
> > argument to ADC7_AMUX_THM1_100K_PU and switch to it?
> This.
>
> Since we have a generic binding for it (not sure what sort of ABI-ish rules
> apply here, probably not very many since it's just a dumb preprocessor define),
> we should not redefine it for each PMIC, especially since the SIDs are variable
> nowadays :/
I think it would be worth to have per-PMIC headers (which define which
channels are available on this PMIC), but to use values from the
qcom,spmi-vadc.h header to define those per-PMIC values.
WDYT?
>
> Sorry for being too vague.
>
> Konrad
> >
> >>
> >> Konrad
> >>>
> >>>>
> >>>> Konrad
> >>>>
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "skin_msm_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@145 {
> >>>>> + reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "camera_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@146 {
> >>>>> + reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "therm1_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@147 {
> >>>>> + reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "wide_rfc_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@148 {
> >>>>> + reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "rear_tof_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@14c {
> >>>>> + reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "therm2_temp";
> >>>>> + };
> >>>>> +
> >>>>> channel@303 {
> >>>>> reg = <PM8350B_ADC7_DIE_TEMP>;
> >>>>> label = "pm8350b_die_temp";
> >>>>> };
> >>>>>
> >>>>> + channel@348 {
> >>>>> + reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "usb_conn_temp";
> >>>>> + };
> >>>>> +
> >>>>> channel@403 {
> >>>>> reg = <PMR735A_ADC7_DIE_TEMP>;
> >>>>> label = "pmr735a_die_temp";
> >>>>> };
> >>>>> +
> >>>>> + channel@44a {
> >>>>> + reg = <PMR735A_ADC7_GPIO1_100K_PU>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "qtm_w_temp";
> >>>>> + };
> >>>>> +
> >>>>> + channel@44b {
> >>>>> + reg = <PMR735A_ADC7_GPIO2_100K_PU>;
> >>>>> + qcom,hw-settle-time = <200>;
> >>>>> + qcom,ratiometric;
> >>>>> + label = "qtm_n_temp";
> >>>>> + };
> >>>>> };
> >>>>>
> >>>>> &remoteproc_adsp {
> >>>
> >>>
> >>>
> >
> >
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 17:42 ` Dmitry Baryshkov
@ 2023-06-30 20:59 ` Bjorn Andersson
2023-06-30 21:04 ` Dmitry Baryshkov
0 siblings, 1 reply; 25+ messages in thread
From: Bjorn Andersson @ 2023-06-30 20:59 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree
On Fri, Jun 30, 2023 at 08:42:23PM +0300, Dmitry Baryshkov wrote:
> On Fri, 30 Jun 2023 at 19:15, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >
> > On 30.06.2023 14:57, Dmitry Baryshkov wrote:
> > > On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > >>
> > >> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> > >>> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > >>>>
> > >>>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> > >>>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> > >>>>> PMIC interface. This includes several onboard sensors and the XO thermal
> > >>>>> sensor.
> > >>>>>
> > >>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > >>>>> ---
> > >>>> [...]
> > >>>>>
> > >>>>> + channel@144 {
> > >>>>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> > >>>> This define should be cleaned up.. Since it takes a sid argument,
> > >>>> it really is ADC7_AMUX_THM1_100K_PU(sid)
> > >>>
> > >>> I don't think I understood your comment. The define itself is specific
> > >>> to PM8350, other PMICs might have different channel assignments.
> > >>
> > >> include/dt-bindings/iio/qcom,spmi-vadc.h
> > >> 263:#define ADC7_AMUX_THM1_100K_PU 0x44
> > >
> > > Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
> > > ADC7_AMUX_THM1_100K_PU ?
> > > Or to make all users use ADC7_AMUX_THM1_100K_PU?
> >
> >
> > >Or add the SID
> > > argument to ADC7_AMUX_THM1_100K_PU and switch to it?
> > This.
> >
> > Since we have a generic binding for it (not sure what sort of ABI-ish rules
> > apply here, probably not very many since it's just a dumb preprocessor define),
> > we should not redefine it for each PMIC, especially since the SIDs are variable
> > nowadays :/
>
> I think it would be worth to have per-PMIC headers (which define which
> channels are available on this PMIC), but to use values from the
> qcom,spmi-vadc.h header to define those per-PMIC values.
>
> WDYT?
>
Note that the channel relates to this PMIC, but the sid is of the
measured PMIC. So I'm not sure which PMIC you're thinking of when you
say per-PMIC...
Regards,
Bjorn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones
2023-06-30 20:59 ` Bjorn Andersson
@ 2023-06-30 21:04 ` Dmitry Baryshkov
0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2023-06-30 21:04 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree
On Fri, 30 Jun 2023 at 23:59, Bjorn Andersson <quic_bjorande@quicinc.com> wrote:
>
> On Fri, Jun 30, 2023 at 08:42:23PM +0300, Dmitry Baryshkov wrote:
> > On Fri, 30 Jun 2023 at 19:15, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > >
> > > On 30.06.2023 14:57, Dmitry Baryshkov wrote:
> > > > On Fri, 30 Jun 2023 at 14:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > > >>
> > > >> On 30.06.2023 12:07, Dmitry Baryshkov wrote:
> > > >>> On Fri, 30 Jun 2023 at 11:19, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > > >>>>
> > > >>>> On 30.06.2023 08:13, Dmitry Baryshkov wrote:
> > > >>>>> Add thermal zones controlled through the ADC-TM (ADC thermal monitoring)
> > > >>>>> PMIC interface. This includes several onboard sensors and the XO thermal
> > > >>>>> sensor.
> > > >>>>>
> > > >>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > >>>>> ---
> > > >>>> [...]
> > > >>>>>
> > > >>>>> + channel@144 {
> > > >>>>> + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
> > > >>>> This define should be cleaned up.. Since it takes a sid argument,
> > > >>>> it really is ADC7_AMUX_THM1_100K_PU(sid)
> > > >>>
> > > >>> I don't think I understood your comment. The define itself is specific
> > > >>> to PM8350, other PMICs might have different channel assignments.
> > > >>
> > > >> include/dt-bindings/iio/qcom,spmi-vadc.h
> > > >> 263:#define ADC7_AMUX_THM1_100K_PU 0x44
> > > >
> > > > Do you want to define PM8350_ADC7_AMUX_THM1_100K_PU(sid) using
> > > > ADC7_AMUX_THM1_100K_PU ?
> > > > Or to make all users use ADC7_AMUX_THM1_100K_PU?
> > >
> > >
> > > >Or add the SID
> > > > argument to ADC7_AMUX_THM1_100K_PU and switch to it?
> > > This.
> > >
> > > Since we have a generic binding for it (not sure what sort of ABI-ish rules
> > > apply here, probably not very many since it's just a dumb preprocessor define),
> > > we should not redefine it for each PMIC, especially since the SIDs are variable
> > > nowadays :/
> >
> > I think it would be worth to have per-PMIC headers (which define which
> > channels are available on this PMIC), but to use values from the
> > qcom,spmi-vadc.h header to define those per-PMIC values.
> >
> > WDYT?
> >
>
> Note that the channel relates to this PMIC, but the sid is of the
> measured PMIC. So I'm not sure which PMIC you're thinking of when you
> say per-PMIC...
Not quite. Both sid and channel are for the peasuring PMIC (pm8350b,
pm8350, etc). On pmk8350 we further multiplex them into the 8 channels
of adc-tm.
>
> Regards,
> Bjorn
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2023-06-30 21:05 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 6:13 [PATCH 0/7] arm64: dts: qcom: sm8450-hdk: improve thermal monitoring Dmitry Baryshkov
2023-06-30 6:13 ` [PATCH 1/7] arm64: dts: qcom: pm8350: fix thermal zone name Dmitry Baryshkov
2023-06-30 8:11 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 2/7] arm64: dts: qcom: pm8350b: " Dmitry Baryshkov
2023-06-30 8:12 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 3/7] arm64: dts: qcom: pmr735b: " Dmitry Baryshkov
2023-06-30 8:12 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 4/7] arm64: dts: qcom: pmk8350: fix ADC-TM compatible string Dmitry Baryshkov
2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 10:11 ` Dmitry Baryshkov
2023-06-30 11:26 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 5/7] arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion Dmitry Baryshkov
2023-06-30 8:13 ` Konrad Dybcio
2023-06-30 8:25 ` Neil Armstrong
2023-06-30 6:13 ` [PATCH 6/7] arm64: dts: qcom: sm8450-hdk: define DIE_TEMP channels Dmitry Baryshkov
2023-06-30 8:15 ` Konrad Dybcio
2023-06-30 6:13 ` [PATCH 7/7] arm64: dts: qcom: sm8450-hdk: add ADC-TM thermal zones Dmitry Baryshkov
2023-06-30 8:19 ` Konrad Dybcio
2023-06-30 10:07 ` Dmitry Baryshkov
2023-06-30 11:27 ` Konrad Dybcio
2023-06-30 12:57 ` Dmitry Baryshkov
2023-06-30 16:15 ` Konrad Dybcio
2023-06-30 17:42 ` Dmitry Baryshkov
2023-06-30 20:59 ` Bjorn Andersson
2023-06-30 21:04 ` Dmitry Baryshkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.