Commit 583f2bcf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull thermal updates from Daniel Lezcano:

 - Remove duplicate error message for the amlogic driver (Tang Bin)

 - Fix spellos in comments for the tegra and sun8i (Bhaskar Chowdhury)

 - Add the missing fifth node on the rcar_gen3 sensor (Niklas Söderlund)

 - Remove duplicate include in ti-bandgap (Zhang Yunkai)

 - Assign error code in the error path in the function
   thermal_of_populate_bind_params() (Jia-Ju Bai)

 - Fix spelling mistake in a comment 'disabed' -> 'disabled' (Colin Ian
   King)

 - Use the device name instead of auto-numbering for a better
   identification of the cooling device (Daniel Lezcano)

 - Improve a bit the division accuracy in the power allocator governor
   (Jeson Gao)

 - Enable the missing third sensor on msm8976 (Konrad Dybcio)

 - Add QCom tsens driver co-maintainer (Thara Gopinath)

 - Fix memory leak and use after free errors in the core code (Daniel
   Lezcano)

 - Add the MDM9607 compatible bindings (Konrad Dybcio)

 - Fix trivial spello in the copyright name for Hisilicon (Hao Fang)

 - Fix negative index array access when converting the frequency to
   power in the energy model (Brian-sy Yang)

 - Add support for Gen2 new PMIC support for Qcom SPMI (David Collins)

 - Update maintainer file for CPU cooling device section (Lukasz Luba)

 - Fix missing put_device on error in the Qcom tsens driver (Guangqing
   Zhu)

 - Add compatible DT binding for sm8350 (Robert Foss)

 - Add support for the MDM9607's tsens driver (Konrad Dybcio)

 - Remove duplicate error messages in thermal_mmio and the bcm2835
   driver (Ruiqi Gong)

 - Add the Thermal Temperature Cooling driver (Zhang Rui)

 - Remove duplicate error messages in the Hisilicon sensor driver (Ye
   Bin)

 - Use the devm_platform_ioremap_resource_byname() function instead of a
   couple of corresponding calls (dingsenjie)

 - Sort the headers alphabetically in the ti-bandgap driver (Zhen Lei)

 - Add missing property in the DT thermal sensor binding (Rafał Miłecki)

 - Remove dead code in the ti-bandgap sensor driver (Lin Ruizhe)

 - Convert the BRCM DT bindings to the yaml schema (Rafał Miłecki)

 - Replace the thermal_notify_framework() call by a call to the
   thermal_zone_device_update() function. Remove the function as well as
   the corresponding documentation (Thara Gopinath)

 - Add support for the ipq8064-tsens sensor along with a set of cleanups
   and code preparation (Ansuel Smith)

 - Add a lockless __thermal_cdev_update() function to improve the
   locking scheme in the core code and governors (Lukasz Luba)

 - Fix multiple cooling device notification changes (Lukasz Luba)

 - Remove unneeded variable initialization (Colin Ian King)

* tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (55 commits)
  thermal/drivers/mtk_thermal: Remove redundant initializations of several variables
  thermal/core/power allocator: Use the lockless __thermal_cdev_update() function
  thermal/core/fair share: Use the lockless __thermal_cdev_update() function
  thermal/core/fair share: Lock the thermal zone while looping over instances
  thermal/core/power_allocator: Update once cooling devices when temp is low
  thermal/core/power_allocator: Maintain the device statistics from going stale
  thermal/core: Create a helper __thermal_cdev_update() without a lock
  dt-bindings: thermal: tsens: Document ipq8064 bindings
  thermal/drivers/tsens: Add support for ipq8064-tsens
  thermal/drivers/tsens: Drop unused define for msm8960
  thermal/drivers/tsens: Replace custom 8960 apis with generic apis
  thermal/drivers/tsens: Fix bug in sensor enable for msm8960
  thermal/drivers/tsens: Use init_common for msm8960
  thermal/drivers/tsens: Add VER_0 tsens version
  thermal/drivers/tsens: Convert msm8960 to reg_field
  thermal/drivers/tsens: Don't hardcode sensor slope
  Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation
  thermal/core: Remove thermal_notify_framework
  iwlwifi: mvm: tt: Replace thermal_notify_framework
  dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema
  ...
parents 5d6a1b84 c310e546
Loading
Loading
Loading
Loading
+0 −37
Original line number Diff line number Diff line
* Broadcom Northstar Thermal

This binding describes thermal sensor that is part of Northstar's DMU (Device
Management Unit).

Required properties:
- compatible : Must be "brcm,ns-thermal"
- reg : iomem address range of PVTMON registers
- #thermal-sensor-cells : Should be <0>

Example:

thermal: thermal@1800c2c0 {
	compatible = "brcm,ns-thermal";
	reg = <0x1800c2c0 0x10>;
	#thermal-sensor-cells = <0>;
};

thermal-zones {
	cpu_thermal: cpu-thermal {
		polling-delay-passive = <0>;
		polling-delay = <1000>;
		coefficients = <(-556) 418000>;
		thermal-sensors = <&thermal>;

		trips {
			cpu-crit {
				temperature	= <125000>;
				hysteresis	= <0>;
				type		= "critical";
			};
		};

		cooling-maps {
		};
	};
};
+60 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,ns-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom Northstar Thermal

