Commit 8d7868c4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull thermal control updates from Rafael Wysocki:
 "These extend the int340x thermal driver, add thermal DT bindings for
  some Qcom platforms, add DT bindings and support for Armada AP807 and
  MSM8909, allow selecting the bang-bang thermal governor as the default
  one, address issues in several thermal drivers for ARM platforms and
  clean up code.

  Specifics:

   - Add new IOCTLs to the int340x thermal driver to allow user space to
     retrieve the Passive v2 thermal table (Srinivas Pandruvada)

   - Add DT bindings for SM6375, MSM8226 and QCM2290 Qcom platforms
     (Konrad Dybcio)

   - Add DT bindings and support for QCom MSM8226 (Matti Lehtimäki)

   - Add DT bindings for QCom ipq9574 (Praveenkumar I)

   - Convert bcm2835 DT bindings to the yaml schema (Stefan Wahren)

   - Allow selecting the bang-bang governor as default (Thierry Reding)

   - Refactor and prepare the code to set the scene for RCar Gen4
     (Wolfram Sang)

   - Clean up and fix the QCom tsens drivers. Add DT bindings and
     calibration for the MSM8909 platform (Stephan Gerhold)

   - Revert a patch introducing a wrong usage of devm_of_iomap() on the
     Mediatek platform (Ricardo Cañuelo)

   - Fix the clock vs reset ordering in order to conform to the
     documentation on the sun8i (Christophe JAILLET)

   - Prevent setting up undocumented registers, enable the only
     described sensors and add the version 2.1 on the Qoriq sensor (Peng
     Fan)

   - Add DT bindings and support for the Armada AP807 (Alex Leibovich)

   - Update the mlx5 driver with the recent thermal changes (Daniel
     Lezcano)

   - Convert to platform remove callback returning void on STM32 (Uwe
     Kleine-König)

   - Add an error information printing for devm_thermal_add_hwmon_sysfs()
     and remove the error from the Sun8i, Amlogic, i.MX, TI, K3, Tegra,
     Qoriq, Mediateka and QCom (Yangtao Li)

   - Register as hwmon sensor for the Generic ADC (Chen-Yu Tsai)

   - Use the dev_err_probe() function in the QCom tsens alarm driver
     (Luca Weiss)"

* tag 'thermal-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits)
  thermal/drivers/qcom/temp-alarm: Use dev_err_probe
  thermal/drivers/generic-adc: Register thermal zones as hwmon sensors
  thermal/drivers/mediatek/lvts_thermal: Remove redundant msg in lvts_ctrl_start()
  thermal/drivers/qcom: Remove redundant msg at probe time
  thermal/drivers/ti-soc: Remove redundant msg in ti_thermal_expose_sensor()
  thermal/drivers/qoriq: Remove redundant msg in qoriq_tmu_register_tmu_zone()
  thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel()
  drivers/thermal/k3: Remove redundant msg in k3_bandgap_probe()
  thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe()
  thermal/drivers/amlogic: Remove redundant msg in amlogic_thermal_probe()
  thermal/drivers/sun8i: Remove redundant msg in sun8i_ths_register()
  thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs()
  thermal/drivers/stm32: Convert to platform remove callback returning void
  net/mlx5: Update the driver with the recent thermal changes
  thermal/drivers/armada: Add support for AP807 thermal data
  dt-bindings: armada-thermal: Add armada-ap807-thermal compatible
  thermal/drivers/qoriq: Support version 2.1
  thermal/drivers/qoriq: Only enable supported sensors
  thermal/drivers/qoriq: No need to program site adjustment register
  thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
  ...
parents 40e8e98f a8460ba5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Required properties:
    * marvell,armada380-thermal
    * marvell,armadaxp-thermal
    * marvell,armada-ap806-thermal
    * marvell,armada-ap807-thermal
    * marvell,armada-cp110-thermal

Note: these bindings are deprecated for AP806/CP110 and should instead
+0 −41
Original line number Diff line number Diff line
Binding for Thermal Sensor driver for BCM2835 SoCs.

Required parameters:
-------------------

compatible: 		should be one of: "brcm,bcm2835-thermal",
			"brcm,bcm2836-thermal" or "brcm,bcm2837-thermal"
reg:			Address range of the thermal registers.
clocks: 		Phandle of the clock used by the thermal sensor.
#thermal-sensor-cells:	should be 0 (see Documentation/devicetree/bindings/thermal/thermal-sensor.yaml)

Example:

