Introduce yaml schema for Microchip emc2101 pwm fan controller with temperature monitoring. Signed-off-by: Álvaro Fernández Rojas <noltari@xxxxxxxxx> --- .../bindings/hwmon/microchip,emc2101.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc2101.yaml v3: fix errors, remove patternProperties and drop emc2101-r. v2: add missing properties. diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc2101.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc2101.yaml new file mode 100644 index 000000000000..10167747f748 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc2101.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/microchip,emc2101.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip EMC2101 SMBus compliant PWM fan controller + +maintainers: + - Álvaro Fernández Rojas <noltari@xxxxxxxxx> + +description: + Microchip EMC2101 pwm controller which supports up to 1 fan, 1 internal + temperature sensor, 1 external temperature sensor and an 8 entry look + up table to create a programmable temperature response. + +properties: + compatible: + enum: + - microchip,emc2101 + + reg: + maxItems: 1 + + fan: + $ref: fan-common.yaml# + unevaluatedProperties: false + + '#pwm-cells': + const: 2 + description: | + Number of cells in a PWM specifier. + - cell 0: The PWM frequency + - cell 1: The PWM polarity: 0 or PWM_POLARITY_INVERTED + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fan_controller: fan-controller@4c { + compatible = "microchip,emc2101"; + reg = <0x4c>; + + #pwm-cells = <2>; + + fan { + pwms = <&fan_controller 5806 0>; + }; + }; + }; +... -- 2.39.5