Add a binding for the Microchip EMC230X fan controller family, which is supported by the new "emc230x" hwmon driver. Signed-off-by: Mathew McBride <matt@xxxxxxxxxxxxxxx> --- .../bindings/hwmon/microchip,emc2301.yaml | 83 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml new file mode 100644 index 000000000000..1e5c7072caee --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/microchip,emc2301.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip EMC230X family RPM fan controller + +maintainers: + - Mathew McBride <matt@xxxxxxxxxxxxxxx> + +description: | + The Microchip EMC230X family (formerly produced by SMSC) is a family + of fan controllers which can drive via a set PWM period or + to a target RPM speed. They are available in variants from 1 to 5 + independent channels. + + Product information: + https://www.microchip.com/en-us/product/EMC2301 + https://www.microchip.com/en-us/product/EMC2302 + https://www.microchip.com/en-us/product/EMC2303 + https://www.microchip.com/en-us/product/EMC2305 + + +properties: + compatible: + enum: + - microchip,emc2301 + - microchip,emc2302 + - microchip,emc2303 + - microchip,emc2305 + reg: + maxItems: 1 + + "#address-cells": true + + "#size-cells": true + +required: + - compatible + - reg + +patternProperties: + "fan@[0-9]+$": + type: object + description: Fan channel properties for use as a thermal cooling device + + properties: + min-rpm: + description: Minimum fan RPM when used as a cooling device + maxItems: 1 + max-rpm: + description: Maximum fan RPM when used as a cooling device + maxItems: 1 + reg: + description: Channel number on EMC230X device the fan is attached to + maxItems: 1 + "#cooling-cells": + const: 2 + required: + - reg + - min-rpm + - max-rpm + - "#cooling-cells" +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fanctrl@2f { + compatible = "microchip,emc2301"; + reg = <0x2f>; + + fan@0 { + min-rpm = /bits/ 16 <3500>; + max-rpm = /bits/ 16 <5000>; + reg = <0>; + } + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index bf3c6c3c0492..5938780abe20 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8046,6 +8046,7 @@ MICROCHIP EMC230X PWM-FAN CONTROLLER DRIVERS M: Mathew McBride <matt@xxxxxxxxxxxxxxx> L: linux-hwmon@xxxxxxxxxxxxxxx S: Maintained +F: Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml F: drivers/hwmon/emc230x.c MICROCHIP POLARFIRE FPGA DRIVERS -- 2.30.1