Commit bd7bcc4f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files
Pull thermal driver changes for 6.2-rc1 from Daniel Lezcano:

"- Add the sm8450 QCom compatible string in the DT bindings (Luca
   Weiss)

 - Use devm_platform_get_and_ioremap_resource on the ST platform to
   group two calls into a single one (Minghao Chi)

 - Add the sm8550 QCom compatible string in the DT bindings (Neil
   Armstrong)

 - Use GENMASK instead of bitmaps and validate the temperature after
   reading it (Marcus Folkesson)

 - Convert generic-adc-thermal to DT schema (Rob Herring)

 - Fix the debug print message where the logic is inverted (Keerthy)

 - Fix memory leak on thermal_of_zone_register() failure (Ido Schimmel)

 - Add support for IPQ8074 in the tsens driver along with the DT
   bindings (Robert Marko)

 - Fix and rework the debugfs code in the tsens driver (Christian
   Marangi)

 - Add calibration and DT documentation for the imx8mm driver (Marek
   Vasut)

 - Add DT bindings and compatible for the Mediatek SoCs mt7981 and
   mt7983 (Daniel Golle)

 - Don't show an error message if it happens at probe time while it
   will be deferred on the QCom SPMI ADC driver (Johan Hovold)

 - Add the HWMon support on the imx8mm board (Alexander Stein)

 - Remove a pointless include in the power allocator governor
   (Christophe JAILLET)

 - Add interrupt DT bindings for QCom SoCs SC8280XP, SM6350 and SM8450
   (Krzysztof Kozlowski)

 - Fix inaccurate warning message for the QCom tsens gen2 (Luca Weiss)

 - Demote error log of thermal zone register to debug on the tsens QCom
   driver (Manivannan Sadhasivam)

 - Consolidate the TI Bandgap driver regarding how is handled the efuse
   values and the errata handling (Bryan Brattlof)

 - Document the Renesas RZ/Five as compatible with RZ/G2UL in the DT
   bindings (Lad Prabhakar)

 - Fix the irq handler return value in the LMh driver (Bjorn Andersson)

 - Delete platform remove callback as it is empty (Uwe Kleine-König)"

* tag 'thermal-v6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (34 commits)
  thermal/drivers/imx_sc_thermal: Drop empty platform remove function
  thermal/drivers/qcom/lmh: Fix irq handler return value
  dt-bindings: thermal: qcom-tsens: Add compatible for sm8550
  thermal/drivers/st: Use devm_platform_get_and_ioremap_resource()
  dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC
  dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range
  dt-bindings: thermal: k3-j72xx: elaborate on binding description
  thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround
  thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure
  thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag
  thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function
  thermal/drivers/qcom: Demote error log of thermal zone register to debug
  thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2
  dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450
  thermal/core/power allocator: Remove a useless include
  thermal/drivers/imx8mm: Add hwmon support
  thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC
  thermal: ti-soc-thermal: Drop comma after SoC match table sentinel
  thermal/drivers/imx: Add support for loading calibration data from OCOTP
  ...
parents 904f309a 5011a110
Loading
Loading
Loading
Loading
+84 −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/generic-adc-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: General Purpose Analog To Digital Converter (ADC) based thermal sensor

maintainers:
  - Laxman Dewangan <ldewangan@nvidia.com>

description:
  On some of platforms, thermal sensor like thermistors are connected to
  one of ADC channel and sensor resistance is read via voltage across the
  sensor resistor. The voltage read across the sensor is mapped to
  temperature using voltage-temperature lookup table.

properties:
  compatible:
    const: generic-adc-thermal

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

  io-channels:
    maxItems: 1

  io-channel-names:
    const: sensor-channel

  temperature-lookup-table:
    description: |
      Lookup table to map the relation between ADC value and temperature.
      When ADC is read, the value is looked up on the table to get the
      equivalent temperature.

      If not specified, driver assumes the ADC channel gives milliCelsius
      directly.
    $ref: /schemas/types.yaml#/definitions/int32-matrix
    items:
      items:
        - description: Temperature in milliCelsius
        - description: ADC read value

required:
  - compatible
  - '#thermal-sensor-cells'
  - io-channels
  - io-channel-names

