Message ID | 20221027063006.9056-1-manivannan.sadhasivam@linaro.org |
---|---|
Headers | show |
Series | Updates to sc8280xp-pmic | expand |
On 27/10/2022 02:29, Manivannan Sadhasivam wrote: > Add support for temperature alarm feature in the PM8280_{1/2} PMICs. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 27/10/2022 02:29, Manivannan Sadhasivam wrote: > Add thermal zones for the PM8280_{1/2} PMICs by using the temperature > alarm blocks as the thermal sensors. Temperature trip points are > inheried from PM8350 PMIC. inherited > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- With above: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 27/10/2022 02:29, Manivannan Sadhasivam wrote: > The RESIN input can be used to reset the PMK8280 PMIC. Enabling the > RESIN block allows the PMK8280 to detect reset input via RESIN_N pin. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > Add support for ADC7 block available in PMK8280 for reading the > temperature via the AMUX pins. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi > index 4a3464f5e6e9..32086d5edd0d 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi > @@ -75,6 +75,17 @@ pmk8280_pon_resin: resin { > status = "disabled"; > }; > }; > + > + pmk8280_vadc: adc@3100 { > + compatible = "qcom,spmi-adc7"; > + reg = <0x3100>; > + #address-cells = <1>; > + #size-cells = <0>; > + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; > + interrupt-names = "eoc-int-en-set"; Schema does not accept this. Be sure `make dtbs_check` passes. Best regards, Krzysztof
On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the > temperature from slave PMICs like PM8280. > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > Enable resetting the PMK8280 through RESIN block in SC8280XP X13s. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++ > 1 file changed, 4 insertions(+) > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
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
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
On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die > temperature and external thermistors connected to the AMUX pins. > > The measurements are collected by the primary PMIC PMK8280 from the > slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC secondary PMICs Drop "them" > channels. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 61 +++++++++++++++++++ > 1 file changed, 61 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 9ac5d5c22832..d300d217fdc6 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-pm8350.h> > #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h> > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > > @@ -189,6 +190,66 @@ pmk8280-xo-therm@44 { > qcom,ratiometric; > qcom,hw-settle-time = <200>; > }; > + > + pm8280-1-die-temp@103 { pmic-die-temp? What pm8280 stands here? > + reg = <PM8350_ADC7_DIE_TEMP(1)>; > + label = "pm8280_1_die_temp"; > + qcom,pre-scaling = <1 1>; > + }; > + > + sys-therm1@144 { I would say sys-therm@... why do we need the "1" suffix in node name? > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>; > + qcom,ratiometric; > + qcom,hw-settle-time = <200>; > + }; Best regards, Krzysztof
On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperatures from > external thermistors connected to AMUX pins. The temperture measurements temperature > are collected from the PMK8280's VADC channels that expose the > mesasurements from slave PMICs PM8280_{1/2}. measurements slave->secondary Other comments about node names stay as well, but it depends on the previous discussion. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 68 +++++++++++++++++++ > 1 file changed, 68 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 babf594384f2..fe6b75551ab9 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -259,6 +259,74 @@ pmr735a-die-temp@403 { > }; > }; > Best regards, Krzysztof
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 >
On Thu, Oct 27, 2022 at 10:09:21AM -0400, Krzysztof Kozlowski wrote: > On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > > Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die > > temperature and external thermistors connected to the AMUX pins. > > > > The measurements are collected by the primary PMIC PMK8280 from the > > slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC > > secondary PMICs > > Drop "them" > > > > channels. > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > --- > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 61 +++++++++++++++++++ > > 1 file changed, 61 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 9ac5d5c22832..d300d217fdc6 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-pm8350.h> > > #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h> > > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > > > > @@ -189,6 +190,66 @@ pmk8280-xo-therm@44 { > > qcom,ratiometric; > > qcom,hw-settle-time = <200>; > > }; > > + > > + pm8280-1-die-temp@103 { > > pmic-die-temp? What pm8280 stands here? > As agreed, will use "pmic-die-temp" > > > + reg = <PM8350_ADC7_DIE_TEMP(1)>; > > + label = "pm8280_1_die_temp"; > > + qcom,pre-scaling = <1 1>; > > + }; > > + > > + sys-therm1@144 { > > I would say sys-therm@... why do we need the "1" suffix in node name? > Suffix represents the index of the thermistor as per the schematics but I guess it can be dropped. Thanks, Mani > > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>; > > + qcom,ratiometric; > > + qcom,hw-settle-time = <200>; > > + }; > > Best regards, > Krzysztof >
On Sat, Oct 29, 2022 at 10:18:37AM +0530, Manivannan Sadhasivam wrote: > On Thu, Oct 27, 2022 at 10:09:21AM -0400, Krzysztof Kozlowski wrote: > > On 27/10/2022 02:30, Manivannan Sadhasivam wrote: > > > Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die > > > temperature and external thermistors connected to the AMUX pins. > > > > > > The measurements are collected by the primary PMIC PMK8280 from the > > > slave PMICs PM8280_{1/2} and exposed them over the PMK8280's VADC > > > > secondary PMICs > > > > Drop "them" > > > > > > > channels. > > > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > > --- > > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 61 +++++++++++++++++++ > > > 1 file changed, 61 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 9ac5d5c22832..d300d217fdc6 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-pm8350.h> > > > #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h> > > > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > > > > > > @@ -189,6 +190,66 @@ pmk8280-xo-therm@44 { > > > qcom,ratiometric; > > > qcom,hw-settle-time = <200>; > > > }; > > > + > > > + pm8280-1-die-temp@103 { > > > > pmic-die-temp? What pm8280 stands here? > > > > As agreed, will use "pmic-die-temp" > > > > > > + reg = <PM8350_ADC7_DIE_TEMP(1)>; > > > + label = "pm8280_1_die_temp"; > > > + qcom,pre-scaling = <1 1>; > > > + }; > > > + > > > + sys-therm1@144 { > > > > I would say sys-therm@... why do we need the "1" suffix in node name? > > > > Suffix represents the index of the thermistor as per the schematics but I guess > it can be dropped. > I was wrong. Suffix is necessary since IIO core registers the channel based on the node name, so it has to be unique. Thanks, Mani > Thanks, > Mani > > > > + reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>; > > > + qcom,ratiometric; > > > + qcom,hw-settle-time = <200>; > > > + }; > > > > Best regards, > > Krzysztof > > > > -- > மணிவண்ணன் சதாசிவம்
On 30/10/2022 03:16, Manivannan Sadhasivam wrote: >>> >>>> + reg = <PM8350_ADC7_DIE_TEMP(1)>; >>>> + label = "pm8280_1_die_temp"; >>>> + qcom,pre-scaling = <1 1>; >>>> + }; >>>> + >>>> + sys-therm1@144 { >>> >>> I would say sys-therm@... why do we need the "1" suffix in node name? >>> >> >> Suffix represents the index of the thermistor as per the schematics but I guess >> it can be dropped. >> > > I was wrong. Suffix is necessary since IIO core registers the channel based on > the node name, so it has to be unique. > Makes sense then. Best regards, Krzysztof