From e9aa7e938a798680c8a4428c0050a828a5d1646d Mon Sep 17 00:00:00 2001 From: Swetha Chikkaboraiah Date: Fri, 15 Apr 2022 20:12:40 +0530 Subject: [PATCH] dt-bindings: thermal: Add dt-bindings Add dt-bindings for thermal node. This snapshot is taken as of 'commit 1a15a882776236bf330dc1aa9759809a43103e45 (Merge "ARM: dts: msm: Renaming seeya panels to 90Hz and 60Hz refresh rates")'. Change-Id: Ibd2b6d6201c3251548433012279b0ca50136380a --- bindings/thermal/qcom,cx-ipeak-cdev.txt | 53 ++++++++++++++++++++ bindings/thermal/qti-cpu-isolation-cdev.txt | 50 +++++++++++++++++++ bindings/thermal/qti-lmh-cpu-vdd-cdev.txt | 33 +++++++++++++ bindings/thermal/regulator-cdev.txt | 38 ++++++++++++++ bindings/thermal/tsens.txt | 55 +++++++++++++++++++++ 5 files changed, 229 insertions(+) create mode 100644 bindings/thermal/qcom,cx-ipeak-cdev.txt create mode 100644 bindings/thermal/qti-cpu-isolation-cdev.txt create mode 100644 bindings/thermal/qti-lmh-cpu-vdd-cdev.txt create mode 100644 bindings/thermal/regulator-cdev.txt create mode 100644 bindings/thermal/tsens.txt diff --git a/bindings/thermal/qcom,cx-ipeak-cdev.txt b/bindings/thermal/qcom,cx-ipeak-cdev.txt new file mode 100644 index 00000000..562cc6e5 --- /dev/null +++ b/bindings/thermal/qcom,cx-ipeak-cdev.txt @@ -0,0 +1,53 @@ +Qualcomm Technologies, Inc. CX Peak current cooling device + +The CX IPEAK cooling device, will be used to set thermal client vote to +CX IPEAK LM hardware. When all pre-defined clients on CX rail including +thermal client set their vote, CXIP LM hardware throttles pre-defined +client on the same rail. + +Required Parameters: +- compatible: + Usage: required + Value type: + Definition: should be "qcom,cxip-lm-cooling-device" + +- reg: + Usage: required + Value type: + Definition: Must contain 2 variables where 'a' is the starting + register address of the CX IPEAK LM hardware and 'b' is the + size of the peripheral address space. + +- qcom,thermal-client-offset: + Usage: Optional + Value type: + Definition: This property is required for CX IP LM v1.1 and above + hardware. Must contain offset from CX IPEAK LM reg + base for thermal client voting. If this property is not defined, + then CX IPEAK cooling device will use legacy CXIP LM hardware + offset registers. + +- qcom,bypass-client-list: + Usage: Optional + Value type: + Definition: This property is required for CX IP LM v1.1 and above + hardware. Must contain array of offsets from CX IPEAK LM reg + base for clients those are not participating voting to CXIP LM + hardware. This property makes sense only when thermal-client + is defined. + +- #cooling-cells: + Usage: required + Value type: + Definition: Must be 2. This is required by of-thermal and refer the doc + for more details. + +Example: + + cxip_cdev: cxip-cdev@1fed000 { + compatible = "qcom,cxip-lm-cooling-device"; + reg = <0x1fed000 0x24>; + qcom,thermal-client-offset = <0x8000>; + qcom,bypass-client-list = <0x2004 0x3004>; + #cooling-cells = <2>; + }; diff --git a/bindings/thermal/qti-cpu-isolation-cdev.txt b/bindings/thermal/qti-cpu-isolation-cdev.txt new file mode 100644 index 00000000..9d185262 --- /dev/null +++ b/bindings/thermal/qti-cpu-isolation-cdev.txt @@ -0,0 +1,50 @@ +QTI CPU isolation cooling devices. + +The CPU isolation cooling device will be used for isolating a CPU on a thermal +condition. This cooling device driver can register one cooling device per CPU, +which can be used by thermal zone to mitigate. + +Each child node will represent a cooling device and the child node should +point to the CPU, which will be mitigated by that cooling device instance. + +Properties: +- compatible: + Usage: required + Value type: + Definition: should be "qcom,cpu-isolate" + +Cooling device node: +- qcom,cpu: + Usage: required + Value type: + Definition: phandle to the CPU device that this cooling device will + mitigate. + +-#cooling-cells: + Usage: required + Value type: + Definition: Must be 2. Needed for of_thermal as cooling device + identifier. Please refer to + for more + details. +Example: + qcom,cpu-isolation { + compatible = "qcom,cpu-isolate"; + + cpu0_isolate: cpu0-isolate { + qcom,cpu = <&CPU0>; + #cooling-cells = <2>; + }; + cpu1_isolate: cpu1-isolate { + qcom,cpu = <&CPU1>; + #cooling-cells = <2>; + }; + cpu2_isolate: cpu2-isolate { + qcom,cpu = <&CPU2>; + #cooling-cells = <2>; + }; + cpu3_isolate: cpu3-isolate { + qcom,cpu = <&CPU3>; + #cooling-cells = <2>; + }; + }; diff --git a/bindings/thermal/qti-lmh-cpu-vdd-cdev.txt b/bindings/thermal/qti-lmh-cpu-vdd-cdev.txt new file mode 100644 index 00000000..40bf2a14 --- /dev/null +++ b/bindings/thermal/qti-lmh-cpu-vdd-cdev.txt @@ -0,0 +1,33 @@ +QTI LMH CPU Voltage cooling devices. + +The LMH CPU voltage cooling device will be used to place voltage restriction +vote on CPU railway during cold thermal condition. This cooling device driver +will register one cooling device per LLM, which can be used by thermal zone to +place voltage restriction vote. + +Properties: +- compatible: + Usage: required + Value type: + Definition: should be "qcom,lmh-cpu-vdd" + +Cooling device node: +- reg: + Usage: Required + Value type: + Definition: where 'a' is the starting register address of the LLM + and 'b' is the size of LLM address space. + +- #cooling-cells: + Usage: required + Value type: + Definition: Must be 2. Needed for of_thermal as cooling device + identifier. Please refer to + for more + details. +Example: + lmh_cpu_vdd0: qcom,lmh-cpu-vdd@18350800 { + compatible = "qcom,lmh-cpu-vdd"; + reg = <0x18350800 0x1000>; + #cooling-cells = <2>; + }; diff --git a/bindings/thermal/regulator-cdev.txt b/bindings/thermal/regulator-cdev.txt new file mode 100644 index 00000000..7c9abe20 --- /dev/null +++ b/bindings/thermal/regulator-cdev.txt @@ -0,0 +1,38 @@ +Regulator cooling device. + +The regulator cooling device, will be used to place a voltage floor +restriction on a rail. + +Properties: + +- compatible: + Usage: required + Value type: + Definition: shall be "qcom,regulator-cooling-device" + +- cdev-supply: + Usage: required + Value type: + Definition: phandle to the regulator to which the cooling device will + place a floor mitigation. + +- regulator-levels: + Usage: required + Value type: + Definition: Array of regulator voltages the cooling device should + use to place a floor restriction. The voltages should + be specified in descending order. + +- #cooling-cells: Must be 2. Please refer to + for more + details. + +Example: + + mv_cdev: mx-cdev-lvl { + compatible = "qcom,regulator-cooling-device"; + cdev-supply = <®ulator-cdev-supply>; + regulator-levels = ; + #cooling-cells = <2>; + }; diff --git a/bindings/thermal/tsens.txt b/bindings/thermal/tsens.txt new file mode 100644 index 00000000..3ea40abb --- /dev/null +++ b/bindings/thermal/tsens.txt @@ -0,0 +1,55 @@ +Qualcomm Technologies, Inc. TSENS driver + +Temperature sensor (TSENS) driver supports reading temperature from sensors +across the MSM. The driver defaults to support a 12 bit ADC. + +The driver uses the Thermal sysfs framework to provide thermal +clients the ability to read from supported on-die temperature sensors, +set temperature thresholds for cool/warm thresholds and receive notification +on temperature threshold events. + +TSENS node + +Required properties: +- compatible : should be "qcom,msm8996-tsens" for 8996 TSENS driver. + should be "qcom,msm8953-tsens" for 8953 TSENS driver. + should be "qcom,msm8998-tsens" for 8998 TSENS driver. + should be "qcom,msmhamster-tsens" for hamster TSENS driver. + should be "qcom,sdm660-tsens" for 660 TSENS driver. + should be "qcom,sdm630-tsens" for 630 TSENS driver. + should be "qcom,sdm845-tsens" for SDM845 TSENS driver. + should be "qcom,tsens24xx" for 2.4 TSENS controller. + should be "qcom,msm8937-tsens" for 8937 TSENS driver. + should be "qcom,qcs405-tsens" for QCS405 TSENS driver. + should be "qcom,sm6150-tsens" for 6150 TSENS driver. + should be "qcom,tsens26xx" for 2.6 TSENS controller. + + The compatible property is used to identify the respective controller to use + for the corresponding SoC. +- reg : offset and length of the TSENS registers with associated property in reg-names + as "tsens_srot_physical" for TSENS SROT physical address region. TSENS TM + physical address region as "tsens_tm_physical", and "tsens_eeprom_physical" for the + TSENS calibration fuse register region. +- reg-names : resource names used for the physical address of the TSENS + registers. Should be "tsens_srot_physical" for physical address of the TSENS + SROT region, "tsens_tm_physical" for physical address of the TM region and + "tsens_eeprom_physical" for the TSENS calibration fuse register region. +- interrupts : TSENS interrupt to notify Upper/Lower and Critical temperature threshold. +- interrupt-names: Should be "tsens-upper-lower" for temperature threshold. + Add "tsens-critical" for Critical temperature threshold notification + in addition to "tsens-upper-lower" for 8996 TSENS since + 8996 supports Upper/Lower and Critical temperature threshold. +- tsens-reinit-wa : To support the re-initialization of tsens controller from + trustzone +Example: + +tsens@fc4a8000 { + compatible = "qcom,msm-tsens"; + reg = <0xfc4a8000 0x10>, + <0xfc4b8000 0x1ff>; + reg-names = "tsens_srot_physical", + "tsens_tm_physical", + "tsens_eeprom_physical", + interrupts = <0 184 0>; + interrupt-names = "tsens-upper-lower"; +};