additionalProperties: false

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

    thermal-sensor {
        compatible = "generic-adc-thermal";
        #thermal-sensor-cells = <0>;
        io-channels = <&ads1015 1>;
        io-channel-names = "sensor-channel";
        temperature-lookup-table = <
              (-40000) 2578
              (-39000) 2577
              (-38000) 2576
              (-37000) 2575
              (-36000) 2574
              (-35000) 2573
              (-34000) 2572
              (-33000) 2571
              (-32000) 2569
              (-31000) 2568
              (-30000) 2567
              /* skip */
              118000 254
              119000 247
              120000 240
              121000 233
              122000 226
              123000 220
              124000 214
              125000 208>;
    };
...
+7 −0
Original line number Diff line number Diff line
@@ -32,6 +32,13 @@ properties:
  clocks:
    maxItems: 1

  nvmem-cells:
    maxItems: 1
    description: Phandle to the calibration data provided by ocotp

  nvmem-cell-names:
    const: calib

  "#thermal-sensor-cells":
    description: |
      Number of cells required to uniquely identify the thermal
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ Required properties:
  - "mediatek,mt2701-thermal" : For MT2701 family of SoCs
  - "mediatek,mt2712-thermal" : For MT2712 family of SoCs
  - "mediatek,mt7622-thermal" : For MT7622 SoC
  - "mediatek,mt7981-thermal", "mediatek,mt7986-thermal" : For MT7981 SoC
  - "mediatek,mt7986-thermal" : For MT7986 SoC
  - "mediatek,mt8183-thermal" : For MT8183 family of SoCs
  - "mediatek,mt8516-thermal", "mediatek,mt2701-thermal : For MT8516 family of SoCs
- reg: Address range of the thermal controller
+70 −11
Original line number Diff line number Diff line
@@ -57,8 +57,14 @@ properties:
              - qcom,sm8150-tsens
              - qcom,sm8250-tsens
              - qcom,sm8350-tsens
              - qcom,sm8450-tsens
              - qcom,sm8550-tsens
          - const: qcom,tsens-v2

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

  reg:
    items:
      - description: TM registers
@@ -66,15 +72,11 @@ properties:

  interrupts:
    minItems: 1
    items:
      - description: Combined interrupt if upper or lower threshold crossed
      - description: Interrupt if critical threshold crossed
    maxItems: 2

  interrupt-names:
    minItems: 1
    items:
      - const: uplow
      - const: critical
    maxItems: 2

  nvmem-cells:
    minItems: 1
@@ -128,22 +130,64 @@ allOf:
    then:
      properties:
        interrupts:
          maxItems: 1
          items:
            - description: Combined interrupt if upper or lower threshold crossed
        interrupt-names:
          items:
            - const: uplow

  - if:
      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
    then:
      properties:
        interrupts:
          items:
            - description: Combined interrupt if upper or lower threshold crossed
            - description: Interrupt if critical threshold crossed
        interrupt-names:
          maxItems: 1
          items:
            - const: uplow
            - const: critical

    else:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,ipq8074-tsens
    then:
      properties:
        interrupts:
          minItems: 2
          items:
            - description: Combined interrupt if upper, lower or critical thresholds crossed
        interrupt-names:
          minItems: 2
          items:
            - const: combined

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,ipq8074-tsens
              - qcom,tsens-v0_1
              - qcom,tsens-v1
              - qcom,tsens-v2
@@ -226,4 +270,19 @@ examples:
           #qcom,sensors = <13>;
           #thermal-sensor-cells = <1>;
    };

  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    // Example 4 (for any IPQ8074 based SoC-s):
    tsens4: thermal-sensor@4a9000 {
           compatible = "qcom,ipq8074-tsens";
           reg = <0x4a9000 0x1000>,
                 <0x4a8000 0x1000>;

           interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
           interrupt-names = "combined";

           #qcom,sensors = <16>;
           #thermal-sensor-cells = <1>;
    };
...
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ properties:
  compatible:
    items:
      - enum:
          - renesas,r9a07g043-tsu # RZ/G2UL
          - renesas,r9a07g043-tsu # RZ/G2UL and RZ/Five
          - renesas,r9a07g044-tsu # RZ/G2{L,LC}
          - renesas,r9a07g054-tsu # RZ/V2L
      - const: renesas,rzg2l-tsu
Loading