qcom: pms405: adc fixes
cover qcom: pms405: adc fixes
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(-)
Signature · 1 line
2.17.1
PATCH 1/2 arm64: dts: qcom: pms405: calibrate the VADC correctly
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.
--- arch/arm64/boot/dts/qcom/pms405.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +6 -0
@@ -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>; }; };
Signature · 1 line
2.17.1
PATCH 2/2 arm64: dts: qcom: pms405: Rename adc outputs as per schematics
In reply to Amit KucheriaThe 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.
--- arch/arm64/boot/dts/qcom/pms405.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/qcom/pms405.dtsi +7 -7
@@ -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>;
Signature · 1 line
2.17.1
Quoted 10 lines · Amit Kucheria
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 schematicsarch/arm64/boot/dts/qcom/pms405.dtsi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
Ping!
Quoted 7 lines · Amit Kucheria
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
Quoted 6 lines
arch/arm64/boot/dts/qcom/pms405.dtsi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)Signature · 1 line
2.17.1