blob: 2c8cef0a30ae9a99329c177a652d7ee03a4cd100 [file] [log] [blame]
/* Copyright (c) 2018-2019, 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";
};
pa-therm1-usr {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM1_PU2>;
thermal-governor = "user_space";
};
pa-therm2-usr {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM2_PU2>;
thermal-governor = "user_space";
};
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";
};
ambient-therm-usr {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmxprairie_adc_tm_iio ADC_GPIO1_PU2>;
thermal-governor = "user_space";
};
};
&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>;
};
&sdhc_1 {
vdd-supply = <&vreg_sd_vdd>;
qcom,vdd-voltage-level = <2950000 2950000>;
qcom,vdd-current-level = <0 800000>;
vdd-io-supply = <&vreg_vddpx_2>;
qcom,vdd-io-voltage-level = <1800000 2850000>;
qcom,vdd-io-current-level = <0 10000>;
pinctrl-names = "active", "sleep";
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_cd_on>;
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_cd_off>;
qcom,clk-rates = <400000 20000000 25000000 50000000 100000000
200000000>;
qcom,devfreq,freq-table = <50000000 200000000>;
cd-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;
status = "ok";
};