* [PATCH v3 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors Amit Kucheria
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal
zone for each of those sensors to expose the temperature of each zone.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 90 +++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 369e58f64145..d32f639505f1 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -217,6 +217,96 @@
};
};
};
+
+ q6-dsp-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&tsens 1>;
+
+ trips {
+ q6_dsp_alert0: trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
+
+ modemtx-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&tsens 2>;
+
+ trips {
+ modemtx_alert0: trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
+
+ video-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&tsens 3>;
+
+ trips {
+ video_alert0: trip-point0 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
+
+ wlan-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens 4>;
+
+ trips {
+ wlan_alert0: trip-point0 {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
+
+ gpu-thermal-top {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&tsens 9>;
+
+ trips {
+ gpu1_alert0: trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
+
+ gpu-thermal-bottom {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&tsens 10>;
+
+ trips {
+ gpu2_alert0: trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+ };
+ };
};
cpu-pmu {
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema Amit Kucheria
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the
device tree so that the correct sensor ID is used and as a result we can
actually check the temperature for the cpu2_3 sensor.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 5ea9fb8f2f87..8686e101905c 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -179,7 +179,7 @@
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&tsens 4>;
+ thermal-sensors = <&tsens 5>;
trips {
cpu0_1_alert0: trip-point@0 {
@@ -209,7 +209,7 @@
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&tsens 3>;
+ thermal-sensors = <&tsens 4>;
trips {
cpu2_3_alert0: trip-point@0 {
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-17 19:06 ` Rob Herring
2019-09-11 7:16 ` [PATCH v3 08/15] arm64: dts: sdm845: thermal: Add interrupt support Amit Kucheria
` (5 subsequent siblings)
8 siblings, 1 reply; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: linux-pm, devicetree
Document interrupt support in the tsens driver by converting over to a
YAML schema.
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
.../bindings/thermal/qcom-tsens.txt | 55 ------
.../bindings/thermal/qcom-tsens.yaml | 174 ++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 175 insertions(+), 55 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt
create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
deleted file mode 100644
index 673cc1831ee9..000000000000
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-* QCOM SoC Temperature Sensor (TSENS)
-
-Required properties:
-- compatible:
- Must be one of the following:
- - "qcom,msm8916-tsens" (MSM8916)
- - "qcom,msm8974-tsens" (MSM8974)
- - "qcom,msm8996-tsens" (MSM8996)
- - "qcom,qcs404-tsens", "qcom,tsens-v1" (QCS404)
- - "qcom,msm8998-tsens", "qcom,tsens-v2" (MSM8998)
- - "qcom,sdm845-tsens", "qcom,tsens-v2" (SDM845)
- The generic "qcom,tsens-v2" property must be used as a fallback for any SoC
- with version 2 of the TSENS IP. MSM8996 is the only exception because the
- generic property did not exist when support was added.
- Similarly, the generic "qcom,tsens-v1" property must be used as a fallback for
- any SoC with version 1 of the TSENS IP.
-
-- reg: Address range of the thermal registers.
- New platforms containing v2.x.y of the TSENS IP must specify the SROT and TM
- register spaces separately, with order being TM before SROT.
- See Example 2, below.
-
-- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
-- #qcom,sensors: Number of sensors in tsens block
-- Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify
-nvmem cells
-
-Example 1 (legacy support before a fallback tsens-v2 property was introduced):
-tsens: thermal-sensor@900000 {
- compatible = "qcom,msm8916-tsens";
- reg = <0x4a8000 0x2000>;
- nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
- nvmem-cell-names = "caldata", "calsel";
- #thermal-sensor-cells = <1>;
- };
-
-Example 2 (for any platform containing v2 of the TSENS IP):
-tsens0: thermal-sensor@c263000 {
- compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
- reg = <0xc263000 0x1ff>, /* TM */
- <0xc222000 0x1ff>; /* SROT */
- #qcom,sensors = <13>;
- #thermal-sensor-cells = <1>;
- };
-
-Example 3 (for any platform containing v1 of the TSENS IP):
-tsens: thermal-sensor@4a9000 {
- compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
- reg = <0x004a9000 0x1000>, /* TM */
- <0x004a8000 0x1000>; /* SROT */
- nvmem-cells = <&tsens_caldata>;
- nvmem-cell-names = "calib";
- #qcom,sensors = <10>;
- #thermal-sensor-cells = <1>;
- };
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
new file mode 100644
index 000000000000..6784766fe58f
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -0,0 +1,174 @@
+# SPDX-License-Identifier: (GPL-2.0 OR MIT)
+# Copyright 2019 Linaro Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: QCOM SoC Temperature Sensor (TSENS)
+
+maintainers:
+ - Amit Kucheria <amit.kucheria@linaro.org>
+
+description: |
+ QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
+ three distinct major versions of the IP that is supported by a single driver.
+ The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
+ everything before v1 when there was no versioning information.
+
+properties:
+ compatible:
+ oneOf:
+ - description: v0.1 of TSENS
+ items:
+ - enum:
+ - qcom,msm8916-tsens
+ - qcom,msm8974-tsens
+ - const: qcom,tsens-v0_1
+
+ - description: v1 of TSENS
+ items:
+ - enum:
+ - qcom,qcs404-tsens
+ - const: qcom,tsens-v1
+
+ - description: v2 of TSENS
+ items:
+ - enum:
+ - qcom,msm8996-tsens
+ - qcom,msm8998-tsens
+ - qcom,sdm845-tsens
+ - const: qcom,tsens-v2
+
+ reg:
+ maxItems: 2
+ items:
+ - description: TM registers
+ - description: SROT registers
+
+ nvmem-cells:
+ minItems: 1
+ maxItems: 2
+ description:
+ Reference to an nvmem node for the calibration data
+
+ nvmem-cells-names:
+ items:
+ - enum:
+ - caldata
+ - calsel
+
+ "#qcom,sensors":
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32
+ - minimum: 1
+ - maximum: 16
+ description:
+ Number of sensors enabled on this platform
+
+ "#thermal-sensor-cells":
+ const: 1
+ description:
+ Number of cells required to uniquely identify the thermal sensors. Since
+ we have multiple sensors this is set to 1
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8916-tsens
+ - qcom,msm8974-tsens
+ - qcom,qcs404-tsens
+ - qcom,tsens-v0_1
+ - qcom,tsens-v1
+ then:
+ properties:
+ interrupts:
+ minItems: 1
+ maxItems: 1
+ items:
+ - description: Combined interrupt if upper or lower threshold crossed
+ interrupt-names:
+ minItems: 1
+ maxItems: 1
+ items:
+ - const: uplow
+
+ else:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+ items:
+ - description: Combined interrupt if upper or lower threshold crossed
+ - description: Interrupt if critical threshold crossed
+ interrupt-names:
+ minItems: 2
+ maxItems: 2
+ items:
+ - const: uplow
+ - const: critical
+
+required:
+ - compatible
+ - reg
+ - "#qcom,sensors"
+ - interrupts
+ - interrupt-names
+ - "#thermal-sensor-cells"
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ // Example 1 (legacy: for pre v1 IP):
+ tsens1: thermal-sensor@900000 {
+ compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
+ reg = <0x4a9000 0x1000>, /* TM */
+ <0x4a8000 0x1000>; /* SROT */
+
+ nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
+ nvmem-cell-names = "caldata", "calsel";
+
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
+
+ #qcom,sensors = <5>;
+ #thermal-sensor-cells = <1>;
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ // Example 2 (for any platform containing v1 of the TSENS IP):
+ tsens2: thermal-sensor@4a9000 {
+ compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
+ reg = <0x004a9000 0x1000>, /* TM */
+ <0x004a8000 0x1000>; /* SROT */
+
+ nvmem-cells = <&tsens_caldata>;
+ nvmem-cell-names = "calib";
+
+ interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
+
+ #qcom,sensors = <10>;
+ #thermal-sensor-cells = <1>;
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ // Example 3 (for any platform containing v2 of the TSENS IP):
+ tsens3: thermal-sensor@c263000 {
+ compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
+ reg = <0xc263000 0x1ff>,
+ <0xc222000 0x1ff>;
+
+ interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow", "critical";
+
+ #qcom,sensors = <13>;
+ #thermal-sensor-cells = <1>;
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index e7a47b5210fd..ff757a4a060c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13360,6 +13360,7 @@ L: linux-pm@vger.kernel.org
L: linux-arm-msm@vger.kernel.org
S: Maintained
F: drivers/thermal/qcom/
+F: Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
M: Stanimir Varbanov <stanimir.varbanov@linaro.org>
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema
2019-09-11 7:16 ` [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema Amit Kucheria
@ 2019-09-17 19:06 ` Rob Herring
2019-09-20 21:42 ` Amit Kucheria
0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2019-09-17 19:06 UTC (permalink / raw)
To: Amit Kucheria
Cc: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Zhang Rui,
linux-pm, devicetree
On Wed, Sep 11, 2019 at 12:46:24PM +0530, Amit Kucheria wrote:
> Document interrupt support in the tsens driver by converting over to a
> YAML schema.
>
> Suggested-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---
> .../bindings/thermal/qcom-tsens.txt | 55 ------
> .../bindings/thermal/qcom-tsens.yaml | 174 ++++++++++++++++++
> MAINTAINERS | 1 +
> 3 files changed, 175 insertions(+), 55 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> new file mode 100644
> index 000000000000..6784766fe58f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> @@ -0,0 +1,174 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +# Copyright 2019 Linaro Ltd.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: QCOM SoC Temperature Sensor (TSENS)
> +
> +maintainers:
> + - Amit Kucheria <amit.kucheria@linaro.org>
> +
> +description: |
> + QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
> + three distinct major versions of the IP that is supported by a single driver.
> + The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
> + everything before v1 when there was no versioning information.
> +
> +properties:
> + compatible:
> + oneOf:
> + - description: v0.1 of TSENS
> + items:
> + - enum:
> + - qcom,msm8916-tsens
> + - qcom,msm8974-tsens
> + - const: qcom,tsens-v0_1
> +
> + - description: v1 of TSENS
> + items:
> + - enum:
> + - qcom,qcs404-tsens
> + - const: qcom,tsens-v1
> +
> + - description: v2 of TSENS
> + items:
> + - enum:
> + - qcom,msm8996-tsens
> + - qcom,msm8998-tsens
> + - qcom,sdm845-tsens
> + - const: qcom,tsens-v2
> +
> + reg:
> + maxItems: 2
> + items:
> + - description: TM registers
> + - description: SROT registers
> +
> + nvmem-cells:
> + minItems: 1
> + maxItems: 2
> + description:
> + Reference to an nvmem node for the calibration data
> +
> + nvmem-cells-names:
This is going to require 2 items, so you need an explicit minItems and
maxItems.
> + items:
> + - enum:
> + - caldata
> + - calsel
> +
> + "#qcom,sensors":
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - minimum: 1
> + - maximum: 16
> + description:
> + Number of sensors enabled on this platform
> +
> + "#thermal-sensor-cells":
> + const: 1
> + description:
> + Number of cells required to uniquely identify the thermal sensors. Since
> + we have multiple sensors this is set to 1
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,msm8916-tsens
> + - qcom,msm8974-tsens
> + - qcom,qcs404-tsens
> + - qcom,tsens-v0_1
> + - qcom,tsens-v1
> + then:
> + properties:
> + interrupts:
> + minItems: 1
> + maxItems: 1
These can be implicit.
> + items:
> + - description: Combined interrupt if upper or lower threshold crossed
> + interrupt-names:
> + minItems: 1
> + maxItems: 1
ditto.
> + items:
> + - const: uplow
> +
> + else:
> + properties:
> + interrupts:
> + minItems: 2
> + maxItems: 2
ditto.
> + items:
> + - description: Combined interrupt if upper or lower threshold crossed
> + - description: Interrupt if critical threshold crossed
> + interrupt-names:
> + minItems: 2
> + maxItems: 2
ditto.
> + items:
> + - const: uplow
> + - const: critical
> +
> +required:
> + - compatible
> + - reg
> + - "#qcom,sensors"
> + - interrupts
> + - interrupt-names
> + - "#thermal-sensor-cells"
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + // Example 1 (legacy: for pre v1 IP):
> + tsens1: thermal-sensor@900000 {
> + compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
> + reg = <0x4a9000 0x1000>, /* TM */
> + <0x4a8000 0x1000>; /* SROT */
> +
> + nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
> + nvmem-cell-names = "caldata", "calsel";
> +
> + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "uplow";
> +
> + #qcom,sensors = <5>;
> + #thermal-sensor-cells = <1>;
> + };
> +
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + // Example 2 (for any platform containing v1 of the TSENS IP):
> + tsens2: thermal-sensor@4a9000 {
> + compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
> + reg = <0x004a9000 0x1000>, /* TM */
> + <0x004a8000 0x1000>; /* SROT */
> +
> + nvmem-cells = <&tsens_caldata>;
> + nvmem-cell-names = "calib";
> +
> + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "uplow";
> +
> + #qcom,sensors = <10>;
> + #thermal-sensor-cells = <1>;
> + };
> +
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + // Example 3 (for any platform containing v2 of the TSENS IP):
> + tsens3: thermal-sensor@c263000 {
> + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
> + reg = <0xc263000 0x1ff>,
> + <0xc222000 0x1ff>;
> +
> + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "uplow", "critical";
> +
> + #qcom,sensors = <13>;
> + #thermal-sensor-cells = <1>;
> + };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e7a47b5210fd..ff757a4a060c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -13360,6 +13360,7 @@ L: linux-pm@vger.kernel.org
> L: linux-arm-msm@vger.kernel.org
> S: Maintained
> F: drivers/thermal/qcom/
> +F: Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
>
> QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
> M: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema
2019-09-17 19:06 ` Rob Herring
@ 2019-09-20 21:42 ` Amit Kucheria
0 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-20 21:42 UTC (permalink / raw)
To: Rob Herring
Cc: LKML, linux-arm-msm, Bjorn Andersson, Eduardo Valentin,
Andy Gross, Brian Masney, Stephen Boyd, Daniel Lezcano,
Mark Rutland, Zhang Rui, Linux PM list,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
On Tue, Sep 17, 2019 at 12:06 PM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 11, 2019 at 12:46:24PM +0530, Amit Kucheria wrote:
> > Document interrupt support in the tsens driver by converting over to a
> > YAML schema.
> >
> > Suggested-by: Stephen Boyd <swboyd@chromium.org>
> > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > ---
> > .../bindings/thermal/qcom-tsens.txt | 55 ------
> > .../bindings/thermal/qcom-tsens.yaml | 174 ++++++++++++++++++
> > MAINTAINERS | 1 +
> > 3 files changed, 175 insertions(+), 55 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> > create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
>
>
> > diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > new file mode 100644
> > index 000000000000..6784766fe58f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> > @@ -0,0 +1,174 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +# Copyright 2019 Linaro Ltd.
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: QCOM SoC Temperature Sensor (TSENS)
> > +
> > +maintainers:
> > + - Amit Kucheria <amit.kucheria@linaro.org>
> > +
> > +description: |
> > + QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
> > + three distinct major versions of the IP that is supported by a single driver.
> > + The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
> > + everything before v1 when there was no versioning information.
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - description: v0.1 of TSENS
> > + items:
> > + - enum:
> > + - qcom,msm8916-tsens
> > + - qcom,msm8974-tsens
> > + - const: qcom,tsens-v0_1
> > +
> > + - description: v1 of TSENS
> > + items:
> > + - enum:
> > + - qcom,qcs404-tsens
> > + - const: qcom,tsens-v1
> > +
> > + - description: v2 of TSENS
> > + items:
> > + - enum:
> > + - qcom,msm8996-tsens
> > + - qcom,msm8998-tsens
> > + - qcom,sdm845-tsens
> > + - const: qcom,tsens-v2
> > +
> > + reg:
> > + maxItems: 2
> > + items:
> > + - description: TM registers
> > + - description: SROT registers
> > +
> > + nvmem-cells:
> > + minItems: 1
> > + maxItems: 2
> > + description:
> > + Reference to an nvmem node for the calibration data
> > +
> > + nvmem-cells-names:
>
> This is going to require 2 items, so you need an explicit minItems and
> maxItems.
Will fix.
> > + items:
> > + - enum:
> > + - caldata
> > + - calsel
> > +
> > + "#qcom,sensors":
> > + allOf:
> > + - $ref: /schemas/types.yaml#/definitions/uint32
> > + - minimum: 1
> > + - maximum: 16
> > + description:
> > + Number of sensors enabled on this platform
> > +
> > + "#thermal-sensor-cells":
> > + const: 1
> > + description:
> > + Number of cells required to uniquely identify the thermal sensors. Since
> > + we have multiple sensors this is set to 1
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - qcom,msm8916-tsens
> > + - qcom,msm8974-tsens
> > + - qcom,qcs404-tsens
> > + - qcom,tsens-v0_1
> > + - qcom,tsens-v1
> > + then:
> > + properties:
> > + interrupts:
>
> > + minItems: 1
> > + maxItems: 1
>
> These can be implicit.
Will remove all of these.
> > + items:
> > + - description: Combined interrupt if upper or lower threshold crossed
> > + interrupt-names:
> > + minItems: 1
> > + maxItems: 1
>
> ditto.
>
> > + items:
> > + - const: uplow
> > +
> > + else:
> > + properties:
> > + interrupts:
> > + minItems: 2
> > + maxItems: 2
>
> ditto.
>
> > + items:
> > + - description: Combined interrupt if upper or lower threshold crossed
> > + - description: Interrupt if critical threshold crossed
> > + interrupt-names:
> > + minItems: 2
> > + maxItems: 2
>
> ditto.
>
> > + items:
> > + - const: uplow
> > + - const: critical
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - "#qcom,sensors"
> > + - interrupts
> > + - interrupt-names
> > + - "#thermal-sensor-cells"
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + // Example 1 (legacy: for pre v1 IP):
> > + tsens1: thermal-sensor@900000 {
> > + compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
> > + reg = <0x4a9000 0x1000>, /* TM */
> > + <0x4a8000 0x1000>; /* SROT */
> > +
> > + nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
> > + nvmem-cell-names = "caldata", "calsel";
> > +
> > + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "uplow";
> > +
> > + #qcom,sensors = <5>;
> > + #thermal-sensor-cells = <1>;
> > + };
> > +
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + // Example 2 (for any platform containing v1 of the TSENS IP):
> > + tsens2: thermal-sensor@4a9000 {
> > + compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
> > + reg = <0x004a9000 0x1000>, /* TM */
> > + <0x004a8000 0x1000>; /* SROT */
> > +
> > + nvmem-cells = <&tsens_caldata>;
> > + nvmem-cell-names = "calib";
> > +
> > + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "uplow";
> > +
> > + #qcom,sensors = <10>;
> > + #thermal-sensor-cells = <1>;
> > + };
> > +
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + // Example 3 (for any platform containing v2 of the TSENS IP):
> > + tsens3: thermal-sensor@c263000 {
> > + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
> > + reg = <0xc263000 0x1ff>,
> > + <0xc222000 0x1ff>;
> > +
> > + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "uplow", "critical";
> > +
> > + #qcom,sensors = <13>;
> > + #thermal-sensor-cells = <1>;
> > + };
> > +...
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index e7a47b5210fd..ff757a4a060c 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -13360,6 +13360,7 @@ L: linux-pm@vger.kernel.org
> > L: linux-arm-msm@vger.kernel.org
> > S: Maintained
> > F: drivers/thermal/qcom/
> > +F: Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
> >
> > QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
> > M: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> > --
> > 2.17.1
> >
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 08/15] arm64: dts: sdm845: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (2 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 09/15] arm64: dts: msm8996: " Amit Kucheria
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupts for each of the two tsens controllers.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 88 +++++++++++++++-------------
1 file changed, 46 insertions(+), 42 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 4babff5f19b5..fdd74c39b744 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -2386,6 +2386,8 @@
reg = <0 0x0c263000 0 0x1ff>, /* TM */
<0 0x0c222000 0 0x1ff>; /* SROT */
#qcom,sensors = <13>;
+ interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
@@ -2394,6 +2396,8 @@
reg = <0 0x0c265000 0 0x1ff>, /* TM */
<0 0x0c223000 0 0x1ff>; /* SROT */
#qcom,sensors = <8>;
+ interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
@@ -2712,8 +2716,8 @@
thermal-zones {
cpu0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 1>;
@@ -2756,8 +2760,8 @@
};
cpu1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 2>;
@@ -2800,8 +2804,8 @@
};
cpu2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 3>;
@@ -2844,8 +2848,8 @@
};
cpu3-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 4>;
@@ -2888,8 +2892,8 @@
};
cpu4-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 7>;
@@ -2932,8 +2936,8 @@
};
cpu5-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 8>;
@@ -2976,8 +2980,8 @@
};
cpu6-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 9>;
@@ -3020,8 +3024,8 @@
};
cpu7-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 10>;
@@ -3064,8 +3068,8 @@
};
aoss0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 0>;
@@ -3079,8 +3083,8 @@
};
cluster0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 5>;
@@ -3099,8 +3103,8 @@
};
cluster1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 6>;
@@ -3119,8 +3123,8 @@
};
gpu-thermal-top {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 11>;
@@ -3134,8 +3138,8 @@
};
gpu-thermal-bottom {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 12>;
@@ -3149,8 +3153,8 @@
};
aoss1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 0>;
@@ -3164,8 +3168,8 @@
};
q6-modem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 1>;
@@ -3179,8 +3183,8 @@
};
mem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 2>;
@@ -3194,8 +3198,8 @@
};
wlan-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 3>;
@@ -3209,8 +3213,8 @@
};
q6-hvx-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 4>;
@@ -3224,8 +3228,8 @@
};
camera-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 5>;
@@ -3239,8 +3243,8 @@
};
video-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 6>;
@@ -3254,8 +3258,8 @@
};
modem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 7>;
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 09/15] arm64: dts: msm8996: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (3 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 08/15] arm64: dts: sdm845: thermal: Add interrupt support Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 10/15] arm64: dts: msm8998: " Amit Kucheria
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupts for each of the two tsens controllers.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++++++++++++++-------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 96c0a481f454..bb763b362c16 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -175,8 +175,8 @@
thermal-zones {
cpu0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 3>;
@@ -196,8 +196,8 @@
};
cpu1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 5>;
@@ -217,8 +217,8 @@
};
cpu2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 8>;
@@ -238,8 +238,8 @@
};
cpu3-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 10>;
@@ -259,8 +259,8 @@
};
gpu-thermal-top {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 6>;
@@ -274,8 +274,8 @@
};
gpu-thermal-bottom {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 7>;
@@ -289,8 +289,8 @@
};
m4m-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 1>;
@@ -304,8 +304,8 @@
};
l3-or-venus-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 2>;
@@ -319,8 +319,8 @@
};
cluster0-l2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 7>;
@@ -334,8 +334,8 @@
};
cluster1-l2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 12>;
@@ -349,8 +349,8 @@
};
camera-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 1>;
@@ -364,8 +364,8 @@
};
q6-dsp-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 2>;
@@ -379,8 +379,8 @@
};
mem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 3>;
@@ -394,8 +394,8 @@
};
modemtx-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 4>;
@@ -591,6 +591,8 @@
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
#qcom,sensors = <13>;
+ interrupts = <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
@@ -599,6 +601,8 @@
reg = <0x4ad000 0x1000>, /* TM */
<0x4ac000 0x1000>; /* SROT */
#qcom,sensors = <8>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 10/15] arm64: dts: msm8998: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (4 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 09/15] arm64: dts: msm8996: " Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 11/15] arm64: dts: qcs404: " Amit Kucheria
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupts for each of the two tsens controllers.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8998.dtsi | 82 ++++++++++++++-------------
1 file changed, 42 insertions(+), 40 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index c13ed7aeb1e0..1e2f77b38f2c 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -440,8 +440,8 @@
thermal-zones {
cpu0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 1>;
@@ -461,8 +461,8 @@
};
cpu1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 2>;
@@ -482,8 +482,8 @@
};
cpu2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 3>;
@@ -503,8 +503,8 @@
};
cpu3-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 4>;
@@ -524,8 +524,8 @@
};
cpu4-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 7>;
@@ -545,8 +545,8 @@
};
cpu5-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 8>;
@@ -566,8 +566,8 @@
};
cpu6-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 9>;
@@ -587,8 +587,8 @@
};
cpu7-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 10>;
@@ -608,8 +608,8 @@
};
gpu-thermal-bottom {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 12>;
@@ -623,8 +623,8 @@
};
gpu-thermal-top {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 13>;
@@ -638,8 +638,8 @@
};
clust0-mhm-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 5>;
@@ -653,8 +653,8 @@
};
clust1-mhm-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 6>;
@@ -668,8 +668,8 @@
};
cluster1-l2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens0 11>;
@@ -683,8 +683,8 @@
};
modem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 1>;
@@ -698,8 +698,8 @@
};
mem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 2>;
@@ -713,8 +713,8 @@
};
wlan-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 3>;
@@ -728,8 +728,8 @@
};
q6-dsp-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 4>;
@@ -743,8 +743,8 @@
};
camera-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 5>;
@@ -758,8 +758,8 @@
};
multimedia-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens1 6>;
@@ -845,8 +845,9 @@
compatible = "qcom,msm8998-tsens", "qcom,tsens-v2";
reg = <0x10ab000 0x1000>, /* TM */
<0x10aa000 0x1000>; /* SROT */
-
#qcom,sensors = <14>;
+ interrupts = <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
@@ -854,8 +855,9 @@
compatible = "qcom,msm8998-tsens", "qcom,tsens-v2";
reg = <0x10ae000 0x1000>, /* TM */
<0x10ad000 0x1000>; /* SROT */
-
#qcom,sensors = <8>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 11/15] arm64: dts: qcs404: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (5 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 10/15] arm64: dts: msm8998: " Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 12/15] arm: dts: msm8974: " Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 13/15] arm64: dts: msm8916: " Amit Kucheria
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupt for the tsens controller.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
arch/arm64/boot/dts/qcom/qcs404.dtsi | 42 +++++++++++++++-------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index 3d0789775009..065a60d50a07 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -280,6 +280,8 @@
nvmem-cells = <&tsens_caldata>;
nvmem-cell-names = "calib";
#qcom,sensors = <10>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
@@ -1071,8 +1073,8 @@
thermal-zones {
aoss-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 0>;
@@ -1086,8 +1088,8 @@
};
q6-hvx-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 1>;
@@ -1101,8 +1103,8 @@
};
lpass-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 2>;
@@ -1116,8 +1118,8 @@
};
wlan-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 3>;
@@ -1131,8 +1133,8 @@
};
cluster-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 4>;
@@ -1165,8 +1167,8 @@
};
cpu0-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 5>;
@@ -1199,8 +1201,8 @@
};
cpu1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 6>;
@@ -1233,8 +1235,8 @@
};
cpu2-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 7>;
@@ -1267,8 +1269,8 @@
};
cpu3-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 8>;
@@ -1301,8 +1303,8 @@
};
gpu-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 9>;
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 12/15] arm: dts: msm8974: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (6 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 11/15] arm64: dts: qcs404: " Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
2019-09-11 7:16 ` [PATCH v3 13/15] arm64: dts: msm8916: " Amit Kucheria
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupt for the tsens controller.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Brian Masney <masneyb@onstation.org>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 36 +++++++++++++++--------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index d32f639505f1..290f7c3827d4 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -139,8 +139,8 @@
thermal-zones {
cpu-thermal0 {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 5>;
@@ -159,8 +159,8 @@
};
cpu-thermal1 {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 6>;
@@ -179,8 +179,8 @@
};
cpu-thermal2 {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 7>;
@@ -199,8 +199,8 @@
};
cpu-thermal3 {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 8>;
@@ -219,8 +219,8 @@
};
q6-dsp-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 1>;
@@ -234,8 +234,8 @@
};
modemtx-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 2>;
@@ -250,7 +250,7 @@
video-thermal {
polling-delay-passive = <0>;
- polling-delay = <1000>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 3>;
@@ -279,8 +279,8 @@
};
gpu-thermal-top {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 9>;
@@ -294,8 +294,8 @@
};
gpu-thermal-bottom {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 10>;
@@ -531,6 +531,8 @@
nvmem-cells = <&tsens_calib>, <&tsens_backup>;
nvmem-cell-names = "calib", "calib_backup";
#qcom,sensors = <11>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v3 13/15] arm64: dts: msm8916: thermal: Add interrupt support
2019-09-11 7:16 [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Amit Kucheria
` (7 preceding siblings ...)
2019-09-11 7:16 ` [PATCH v3 12/15] arm: dts: msm8974: " Amit Kucheria
@ 2019-09-11 7:16 ` Amit Kucheria
8 siblings, 0 replies; 12+ messages in thread
From: Amit Kucheria @ 2019-09-11 7:16 UTC (permalink / raw)
To: linux-kernel, linux-arm-msm, bjorn.andersson, edubezval, agross,
masneyb, swboyd, Daniel Lezcano, Mark Rutland, Rob Herring,
Zhang Rui
Cc: devicetree
Register upper-lower interrupt for the tsens controller.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 8686e101905c..c0d0492d90ec 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -176,8 +176,8 @@
thermal-zones {
cpu0_1-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 5>;
@@ -206,8 +206,8 @@
};
cpu2_3-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 4>;
@@ -236,8 +236,8 @@
};
gpu-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 2>;
@@ -256,8 +256,8 @@
};
camera-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 1>;
@@ -271,8 +271,8 @@
};
modem-thermal {
- polling-delay-passive = <250>;
- polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
thermal-sensors = <&tsens 0>;
@@ -816,6 +816,8 @@
nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
nvmem-cell-names = "calib", "calib_sel";
#qcom,sensors = <5>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
#thermal-sensor-cells = <1>;
};
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread