1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/hwmon/microchip,emc2305.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Microchip EMC2305 SMBus compliant PWM fan controller 8 9maintainers: 10 - Michael Shych <michaelsh@nvidia.com> 11 12description: 13 Microchip EMC2301/2/3/5 pwm controller which supports up to five programmable 14 fan control circuits. 15 16properties: 17 compatible: 18 oneOf: 19 - enum: 20 - microchip,emc2305 21 - items: 22 - enum: 23 - microchip,emc2303 24 - microchip,emc2302 25 - microchip,emc2301 26 - const: microchip,emc2305 27 28 reg: 29 maxItems: 1 30 31 '#address-cells': 32 const: 1 33 34 '#size-cells': 35 const: 0 36 37 '#pwm-cells': 38 const: 3 39 description: | 40 Number of cells in a PWM specifier. 41 - cell 0: The PWM frequency 42 - cell 1: The PWM polarity: 0 or PWM_POLARITY_INVERTED 43 - cell 2: The PWM output config: 44 - 0 (Open-Drain) 45 - 1 (Push-Pull) 46 47patternProperties: 48 '^fan@[0-4]$': 49 $ref: fan-common.yaml# 50 unevaluatedProperties: false 51 properties: 52 reg: 53 description: 54 The fan number used to determine the associated PWM channel. 55 maxItems: 1 56 57 required: 58 - reg 59 60required: 61 - compatible 62 - reg 63 64additionalProperties: false 65 66examples: 67 - | 68 #include <dt-bindings/pwm/pwm.h> 69 i2c { 70 #address-cells = <1>; 71 #size-cells = <0>; 72 73 fan_controller: fan-controller@2f { 74 compatible = "microchip,emc2305"; 75 reg = <0x2f>; 76 #address-cells = <1>; 77 #size-cells = <0>; 78 #pwm-cells = <3>; 79 80 fan@0 { 81 reg = <0x0>; 82 pwms = <&fan_controller 26000 PWM_POLARITY_INVERTED 1>; 83 #cooling-cells = <2>; 84 }; 85 86 fan@1 { 87 reg = <0x1>; 88 pwms = <&fan_controller 26000 0 1>; 89 #cooling-cells = <2>; 90 }; 91 92 fan@2 { 93 reg = <0x2>; 94 pwms = <&fan_controller 26000 0 1>; 95 #cooling-cells = <2>; 96 }; 97 98 fan@3 { 99 reg = <0x3>; 100 pwms = <&fan_controller 26000 0 1>; 101 #cooling-cells = <2>; 102 }; 103 104 fan@4 { 105 reg = <0x4>; 106 pwms = <&fan_controller 26000 0 1>; 107 #cooling-cells = <2>; 108 }; 109 }; 110 }; 111... 112