Commit 532355a7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-v7.0-rc1' of...

Merge tag 'hwmon-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New PMBus drivers:

   - HiTRON HAC300S power supply

   - Monolithic MP5926 Hot-Swap Controller

   - STEF48H28 hot-swap controller

  Support for new chips in existing drivers

   - Support for Pro WS TRX50-SAGE WIFI A and ROG MAXIMUS X HERO
     (asus-ec-sensors)

   - Support for Dell OptiPlex 7080 (dell-smm)

   - Support for F81968 (f71882fg)

   - Support for Micro PC 2 (gpd-fan)

   - New customer ID for ASRock Z590 Taichi (nct6683)

   - Support for ASUS Pro WS WRX90E-SAGE SE (nct6775)

   - Support for SHT85 (sht3x)

   - Support for P3T1035 and P3T2030 (tmp108)

  Bug fixes:

   - Revert "fix" for UAF which didn't fix a UAF but introduced a race
     condition resulting in a NULL pointer crash (ibmpex)

   - Fix failure to instantiate driver if the chip is configured for VID
     mode (pmbus/mpq8785)

   - Use READ/WRITE_ONCE to avoid compiler optimization induced race
     (max16065)

   - Resource leak fixes (nct7363, emc2305)

  Other notable changes:

   - Support for temperature limit thresholds (cros_ec)

   - Add TjMax for Silvermont through Tremont Atoms (coretemp)

  Various other minor improvements"

* tag 'hwmon-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (42 commits)
  hwmon: (pmbus/mpq8785) fix VOUT_MODE mismatch during identification
  Revert "hwmon: (ibmpex) fix use-after-free in high/low store"
  hwmon: (max16065) Use READ/WRITE_ONCE to avoid compiler optimization induced race
  hwmon: (nct6775) use sysfs_emit instead of sprintf
  hwmon: pmbus: fix table in STEF48H28 documentation
  hwmon: Add support for HiTRON HAC300S PSU
  dt-bindings: trivial-devices: Add hitron,hac300s
  hwmon: (cros_ec) Add support for temperature thresholds
  hwmon: (cros_ec) Move temperature channel params to a macro
  hwmon: (cros_ec) Add support for fan target speed
  hwmon: (cros_ec) Split up supported features in the documentation
  hwmon: (tmp108) Add P3T1035 and P3T2030 support
  hwmon: (tmp108) Add support for P3T1035 and P3T2030
  dt-bindings: hwmon: ti,tmp108: Add P3T1035,P3T2030
  hwmon: pmbus: add support for STEF48H28
  dt-bindings: hwmon: add STEF48H28
  hwmon: (nct7363) Fix a resource leak in nct7363_present_pwm_fanin
  hwmon: (emc2305) Fix a resource leak in emc2305_of_parse_pwm_child
  hwmon: (gpd-fan) add support for Micro PC 2
  hwmon: (coretemp) Add TjMax for Silvermont through Tremont Atoms
  ...
parents d7017821 9e33c1db
Loading
Loading
Loading
Loading
+106 −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/hwmon/aspeed,ast2400-pwm-tacho.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ASPEED AST2400/AST2500 PWM and Fan Tacho controller

maintainers:
  - Joel Stanley <joel@jms.id.au>
  - Andrew Jeffery <andrew@codeconstruct.com.au>

description: >
  The ASPEED PWM controller can support up to 8 PWM outputs. The ASPEED Fan
  Tacho controller can support up to 16 Fan tachometer inputs.

  There can be up to 8 fans supported. Each fan can have 1 PWM output and
  1-2 Fan tach inputs.

properties:
  compatible:
    enum:
      - aspeed,ast2400-pwm-tacho
      - aspeed,ast2500-pwm-tacho

  reg:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  '#cooling-cells':
    const: 2

  clocks:
    maxItems: 1

  resets:
    maxItems: 1

patternProperties:
  '^fan@[0-7]$':
    description: Fan subnode
    type: object
    additionalProperties: false

    properties:
      reg:
        description: PWM source port index (0 = PWM A, ..., 7 = PWM H)
        maximum: 7

      cooling-levels:
        description: PWM duty cycle values for cooling states
        $ref: /schemas/types.yaml#/definitions/uint8-array
        minItems: 1
        maxItems: 16  # Should be enough

      aspeed,fan-tach-ch:
        description: Fan tachometer input channel
        $ref: /schemas/types.yaml#/definitions/uint8-array
        minItems: 1
        maxItems: 2
        items:
          maximum: 15

    required:
      - reg
      - aspeed,fan-tach-ch

required:
  - compatible
  - reg
  - '#address-cells'
  - '#size-cells'
  - clocks
  - resets

additionalProperties: false

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

    fan-controller@1e786000 {
        compatible = "aspeed,ast2500-pwm-tacho";
        reg = <0x1e786000 0x1000>;
        #address-cells = <1>;
        #size-cells = <0>;
        #cooling-cells = <2>;
        clocks = <&syscon ASPEED_CLK_APB>;
        resets = <&syscon ASPEED_RESET_PWM>;

        fan@0 {
            reg = <0x00>;
            cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
            aspeed,fan-tach-ch = /bits/ 8 <0x00>;
        };

        fan@1 {
            reg = <0x01>;
            aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
        };
    };
