[08/11] arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels

Message ID 20221027063006.9056-9-manivannan.sadhasivam@linaro.org
State New
Headers
Series Updates to sc8280xp-pmic |

Commit Message

Manivannan Sadhasivam Oct. 27, 2022, 6:30 a.m. UTC
  Add VADC channels for measuring the on-chip die temperature and external
crystal osciallator temperature of PMK8280.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
  

Comments

Krzysztof Kozlowski Oct. 27, 2022, 2:03 p.m. UTC | #1
On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> Add VADC channels for measuring the on-chip die temperature and external
> crystal osciallator temperature of PMK8280.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 6aa8cf6d9776..9ac5d5c22832 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -7,6 +7,7 @@
>  /dts-v1/;
>  
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  
>  #include "sc8280xp.dtsi"
> @@ -173,6 +174,23 @@ &pmk8280_pon_resin {
>  	status = "okay";
>  };
>  
> +&pmk8280_vadc {
> +	status = "okay";
> +
> +	pmk8280-die-temp@3 {

die-temp@

> +		reg = <PMK8350_ADC7_DIE_TEMP>;
> +		label = "pmk8280_die_temp";
> +		qcom,pre-scaling = <1 1>;
> +	};
> +
> +	pmk8280-xo-therm@44 {

xo-therm@



Best regards,
Krzysztof
  
Krzysztof Kozlowski Oct. 27, 2022, 2:04 p.m. UTC | #2
On 27/10/2022 10:03, Krzysztof Kozlowski wrote:
> On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
>> Add VADC channels for measuring the on-chip die temperature and external
>> crystal osciallator temperature of PMK8280.
>>
>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>> ---
>>  .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>> index 6aa8cf6d9776..9ac5d5c22832 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
>> @@ -7,6 +7,7 @@
>>  /dts-v1/;
>>  
>>  #include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
>>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>  
>>  #include "sc8280xp.dtsi"
>> @@ -173,6 +174,23 @@ &pmk8280_pon_resin {
>>  	status = "okay";
>>  };
>>  
>> +&pmk8280_vadc {
>> +	status = "okay";
>> +
>> +	pmk8280-die-temp@3 {
> 
> die-temp@

Hm, wait, unless this is the die temperature of pmk8280? But then how
about pmic-die-temp?


Best regards,
Krzysztof
  
Manivannan Sadhasivam Oct. 29, 2022, 4:45 a.m. UTC | #3
On Thu, Oct 27, 2022 at 10:04:24AM -0400, Krzysztof Kozlowski wrote:
> On 27/10/2022 10:03, Krzysztof Kozlowski wrote:
> > On 27/10/2022 02:30, Manivannan Sadhasivam wrote:
> >> Add VADC channels for measuring the on-chip die temperature and external
> >> crystal osciallator temperature of PMK8280.
> >>
> >> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >> ---
> >>  .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 18 ++++++++++++++++++
> >>  1 file changed, 18 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> >> index 6aa8cf6d9776..9ac5d5c22832 100644
> >> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> >> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> >> @@ -7,6 +7,7 @@
> >>  /dts-v1/;
> >>  
> >>  #include <dt-bindings/gpio/gpio.h>
> >> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> >>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> >>  
> >>  #include "sc8280xp.dtsi"
> >> @@ -173,6 +174,23 @@ &pmk8280_pon_resin {
> >>  	status = "okay";
> >>  };
> >>  
> >> +&pmk8280_vadc {
> >> +	status = "okay";
> >> +
> >> +	pmk8280-die-temp@3 {
> > 
> > die-temp@
> 
> Hm, wait, unless this is the die temperature of pmk8280? But then how
> about pmic-die-temp?

Yes, this is the die temperature of PMK8280, so "pmic-die-temp" makes sense.

Thanks,
Mani

> 
> 
> Best regards,
> Krzysztof
>
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 6aa8cf6d9776..9ac5d5c22832 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -7,6 +7,7 @@ 
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
 #include "sc8280xp.dtsi"
@@ -173,6 +174,23 @@  &pmk8280_pon_resin {
 	status = "okay";
 };
 
+&pmk8280_vadc {
+	status = "okay";
+
+	pmk8280-die-temp@3 {
+		reg = <PMK8350_ADC7_DIE_TEMP>;
+		label = "pmk8280_die_temp";
+		qcom,pre-scaling = <1 1>;
+	};
+
+	pmk8280-xo-therm@44 {
+		reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+		label = "pmk8280_xo_therm";
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+	};
+};
+
 &qup0 {
 	status = "okay";
 };