Loading Documentation/devicetree/bindings/power/supply/qcom/qpnp-fg-gen4.txt +40 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,46 @@ First Level Node - FG Gen4 device Element 0 - Retry value for timer Element 1 - Maximum value for timer - qcom,fg-esr-cal-soc-thresh Usage: optional Value type: <prop-encoded-array> Definition: SOC thresholds applied when ESR fast calibration is done. Array of 2 elements if specified. This should be specified if ESR fast calibration algorithm is needed. Element 0 - Minimum SOC threshold in percentage Element 1 - Maximum SOC threshold in percentage - qcom,fg-esr-cal-temp-thresh Usage: optional Value type: <prop-encoded-array> Definition: Battery temperature thresholds applied when ESR fast calibration is done. Array of 2 elements if specified. This should be specified if ESR fast calibration algorithm is needed. Element 0 - Minimum temperature threshold in Celsius Element 1 - Maximum temperature threshold in Celsius - qcom,fg-delta-esr-disable-count Usage: optional Value type: <u32> Definition: Value after which delta ESR interrupt will be disabled. This is applicable only when ESR fast calibration is enabled. Default value is 10. - qcom,fg-delta-esr-thr Usage: optional Value type: <u32> Definition: Threshold for delta ESR interrupt in uOhms. Default value is 1832. If ESR fast calibration algorithm is enabled, this will be overridden with a maximum value. - qcom,fg-esr-filter-factor Usage: optional Value type: <u32> Definition: ESR filter factor used in ESR fast calibration algorithm. This factor will be used when ESR correction delta is applied after the calculation. Default value is 2. - qcom,fg-esr-pulse-thresh-ma Usage: optional Value type: <u32> Loading arch/arm64/boot/dts/qcom/sm8150-mtp.dtsi +7 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,13 @@ qcom,battery-data = <&mtp_batterydata>; qcom,hold-soc-while-full; qcom,linearize-soc; /* ESR fast calibration */ qcom,fg-esr-timer-chg-fast = <0 10>; qcom,fg-esr-timer-dischg-fast = <0 10>; 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_2 { Loading drivers/power/supply/qcom/fg-core.h +9 −0 Original line number Diff line number Diff line Loading @@ -63,10 +63,14 @@ #define SRAM_WRITE "fg_sram_write" #define PROFILE_LOAD "fg_profile_load" #define TTF_PRIMING "fg_ttf_priming" #define ESR_CALIB "fg_esr_calib" /* Delta BSOC irq votable reasons */ #define DELTA_BSOC_IRQ_VOTER "fg_delta_bsoc_irq" /* Delta ESR irq votable reasons */ #define DELTA_ESR_IRQ_VOTER "fg_delta_esr_irq" /* Battery missing irq votable reasons */ #define BATT_MISS_IRQ_VOTER "fg_batt_miss_irq" Loading Loading @@ -205,6 +209,11 @@ enum fg_sram_param_id { FG_SRAM_SLOPE_LIMIT, FG_SRAM_BATT_TEMP_COLD, FG_SRAM_BATT_TEMP_HOT, FG_SRAM_ESR_CAL_SOC_MIN, FG_SRAM_ESR_CAL_SOC_MAX, FG_SRAM_ESR_CAL_TEMP_MIN, FG_SRAM_ESR_CAL_TEMP_MAX, FG_SRAM_DELTA_ESR_THR, FG_SRAM_MAX, }; Loading drivers/power/supply/qcom/qpnp-fg-gen4.c +538 −27 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
Documentation/devicetree/bindings/power/supply/qcom/qpnp-fg-gen4.txt +40 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,46 @@ First Level Node - FG Gen4 device Element 0 - Retry value for timer Element 1 - Maximum value for timer - qcom,fg-esr-cal-soc-thresh Usage: optional Value type: <prop-encoded-array> Definition: SOC thresholds applied when ESR fast calibration is done. Array of 2 elements if specified. This should be specified if ESR fast calibration algorithm is needed. Element 0 - Minimum SOC threshold in percentage Element 1 - Maximum SOC threshold in percentage - qcom,fg-esr-cal-temp-thresh Usage: optional Value type: <prop-encoded-array> Definition: Battery temperature thresholds applied when ESR fast calibration is done. Array of 2 elements if specified. This should be specified if ESR fast calibration algorithm is needed. Element 0 - Minimum temperature threshold in Celsius Element 1 - Maximum temperature threshold in Celsius - qcom,fg-delta-esr-disable-count Usage: optional Value type: <u32> Definition: Value after which delta ESR interrupt will be disabled. This is applicable only when ESR fast calibration is enabled. Default value is 10. - qcom,fg-delta-esr-thr Usage: optional Value type: <u32> Definition: Threshold for delta ESR interrupt in uOhms. Default value is 1832. If ESR fast calibration algorithm is enabled, this will be overridden with a maximum value. - qcom,fg-esr-filter-factor Usage: optional Value type: <u32> Definition: ESR filter factor used in ESR fast calibration algorithm. This factor will be used when ESR correction delta is applied after the calculation. Default value is 2. - qcom,fg-esr-pulse-thresh-ma Usage: optional Value type: <u32> Loading
arch/arm64/boot/dts/qcom/sm8150-mtp.dtsi +7 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,13 @@ qcom,battery-data = <&mtp_batterydata>; qcom,hold-soc-while-full; qcom,linearize-soc; /* ESR fast calibration */ qcom,fg-esr-timer-chg-fast = <0 10>; qcom,fg-esr-timer-dischg-fast = <0 10>; 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_2 { Loading
drivers/power/supply/qcom/fg-core.h +9 −0 Original line number Diff line number Diff line Loading @@ -63,10 +63,14 @@ #define SRAM_WRITE "fg_sram_write" #define PROFILE_LOAD "fg_profile_load" #define TTF_PRIMING "fg_ttf_priming" #define ESR_CALIB "fg_esr_calib" /* Delta BSOC irq votable reasons */ #define DELTA_BSOC_IRQ_VOTER "fg_delta_bsoc_irq" /* Delta ESR irq votable reasons */ #define DELTA_ESR_IRQ_VOTER "fg_delta_esr_irq" /* Battery missing irq votable reasons */ #define BATT_MISS_IRQ_VOTER "fg_batt_miss_irq" Loading Loading @@ -205,6 +209,11 @@ enum fg_sram_param_id { FG_SRAM_SLOPE_LIMIT, FG_SRAM_BATT_TEMP_COLD, FG_SRAM_BATT_TEMP_HOT, FG_SRAM_ESR_CAL_SOC_MIN, FG_SRAM_ESR_CAL_SOC_MAX, FG_SRAM_ESR_CAL_TEMP_MIN, FG_SRAM_ESR_CAL_TEMP_MAX, FG_SRAM_DELTA_ESR_THR, FG_SRAM_MAX, }; Loading
drivers/power/supply/qcom/qpnp-fg-gen4.c +538 −27 File changed.Preview size limit exceeded, changes collapsed. Show changes