+0 −73
Original line number Diff line number Diff line
ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver

The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho
controller can support upto 16 Fan tachometer inputs.

There can be upto 8 fans supported. Each fan can have one PWM output and
one/two Fan tach inputs.

Required properties for pwm-tacho node:
- #address-cells : should be 1.

- #size-cells : should be 1.

- #cooling-cells: should be 2.

- reg : address and length of the register set for the device.

- pinctrl-names : a pinctrl state named "default" must be defined.

- pinctrl-0 : phandle referencing pin configuration of the PWM ports.

- compatible : should be "aspeed,ast2400-pwm-tacho" for AST2400 and
	       "aspeed,ast2500-pwm-tacho" for AST2500.

- clocks : phandle to clock provider with the clock number in the second cell

- resets : phandle to reset controller with the reset number in the second cell

fan subnode format:
===================
Under fan subnode there can upto 8 child nodes, with each child node
representing a fan. If there are 8 fans each fan can have one PWM port and
one/two Fan tach inputs.
For PWM port can be configured cooling-levels to create cooling device.
Cooling device could be bound to a thermal zone for the thermal control.

Required properties for each child node:
- reg : should specify PWM source port.
	integer value in the range 0 to 7 with 0 indicating PWM port A and
	7 indicating PWM port H.

- cooling-levels: PWM duty cycle values in a range from 0 to 255
                  which correspond to thermal cooling states.

- aspeed,fan-tach-ch : should specify the Fan tach input channel.
                integer value in the range 0 through 15, with 0 indicating
		Fan tach channel 0 and 15 indicating Fan tach channel 15.
		At least one Fan tach input channel is required.

Examples:

pwm_tacho: pwmtachocontroller@1e786000 {
	#address-cells = <1>;
	#size-cells = <1>;
	#cooling-cells = <2>;
	reg = <0x1E786000 0x1000>;
	compatible = "aspeed,ast2500-pwm-tacho";
	clocks = <&syscon ASPEED_CLK_APB>;
	resets = <&syscon ASPEED_RESET_PWM>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;

	fan@0 {
		reg = <0x00>;
		cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
	};

	fan@1 {
		reg = <0x01>;
		aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
	};
};
+6 −2
Original line number Diff line number Diff line
@@ -14,8 +14,12 @@ description: |

properties:
  compatible:
    enum:
      - microchip,sparx5-temp
    oneOf:
      - const: microchip,sparx5-temp
      - items:
          - enum:
              - microchip,lan9691-temp
          - const: microchip,sparx5-temp

  reg:
    maxItems: 1
+13 −8
Original line number Diff line number Diff line
@@ -4,27 +4,32 @@
$id: http://devicetree.org/schemas/hwmon/ti,tmp108.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TMP108/P3T1085(NXP) temperature sensor
title: TMP108/P3T1035/P3T1085/P3T2030 temperature sensor

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

description: |
  The TMP108/P3T1085(NXP) is a digital-output temperature sensor with a
  dynamically-programmable limit window, and under- and overtemperature
  alert functions.
  The TMP108 or NXP P3T Family (P3T1035, P3T1085 and P3T2030) is a digital-
  output temperature sensor with a dynamically-programmable limit window,
  and under- and over-temperature alert functions.

  P3T1085(NXP) support I3C.
  NXP P3T Family (P3T1035, P3T1085 and P3T2030) supports I3C.

  Datasheets:
    https://www.ti.com/product/TMP108
    https://www.nxp.com/docs/en/data-sheet/P3T1085UK.pdf
    https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf

properties:
  compatible:
    enum:
      - nxp,p3t1085
      - ti,tmp108
    oneOf:
      - items:
          - const: nxp,p3t2030
          - const: nxp,p3t1035
      - const: nxp,p3t1035
      - const: nxp,p3t1085
      - const: ti,tmp108

  interrupts:
    items:
+6 −0
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ properties:
          - fsl,mma8450
            # MPR121: Proximity Capacitive Touch Sensor Controller
          - fsl,mpr121
            # HiTRON AC/DC CompactPCI Power Supply
          - hitron,hac300s
            # Honeywell Humidicon HIH-6130 humidity/temperature sensor
          - honeywell,hi6130
            # IBM Common Form Factor Power Supply Versions (all versions)
@@ -319,6 +321,8 @@ properties:
          - mps,mp5023
            # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5920
          - mps,mp5920
            # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5926
          - mps,mp5926
            # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5990
          - mps,mp5990
            # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5998
@@ -416,6 +420,8 @@ properties:
          - smsc,emc6d103s
            # SparkFun Qwiic Joystick (COM-15168) with i2c interface
          - sparkfun,qwiic-joystick
            # STMicroelectronics Hot-swap controller stef48h28
          - st,stef48h28
            # Sierra Wireless mangOH Green SPI IoT interface
          - swir,mangoh-iotport-spi
            # Synaptics I2C touchpad
Loading