263 lines
5.3 KiB
Devicetree
263 lines
5.3 KiB
Devicetree
/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#include "sdxprairie-pmic-overlay.dtsi"
|
|
#include "sdxprairie-mtp-audio-overlay.dtsi"
|
|
|
|
&pmxprairie_vadc {
|
|
vph_pwr {
|
|
reg = <ADC_VPH_PWR>;
|
|
label = "vph_pwr";
|
|
qcom,pre-scaling = <1 3>;
|
|
};
|
|
|
|
xo_therm {
|
|
reg = <ADC_XO_THERM_PU2>;
|
|
label = "xo_therm";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
pa_therm1 {
|
|
reg = <ADC_AMUX_THM1_PU2>;
|
|
label = "pa_therm1";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
pa_therm2 {
|
|
reg = <ADC_AMUX_THM2_PU2>;
|
|
label = "pa_therm2";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
sdx_case_therm {
|
|
reg = <ADC_AMUX_THM3_PU2>;
|
|
label = "sdx_case_therm";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
ambient_therm {
|
|
reg = <ADC_GPIO1_PU2>;
|
|
label = "ambient_therm";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
};
|
|
|
|
&pmxprairie_adc_tm_iio {
|
|
xo_therm {
|
|
reg = <ADC_XO_THERM_PU2>;
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
};
|
|
|
|
pa_therm1 {
|
|
reg = <ADC_AMUX_THM1_PU2>;
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
};
|
|
|
|
pa_therm2 {
|
|
reg = <ADC_AMUX_THM2_PU2>;
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
};
|
|
|
|
sdx_case_therm {
|
|
reg = <ADC_AMUX_THM3_PU2>;
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
};
|
|
|
|
ambient_therm {
|
|
reg = <ADC_GPIO1_PU2>;
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
};
|
|
};
|
|
|
|
&pm8150b_vadc {
|
|
vph_pwr {
|
|
reg = <ADC_VPH_PWR>;
|
|
label = "vph_pwr";
|
|
qcom,pre-scaling = <1 3>;
|
|
};
|
|
|
|
conn_therm {
|
|
reg = <ADC_AMUX_THM3_PU2>;
|
|
label = "conn_therm";
|
|
qcom,ratiometric;
|
|
qcom,hw-settle-time = <200>;
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
chg_sbux {
|
|
reg = <ADC_SBUx>;
|
|
label = "chg_sbux";
|
|
qcom,pre-scaling = <1 3>;
|
|
};
|
|
|
|
mid_chg_div6 {
|
|
reg = <ADC_MID_CHG_DIV6>;
|
|
label = "chg_mid";
|
|
qcom,pre-scaling = <1 6>;
|
|
};
|
|
|
|
usb_in_i_uv {
|
|
reg = <ADC_USB_IN_I>;
|
|
label = "usb_in_i_uv";
|
|
qcom,pre-scaling = <1 1>;
|
|
};
|
|
|
|
usb_in_v_div_16 {
|
|
reg = <ADC_USB_IN_V_16>;
|
|
label = "usb_in_v_div_16";
|
|
qcom,pre-scaling = <1 16>;
|
|
};
|
|
};
|
|
|
|
&pm8150b_adc_tm {
|
|
status = "disabled";
|
|
};
|
|
|
|
&thermal_zones {
|
|
xo-therm-usr {
|
|
polling-delay-passive = <0>;
|
|
polling-delay = <0>;
|
|
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_XO_THERM_PU2>;
|
|
thermal-governor = "user_space";
|
|
wake-capable-sensor;
|
|
|
|
trips {
|
|
active-config0 {
|
|
temperature = <125000>;
|
|
hysteresis = <1000>;
|
|
type = "passive";
|
|
};
|
|
};
|
|
};
|
|
|
|
pa-therm1-usr {
|
|
polling-delay-passive = <0>;
|
|
polling-delay = <0>;
|
|
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM1_PU2>;
|
|
thermal-governor = "user_space";
|
|
wake-capable-sensor;
|
|
|
|
trips {
|
|
active-config0 {
|
|
temperature = <125000>;
|
|
hysteresis = <1000>;
|
|
type = "passive";
|
|
};
|
|
};
|
|
};
|
|
|
|
pa-therm2-usr {
|
|
polling-delay-passive = <0>;
|
|
polling-delay = <0>;
|
|
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM2_PU2>;
|
|
thermal-governor = "user_space";
|
|
wake-capable-sensor;
|
|
|
|
trips {
|
|
active-config0 {
|
|
temperature = <125000>;
|
|
hysteresis = <1000>;
|
|
type = "passive";
|
|
};
|
|
};
|
|
};
|
|
|
|
sdx-case-therm-usr {
|
|
polling-delay-passive = <0>;
|
|
polling-delay = <0>;
|
|
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM3_PU2>;
|
|
thermal-governor = "user_space";
|
|
wake-capable-sensor;
|
|
|
|
trips {
|
|
active-config0 {
|
|
temperature = <125000>;
|
|
hysteresis = <1000>;
|
|
type = "passive";
|
|
};
|
|
};
|
|
};
|
|
|
|
ambient-therm-usr {
|
|
polling-delay-passive = <0>;
|
|
polling-delay = <0>;
|
|
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_GPIO1_PU2>;
|
|
thermal-governor = "user_space";
|
|
wake-capable-sensor;
|
|
|
|
trips {
|
|
active-config0 {
|
|
temperature = <125000>;
|
|
hysteresis = <1000>;
|
|
type = "passive";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&soc {
|
|
sdxprairie_mtp_batterydata: qcom,battery-data {
|
|
qcom,batt-id-range-pct = <15>;
|
|
#include "fg-gen4-batterydata-alium-3600mah.dtsi"
|
|
};
|
|
};
|
|
|
|
&pm8150b_charger {
|
|
qcom,sec-charger-config = <0>;
|
|
qcom,auto-recharge-soc = <98>;
|
|
io-channels = <&pm8150b_vadc ADC_MID_CHG_DIV6>,
|
|
<&pm8150b_vadc ADC_USB_IN_I>,
|
|
<&pm8150b_vadc ADC_SBUx>,
|
|
<&pm8150b_vadc ADC_VPH_PWR>,
|
|
<&pm8150b_vadc ADC_CHG_TEMP>,
|
|
<&pm8150b_vadc ADC_USB_IN_V_16>;
|
|
io-channel-names = "mid_voltage",
|
|
"usb_in_current",
|
|
"sbux_res",
|
|
"vph_voltage",
|
|
"chg_temp",
|
|
"usb_in_voltage";
|
|
qcom,battery-data = <&sdxprairie_mtp_batterydata>;
|
|
qcom,step-charging-enable;
|
|
qcom,wd-bark-time-secs = <16>;
|
|
qcom,suspend-input-on-debug-batt;
|
|
};
|
|
|
|
&pm8150b_fg {
|
|
qcom,battery-data = <&sdxprairie_mtp_batterydata>;
|
|
qcom,hold-soc-while-full;
|
|
qcom,linearize-soc;
|
|
qcom,five-pin-battery;
|
|
/* ESR fast calibration */
|
|
qcom,fg-esr-timer-chg-fast = <0 7>;
|
|
qcom,fg-esr-timer-dischg-fast = <0 7>;
|
|
qcom,fg-esr-timer-chg-slow = <0 96>;
|
|
qcom,fg-esr-timer-dischg-slow = <0 96>;
|
|
qcom,fg-esr-cal-soc-thresh = <26 230>;
|
|
qcom,fg-esr-cal-temp-thresh = <10 40>;
|
|
};
|