diff options
author | Manaf Meethalavalappu Pallikunhi <manafm@qti.qualcomm.com> | 2021-02-08 00:38:35 +0530 |
---|---|---|
committer | Manaf Meethalavalappu Pallikunhi <manafm@qti.qualcomm.com> | 2021-03-15 12:24:48 +0530 |
commit | 8aae54347c86d3a7c084cfe08999184a5a97805a (patch) | |
tree | 77a12442958f0f7400d1a0394d4add9cb4e0af7c /bindings | |
parent | f1dc360d4312377aad8ab64e70ebb34800b02c1c (diff) | |
download | devicetree-8aae54347c86d3a7c084cfe08999184a5a97805a.tar.gz |
dt-bindings: thermal: Add driver to modify thermal zone based on efuse
Add dt-bindings for driver to enable/disable pre-configured thermal
zones selectively at runtime based on efuse value. It uses QFPROM
nvmem cell interface to read efuse data. It supports multiple
efuse condtion.
Change-Id: I711e8aba423eaa95a2a2c4d5f9755bfc61850b6d
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/thermal/qcom-thermal-efprom.txt | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/bindings/thermal/qcom-thermal-efprom.txt b/bindings/thermal/qcom-thermal-efprom.txt new file mode 100644 index 00000000..d9e50103 --- /dev/null +++ b/bindings/thermal/qcom-thermal-efprom.txt @@ -0,0 +1,73 @@ +Modify Thermal Zone based on efuse data + +This driver is to enable/disable pre-configured thermal +zones selectively at runtime based on efuse data. It uses QFPROM +nvmem cell interface to read efuse data. It supports multiple +efuse condition. If any of the efuse condition fails, driver just +exits with default enabled thermal zones. + +Properties: + +- compatible: + Usage: Required + Value type: <string> + Definition: shall be "qcom,thermal-qfprom-device". + +- nvmem-cells: + Usage: Required + Value type: <array of phandle> + Definition: Array of phandles pointing to a nvmem-cells node + representing the efuse registers that has information that + is used to select the right thermal zone to enable. + Please refer nvmem-cells bindings + Documentation/devicetree/bindings/nvmem/nvmem.txt and also + example below. + + nvmem-cell-names: + Usage: Required + Value type: <array of string> + Definition: Should be array of name for each nvmem-cells phandle data. + Please refer nvmem-cells bindings + Documentation/devicetree/bindings/nvmem/nvmem.txt and also + example below. + +- qcom,thermal-qfprom-bit-values: It should be array of bit mask values to + match with each nvmem-cells bit value respectively. If all + nvmem-cells values are matching with respective bit mask value + from this property, then driver will update thermal zones as + per thermal zones mentioned in 'qcom,thermal-zone-enable-list' + and 'qcom,thermal-zone-disable-list'. + +- qcom,thermal-zone-enable-list: + Usage: Required + Value type: <array of strings> + Definition: Should define this property with list of thermal zone + names those need to be enabled if nvmem-cells condition is met. + +- qcom,thermal-zone-disable-list: + Usage: Required + Value type: <array of strings> + Definition: Should define this property with list of thermal zone + names those need to be disabled if nvmem-cells condition is met. + +Example: + qcom-thermal-qfprom { + compatible = "qcom,thermal-qfprom-device"; + nvmem-cells = <&thermal_cpe>, <&thermal_revision>; + nvmem-cell-names = "cpe", "revision"; + qcom,thermal-qfprom-bit-values = <0x1 0x3> + qcom,thermal-zone-enable-list = "mdm-core-0-cpe-step", + "mdm-core-1-cpe-step"; + qcom,thermal-zone-disable-list = "mdm-core-0-step", + "mdm-core-1-step"; + }; + + In this example, driver gets efuse bit values of nvmem-cell register + for both 'cpe' and 'revision' nvmem cells. It then compares these efuse + values with property 'qcom,thermal-qfprom-bit-values' values (0x1 and + 0x3 here) respectively. If both efuse values are matching with this + property values, driver enables thermal zones listed in property + 'qcom,thermal-zone-enable-list' and disables thermal zones listed in + property 'qcom,thermal-zone-disable-list'. If any of the efuse + value is not matching with respective 'qcom,thermal-qfprom-bit-values' + values, driver just exits without modifying any thermal zone. |