From 31f00ae5f0602614ff227b4a0d58a211d249d350 Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Wed, 1 Sep 2021 21:26:44 +0530 Subject: [PATCH 1/2] dt-bindings: thermal: Add support to scale ibat current range to bcl driver Add support to scale ibat current for greater than default max supported ranges using range factor provided from nvmem. Change-Id: I63cc53cdba021300839695e9378fc320d57b2840 --- bindings/thermal/qcom-bcl-pmic5.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bindings/thermal/qcom-bcl-pmic5.txt b/bindings/thermal/qcom-bcl-pmic5.txt index be9e2e0dcde5..6849dc7f1e11 100644 --- a/bindings/thermal/qcom-bcl-pmic5.txt +++ b/bindings/thermal/qcom-bcl-pmic5.txt @@ -41,6 +41,20 @@ Optional Parameters: current monitoring(CCM) hardware for battery current monitor. +- nvmem-cells: + Value type: + Definition: phandle pointing to a nvmem-cells node representing the + sdam registers that has information of ibat scaling range + factor.When defined, the bcl driver will use it to + scale ibat current greater than default supported range. + +- nvmem-cell-names: + Value type: + Definition: Specifies the given nvmem cell name as defined in + sdam node. + Documentation/devicetree/bindings/nvmem/nvmem.txt and also + example below. + Example: bcl@4200 { compatible = "qcom,bcl-v5"; @@ -51,4 +65,6 @@ Example: "bcl-lvl1"; qcom,pmic7-threshold; qcom,ibat-ccm-hw-support; + nvmem-cells = <&adc_scaling>; + nvmem-cell-names = "adc_scaling"; }; From 40662987aa5bc31b415be67073c4f4accf5668d0 Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Sat, 28 Aug 2021 00:53:56 +0530 Subject: [PATCH 2/2] ARM: dts: qcom: Add support to read ibat_external_range from nvmem for yupik Add nvmem property cells to support ibat range factor reading. Change-Id: I6c400221325b98c1af066999200874b6643d6e36 --- qcom/yupik-pm7250b-thermal-overlay.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcom/yupik-pm7250b-thermal-overlay.dtsi b/qcom/yupik-pm7250b-thermal-overlay.dtsi index b8096d2db3e9..359b1e081b24 100644 --- a/qcom/yupik-pm7250b-thermal-overlay.dtsi +++ b/qcom/yupik-pm7250b-thermal-overlay.dtsi @@ -8,6 +8,11 @@ #cooling-cells = <2>; }; +&pm7250b_bcl { + nvmem-cells = <&adc_scaling>; + nvmem-cell-names = "adc_scaling"; +}; + &thermal_zones { socd { cooling-maps {