maintainers:
  - Rafał Miłecki <rafal@milecki.pl>

description:
  Thermal sensor that is part of Northstar's DMU (Device Management Unit).

allOf:
  - $ref: thermal-sensor.yaml#

properties:
  compatible:
    const: brcm,ns-thermal

  reg:
    description: PVTMON registers range
    maxItems: 1

  "#thermal-sensor-cells":
    const: 0

unevaluatedProperties: false

required:
  - reg

examples:
  - |
    thermal: thermal@1800c2c0 {
        compatible = "brcm,ns-thermal";
        reg = <0x1800c2c0 0x10>;
        #thermal-sensor-cells = <0>;
    };

    thermal-zones {
        cpu-thermal {
            polling-delay-passive = <0>;
            polling-delay = <1000>;
            coefficients = <(-556) 418000>;
            thermal-sensors = <&thermal>;

            trips {
                cpu-crit {
                    temperature = <125000>;
                    hysteresis = <0>;
                    type = "critical";
                };
            };

            cooling-maps {
            };
        };
    };
+51 −8
Original line number Diff line number Diff line
@@ -19,9 +19,15 @@ description: |
properties:
  compatible:
    oneOf:
      - description: msm9860 TSENS based
        items:
          - enum:
              - qcom,ipq8064-tsens

      - description: v0.1 of TSENS
        items:
          - enum:
              - qcom,mdm9607-tsens
              - qcom,msm8916-tsens
              - qcom,msm8939-tsens
              - qcom,msm8974-tsens
@@ -43,6 +49,7 @@ properties:
              - qcom,sdm845-tsens
              - qcom,sm8150-tsens
              - qcom,sm8250-tsens
              - qcom,sm8350-tsens
          - const: qcom,tsens-v2

  reg:
@@ -73,7 +80,9 @@ properties:
    maxItems: 2
    items:
      - const: calib
      - const: calib_sel
      - enum:
          - calib_backup
          - calib_sel

  "#qcom,sensors":
    description:
@@ -88,12 +97,21 @@ properties:
      Number of cells required to uniquely identify the thermal sensors. Since
      we have multiple sensors this is set to 1

required:
  - compatible
  - interrupts
  - interrupt-names
  - "#thermal-sensor-cells"
  - "#qcom,sensors"

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,ipq8064-tsens
              - qcom,mdm9607-tsens
              - qcom,msm8916-tsens
              - qcom,msm8974-tsens
              - qcom,msm8976-tsens
@@ -114,17 +132,42 @@ allOf:
        interrupt-names:
          minItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,tsens-v0_1
              - qcom,tsens-v1
              - qcom,tsens-v2

    then:
      required:
  - compatible
        - reg
  - "#qcom,sensors"
  - interrupts
  - interrupt-names
  - "#thermal-sensor-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    // Example msm9860 based SoC (ipq8064):
    gcc: clock-controller {

           /* ... */

           tsens: thermal-sensor {
                compatible = "qcom,ipq8064-tsens";

                 nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
                 nvmem-cell-names = "calib", "calib_backup";
                 interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
                 interrupt-names = "uplow";

                 #qcom,sensors = <11>;
                 #thermal-sensor-cells = <1>;
          };
    };

  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    // Example 1 (legacy: for pre v1 IP):
+35 −8
Original line number Diff line number Diff line
@@ -28,14 +28,7 @@ properties:
      - renesas,r8a77980-thermal # R-Car V3H
      - renesas,r8a779a0-thermal # R-Car V3U

  reg:
    minItems: 2
    maxItems: 4
    items:
      - description: TSC1 registers
      - description: TSC2 registers
      - description: TSC3 registers
      - description: TSC4 registers
  reg: true

  interrupts:
    items:
@@ -71,8 +64,25 @@ if:
          enum:
            - renesas,r8a779a0-thermal
then:
  properties:
    reg:
      minItems: 2
      maxItems: 3
      items:
        - description: TSC1 registers
        - description: TSC2 registers
        - description: TSC3 registers
  required:
    - interrupts
else:
  properties:
    reg:
      items:
        - description: TSC0 registers
        - description: TSC1 registers
        - description: TSC2 registers
        - description: TSC3 registers
        - description: TSC4 registers

additionalProperties: false

@@ -111,3 +121,20 @@ examples:
                    };
            };
    };
  - |
    #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a779a0-sysc.h>

    tsc_r8a779a0: thermal@e6190000 {
            compatible = "renesas,r8a779a0-thermal";
            reg = <0xe6190000 0x200>,
                  <0xe6198000 0x200>,
                  <0xe61a0000 0x200>,
                  <0xe61a8000 0x200>,
                  <0xe61b0000 0x200>;
            clocks = <&cpg CPG_MOD 919>;
            power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
            resets = <&cpg 919>;
            #thermal-sensor-cells = <1>;
    };
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ properties:
      containing several internal sensors.
    enum: [0, 1]

required:
  - "#thermal-sensor-cells"

additionalProperties: true

examples:
Loading