linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1 0/2] qcom: pms405: adc fixes
@ 2019-03-20 13:39 Amit Kucheria
  2019-03-20 13:39 ` [PATCHv1 1/2] arm64: dts: qcom: pms405: calibrate the VADC correctly Amit Kucheria
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Amit Kucheria @ 2019-03-20 13:39 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, bjorn.andersson, andy.gross, David Brown
  Cc: devicetree

A couple of fixes to the adc node in PMS405 to get thermistors to work
correctly.

Amit Kucheria (2):
  arm64: dts: qcom: pms405: calibrate the VADC correctly
  arm64: dts: qcom: pms405: Rename adc outputs as per schematics

 arch/arm64/boot/dts/qcom/pms405.dtsi | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv1 1/2] arm64: dts: qcom: pms405: calibrate the VADC correctly
  2019-03-20 13:39 [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
@ 2019-03-20 13:39 ` Amit Kucheria
  2019-03-20 13:39 ` [PATCHv1 2/2] arm64: dts: qcom: pms405: Rename adc outputs as per schematics Amit Kucheria
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Amit Kucheria @ 2019-03-20 13:39 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, bjorn.andersson, andy.gross, David Brown
  Cc: devicetree

Set the qcom,ratiometric property to make the VADC use the VDD reference
(1.875V) and GND for channel calibration of the temperature channels
instead of 1.25V. Allow a 200us delay between the AMUX configuration and
ADC starting conversion using qcom,hw-settle-time as described in
documentation.

Fixes: 041b9a7b9fdb ("arm64: dts: pms405: Export PMIC temperature to thermal framework")
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pms405.dtsi b/arch/arm64/boot/dts/qcom/pms405.dtsi
index 1bb836d1e8aa..8b6aa2334f56 100644
--- a/arch/arm64/boot/dts/qcom/pms405.dtsi
+++ b/arch/arm64/boot/dts/qcom/pms405.dtsi
@@ -110,16 +110,22 @@
 
 			xo_therm_100k_pu {
 				reg = <ADC5_XO_THERM_100K_PU>;
+				qcom,ratiometric;
+				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
 			};
 
 			amux_thm1_100k_pu {
 				reg = <ADC5_AMUX_THM1_100K_PU>;
+				qcom,ratiometric;
+				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
 			};
 
 			amux_thm3_100k_pu {
 				reg = <ADC5_AMUX_THM3_100K_PU>;
+				qcom,ratiometric;
+				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
 			};
 		};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv1 2/2] arm64: dts: qcom: pms405: Rename adc outputs as per schematics
  2019-03-20 13:39 [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
  2019-03-20 13:39 ` [PATCHv1 1/2] arm64: dts: qcom: pms405: calibrate the VADC correctly Amit Kucheria
@ 2019-03-20 13:39 ` Amit Kucheria
  2019-04-26 21:08 ` [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
  2019-04-27  4:38 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Amit Kucheria @ 2019-03-20 13:39 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, bjorn.andersson, andy.gross, David Brown
  Cc: devicetree

The adc outputs shouldn't contain information about their configuration
e.g. 100K pull-up, but just reflect the name of the signal in the
schematics.

Making them labels also allows us to overwrite their configuration in
board-specific DTs.

Sort them by order as used in adc5_chans_rev2, while we're at it.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pms405.dtsi b/arch/arm64/boot/dts/qcom/pms405.dtsi
index 8b6aa2334f56..37c8bea24796 100644
--- a/arch/arm64/boot/dts/qcom/pms405.dtsi
+++ b/arch/arm64/boot/dts/qcom/pms405.dtsi
@@ -98,7 +98,7 @@
 				qcom,pre-scaling = <1 1>;
 			};
 
-			vph_pwr {
+			pon_1: vph_pwr {
 				reg = <ADC5_VPH_PWR>;
 				qcom,pre-scaling = <1 3>;
 			};
@@ -108,22 +108,22 @@
 				qcom,pre-scaling = <1 1>;
 			};
 
-			xo_therm_100k_pu {
-				reg = <ADC5_XO_THERM_100K_PU>;
+			pa_therm1: thermistor1 {
+				reg = <ADC5_AMUX_THM1_100K_PU>;
 				qcom,ratiometric;
 				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
 			};
 
-			amux_thm1_100k_pu {
-				reg = <ADC5_AMUX_THM1_100K_PU>;
+			pa_therm3: thermistor3 {
+				reg = <ADC5_AMUX_THM3_100K_PU>;
 				qcom,ratiometric;
 				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
 			};
 
-			amux_thm3_100k_pu {
-				reg = <ADC5_AMUX_THM3_100K_PU>;
+			xo_therm: xo_temp {
+				reg = <ADC5_XO_THERM_100K_PU>;
 				qcom,ratiometric;
 				qcom,hw-settle-time = <200>;
 				qcom,pre-scaling = <1 1>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv1 0/2] qcom: pms405: adc fixes
  2019-03-20 13:39 [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
  2019-03-20 13:39 ` [PATCHv1 1/2] arm64: dts: qcom: pms405: calibrate the VADC correctly Amit Kucheria
  2019-03-20 13:39 ` [PATCHv1 2/2] arm64: dts: qcom: pms405: Rename adc outputs as per schematics Amit Kucheria
@ 2019-04-26 21:08 ` Amit Kucheria
  2019-04-27  4:38 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Amit Kucheria @ 2019-04-26 21:08 UTC (permalink / raw)
  To: LKML, linux-arm-msm, Bjorn Andersson, Andy Gross, David Brown
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Wed, Mar 20, 2019 at 7:10 PM Amit Kucheria <amit.kucheria@linaro.org> wrote:
>
> A couple of fixes to the adc node in PMS405 to get thermistors to work
> correctly.
>
> Amit Kucheria (2):
>   arm64: dts: qcom: pms405: calibrate the VADC correctly
>   arm64: dts: qcom: pms405: Rename adc outputs as per schematics
>
>  arch/arm64/boot/dts/qcom/pms405.dtsi | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)

Ping!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv1 0/2] qcom: pms405: adc fixes
  2019-03-20 13:39 [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
                   ` (2 preceding siblings ...)
  2019-04-26 21:08 ` [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
@ 2019-04-27  4:38 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2019-04-27  4:38 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: linux-kernel, linux-arm-msm, andy.gross, David Brown, devicetree

On Wed 20 Mar 06:39 PDT 2019, Amit Kucheria wrote:

> A couple of fixes to the adc node in PMS405 to get thermistors to work
> correctly.
> 
> Amit Kucheria (2):
>   arm64: dts: qcom: pms405: calibrate the VADC correctly
>   arm64: dts: qcom: pms405: Rename adc outputs as per schematics
> 

Picked up the pair

Thanks,
Bjorn

>  arch/arm64/boot/dts/qcom/pms405.dtsi | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)
> 
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-27  4:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 13:39 [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
2019-03-20 13:39 ` [PATCHv1 1/2] arm64: dts: qcom: pms405: calibrate the VADC correctly Amit Kucheria
2019-03-20 13:39 ` [PATCHv1 2/2] arm64: dts: qcom: pms405: Rename adc outputs as per schematics Amit Kucheria
2019-04-26 21:08 ` [PATCHv1 0/2] qcom: pms405: adc fixes Amit Kucheria
2019-04-27  4:38 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).