thermal-zones {
	cpu_thermal: cpu-thermal {
		polling-delay-passive = <0>;
		polling-delay = <1000>;

		thermal-sensors = <&thermal>;

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

		coefficients = <(-538)	407000>;

		cooling-maps {
		};
	};
};

thermal: thermal@7e212000 {
	compatible = "brcm,bcm2835-thermal";
	reg = <0x7e212000 0x8>;
	clocks = <&clocks BCM2835_CLOCK_TSENS>;
	#thermal-sensor-cells = <0>;
};
+48 −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,bcm2835-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom BCM2835 thermal sensor

maintainers:
  - Stefan Wahren <stefan.wahren@i2se.com>

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

properties:
  compatible:
    enum:
      - brcm,bcm2835-thermal
      - brcm,bcm2836-thermal
      - brcm,bcm2837-thermal

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

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

unevaluatedProperties: false

required:
  - compatible
  - reg
  - clocks
  - '#thermal-sensor-cells'

examples:
  - |
    #include <dt-bindings/clock/bcm2835.h>

    thermal@7e212000 {
      compatible = "brcm,bcm2835-thermal";
      reg = <0x7e212000 0x8>;
      clocks = <&clocks BCM2835_CLOCK_TSENS>;
      #thermal-sensor-cells = <0>;
    };
+11 −21
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ properties:
        items:
          - enum:
              - qcom,mdm9607-tsens
              - qcom,msm8226-tsens
              - qcom,msm8909-tsens
              - qcom,msm8916-tsens
              - qcom,msm8939-tsens
              - qcom,msm8974-tsens
@@ -48,6 +50,7 @@ properties:
              - qcom,msm8953-tsens
              - qcom,msm8996-tsens
              - qcom,msm8998-tsens
              - qcom,qcm2290-tsens
              - qcom,sc7180-tsens
              - qcom,sc7280-tsens
              - qcom,sc8180x-tsens
@@ -56,6 +59,7 @@ properties:
              - qcom,sdm845-tsens
              - qcom,sm6115-tsens
              - qcom,sm6350-tsens
              - qcom,sm6375-tsens
              - qcom,sm8150-tsens
              - qcom,sm8250-tsens
              - qcom,sm8350-tsens
@@ -67,6 +71,12 @@ properties:
        enum:
          - qcom,ipq8074-tsens

      - description: v2 of TSENS with combined interrupt
        items:
          - enum:
              - qcom,ipq9574-tsens
          - const: qcom,ipq8074-tsens

  reg:
    items:
      - description: TM registers
@@ -223,12 +233,7 @@ allOf:
          contains:
            enum:
              - qcom,ipq8064-tsens
              - qcom,mdm9607-tsens
              - qcom,msm8916-tsens
              - qcom,msm8960-tsens
              - qcom,msm8974-tsens
              - qcom,msm8976-tsens
              - qcom,qcs404-tsens
              - qcom,tsens-v0_1
              - qcom,tsens-v1
    then:
@@ -244,22 +249,7 @@ allOf:
      properties:
        compatible:
          contains:
            enum:
              - qcom,msm8953-tsens
              - qcom,msm8996-tsens
              - qcom,msm8998-tsens
              - qcom,sc7180-tsens
              - qcom,sc7280-tsens
              - qcom,sc8180x-tsens
              - qcom,sc8280xp-tsens
              - qcom,sdm630-tsens
              - qcom,sdm845-tsens
              - qcom,sm6350-tsens
              - qcom,sm8150-tsens
              - qcom,sm8250-tsens
              - qcom,sm8350-tsens
              - qcom,sm8450-tsens
              - qcom,tsens-v2
            const: qcom,tsens-v2
    then:
      properties:
        interrupts:
+8 −7
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ static int mlx5_thermal_get_mtmp_temp(struct mlx5_core_dev *mdev, u32 id, int *p
static int mlx5_thermal_get_temp(struct thermal_zone_device *tzdev,
				 int *p_temp)
{
	struct mlx5_thermal *thermal = tzdev->devdata;
	struct mlx5_thermal *thermal = thermal_zone_device_priv(tzdev);
	struct mlx5_core_dev *mdev = thermal->mdev;
	int err;

@@ -81,7 +81,8 @@ int mlx5_thermal_init(struct mlx5_core_dev *mdev)
		return -ENOMEM;

	thermal->mdev = mdev;
	thermal->tzdev = thermal_zone_device_register(data,
	thermal->tzdev = thermal_zone_device_register_with_trips(data,
								 NULL,
								 MLX5_THERMAL_NUM_TRIPS,
								 MLX5_THERMAL_TRIP_MASK,
								 thermal,
Loading