Commit 388292df authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge back earlier thermal control updates for 5.19-rc1.

parents 5a66bfb2 c23b7517
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ description:
properties:
  compatible:
    enum:
      - qcom,sc8180x-lmh
      - qcom,sdm845-lmh
      - qcom,sm8150-lmh

+108 −2
Original line number Diff line number Diff line
@@ -10,7 +10,9 @@ maintainers:

properties:
  compatible:
    const: qcom,spmi-adc-tm5
    enum:
      - qcom,spmi-adc-tm5
      - qcom,spmi-adc-tm5-gen2

  reg:
    maxItems: 1
@@ -33,6 +35,7 @@ properties:
  qcom,avg-samples:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Number of samples to be used for measurement.
            Not applicable for Gen2 ADC_TM peripheral.
    enum:
      - 1
      - 2
@@ -45,6 +48,7 @@ properties:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: This parameter is used to decrease ADC sampling rate.
            Quicker measurements can be made by reducing decimation ratio.
            Not applicable for Gen2 ADC_TM peripheral.
    enum:
      - 250
      - 420
@@ -93,6 +97,29 @@ patternProperties:
          - const: 1
          - enum: [ 1, 3, 4, 6, 20, 8, 10 ]

      qcom,avg-samples:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: Number of samples to be used for measurement.
          This property in child node is applicable only for Gen2 ADC_TM peripheral.
        enum:
          - 1
          - 2
          - 4
          - 8
          - 16
        default: 1

      qcom,decimation:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: This parameter is used to decrease ADC sampling rate.
          Quicker measurements can be made by reducing decimation ratio.
          This property in child node is applicable only for Gen2 ADC_TM peripheral.
        enum:
          - 85
          - 340
          - 1360
        default: 1360

    required:
      - reg
      - io-channels
@@ -100,6 +127,31 @@ patternProperties:
    additionalProperties:
      false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: qcom,spmi-adc-tm5

    then:
      patternProperties:
        "^([-a-z0-9]*)@[0-7]$":
          properties:
            qcom,decimation: false
            qcom,avg-samples: false

  - if:
      properties:
        compatible:
          contains:
            const: qcom,spmi-adc-tm5-gen2

    then:
      properties:
        qcom,avg-samples: false
        qcom,decimation: false

required:
  - compatible
  - reg
@@ -124,7 +176,7 @@ examples:
            #size-cells = <0>;
            #io-channel-cells = <1>;

            /* Other propreties are omitted */
            /* Other properties are omitted */
            conn-therm@4f {
                reg = <ADC5_AMUX_THM3_100K_PU>;
                qcom,ratiometric;
@@ -148,4 +200,58 @@ examples:
            };
        };
    };

  - |
    #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
    #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    spmi_bus {
        #address-cells = <1>;
        #size-cells = <0>;
        pmk8350_vadc: adc@3100 {
            reg = <0x3100>;
            compatible = "qcom,spmi-adc7";
            #address-cells = <1>;
            #size-cells = <0>;
            #io-channel-cells = <1>;

            /* Other properties are omitted */
            xo-therm@44 {
                reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
                qcom,ratiometric;
                qcom,hw-settle-time = <200>;
            };

            conn-therm@47 {
                reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
                qcom,ratiometric;
                qcom,hw-settle-time = <200>;
            };
        };

        pmk8350_adc_tm: adc-tm@3400 {
            compatible = "qcom,spmi-adc-tm5-gen2";
            reg = <0x3400>;
            interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
            #thermal-sensor-cells = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            pmk8350-xo-therm@0 {
                reg = <0>;
                io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
                qcom,decimation = <340>;
                qcom,ratiometric;
                qcom,hw-settle-time-us = <200>;
            };

            conn-therm@1 {
                reg = <1>;
                io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>;
                qcom,avg-samples = <2>;
                qcom,ratiometric;
                qcom,hw-settle-time-us = <200>;
            };
        };
    };
...
+4 −1
Original line number Diff line number Diff line
@@ -19,10 +19,11 @@ description: |
properties:
  compatible:
    oneOf:
      - description: msm9860 TSENS based
      - description: msm8960 TSENS based
        items:
          - enum:
              - qcom,ipq8064-tsens
              - qcom,msm8960-tsens

      - description: v0.1 of TSENS
        items:
@@ -49,6 +50,7 @@ properties:
              - qcom,sc7180-tsens
              - qcom,sc7280-tsens
              - qcom,sc8180x-tsens
              - qcom,sc8280xp-tsens
              - qcom,sdm630-tsens
              - qcom,sdm845-tsens
              - qcom,sm8150-tsens
@@ -116,6 +118,7 @@ allOf:
              - qcom,ipq8064-tsens
              - qcom,mdm9607-tsens
              - qcom,msm8916-tsens
              - qcom,msm8960-tsens
              - qcom,msm8974-tsens
              - qcom,msm8976-tsens
              - qcom,qcs404-tsens
+2 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@ properties:
  compatible:
    items:
      - enum:
          - renesas,r9a07g043-tsu # RZ/G2UL
          - renesas,r9a07g044-tsu # RZ/G2{L,LC}
          - renesas,r9a07g054-tsu # RZ/V2L
      - const: renesas,rzg2l-tsu

  reg:
+63 −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/ti,j72xx-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments J72XX VTM (DTS) binding

maintainers:
  - Keerthy <j-keerthy@ti.com>

properties:
  compatible:
    enum:
      - ti,j721e-vtm
      - ti,j7200-vtm

  reg:
    items:
      - description: VTM cfg1 register space
      - description: VTM cfg2 register space
      - description: VTM efuse register space

  power-domains:
    maxItems: 1

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

required:
  - compatible
  - reg
  - power-domains
  - "#thermal-sensor-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/soc/ti,sci_pm_domain.h>
    wkup_vtm0: thermal-sensor@42040000 {
        compatible = "ti,j721e-vtm";
        reg = <0x42040000 0x350>,
              <0x42050000 0x350>,
              <0x43000300 0x10>;
        power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
        #thermal-sensor-cells = <1>;
    };

    mpu_thermal: mpu-thermal {
        polling-delay-passive = <250>; /* milliseconds */
        polling-delay = <500>; /* milliseconds */
        thermal-sensors = <&wkup_vtm0 0>;

        trips {
            mpu_crit: mpu-crit {
                temperature = <125000>; /* milliCelsius */
                hysteresis = <2000>; /* milliCelsius */
                type = "critical";
            };
        };
    };
...
Loading