1Bindings for the Maxim MAX31785 Intelligent Fan Controller 2========================================================== 3 4Reference: 5 6https://datasheets.maximintegrated.com/en/ds/MAX31785.pdf 7 8Required properties: 9- compatible : One of "maxim,max31785" or "maxim,max31785a" 10- reg : I2C address, one of 0x52, 0x53, 0x54, 0x55. 11- #address-cells : Must be 1 12- #size-cells : Must be 0 13- #thermal-sensor-cells : Should be 1. The device supports: 14 - One internal sensor 15 - Four external I2C digital sensors 16 - Six external thermal diodes 17 18Optional properties: 19- use-stored-presence : Do not treat the devicetree description as canon for 20 fan presence (the 'installed' bit of FAN_CONFIG_*). 21 Instead, rely on the on the default value store of 22 the device to populate it. 23 24Capabilities are configured through subnodes of the controller's node. 25 26Fans 27---- 28 29Only fans with subnodes present will be considered as installed. If 30use-stored-presence is present in the parent node, then only fans that are both 31defined in the devicetree and have their installed bit set are considered 32installed. 33 34Required subnode properties: 35- compatible : Must be "pmbus-fan" 36- reg : The PMBus page the properties apply to. 37- #cooling-cells : Should be 2. See the thermal bindings at [1]. 38- maxim,fan-rotor-input : The type of rotor measurement provided to the 39 controller. Must be either "tach" for tachometer 40 pulses or "lock" for a locked-rotor signal. 41- maxim,fan-lock-polarity: Required iff maxim,fan-rotor-input is "lock". Valid 42 values are "low" for active low, "high" for active 43 high. 44 45Optional subnode properties: 46- fan-mode : "rpm" or "pwm". Default value is "pwm". 47- tach-pulses : Tachometer pulses per revolution. Valid values are 48 1, 2, 3 or 4. The default is 1. 49- cooling-min-level : Smallest cooling state accepted. See [1]. 50- cooling-max-level : Largest cooling state accepted. See [1]. 51- maxim,fan-no-fault-ramp: Do not ramp the fan to 100% PWM duty on detecting a 52 fan fault 53- maxim,fan-startup : The number of rotations required before taking 54 emergency action for an unresponsive fan and driving 55 it with 100% or 0% PWM duty, depending on the state 56 of maxim,fan-no-fault-ramp. Valid values are 0 57 (automatic spin-up disabled), 2, 4, or 8. Default 58 value is 0. 59- maxim,fan-health : Enable automated fan health check 60- maxim,fan-ramp : Configures how fast the device ramps the PWM duty 61 cycle from one value to another. Valid values are 0 62 to 7 inclusive, with values 0 - 2 configuring a 63 1000ms update rate and 1 - 3% duty respective duty 64 increase, and 3 - 7 a 200ms update rate with a 1 - 65 5% respective duty increase. Default value is 0. 66- maxim,fan-no-watchdog : Do not ramp fan to 100% PWM duty on failure to 67 update desired fan rate inside 10s. This implies 68 maxim,tmp-no-fault-ramp 69- maxim,tmp-no-fault-ramp: Do not ramp fan to 100% PWM duty on temperature 70 sensor fault detection. This implies 71 maxim,fan-no-watchdog 72- maxim,tmp-hysteresis : The temperature hysteresis used to determine 73 transitions to lower fan speed bands in the 74 temperature/fan rate lookup table. Valid values are 75 2, 4, 6 or 8 (degrees celcius). Default value is 2. 76- maxim,fan-dual-tach : Enable dual tachometer functionality 77- maxim,fan-pwm-freq : The PWM frequency. Valid values are 30, 50, 100, 150 78 and 25000 (Hz). Default value is 30Hz. 79- maxim,fan-lookup-table : A 16-element cell array of alternating temperature 80 and rate values representing the look up table. The 81 rate units are set through the fan-mode property. 82- maxim,fan-fault-pin-mon: Ramp fans to 100% PWM duty when the FAULT pin is 83 asserted 84 85Temperature 86----------- 87 88Required subnode properties: 89- compatible : Must be "pmbus-temperature" 90- reg : The PMBus page the properties apply to. 91 92Optional subnode properties: 93- maxim,tmp-offset : Valid values are 0 - 30 (degrees celcius) inclusive. 94 Default value is 0. 95- maxim,tmp-fans : An array of phandles to fans controlled by the 96 current temperature sensor. 97 98[1] Documentation/devicetree/bindings/thermal/thermal.txt 99 100Example: 101 fan-max31785: max31785@52 { 102 reg = <0x52>; 103 compatible = "maxim,max31785"; 104 #address-cells = <1>; 105 #size-cells = <0>; 106 #thermal-sensor-cells = <1>; 107 108 fan@0 { 109 compatible = "pmbus-fan"; 110 reg = <0>; 111 mode = "rpm"; 112 tach-pulses = <1>; 113 114 #cooling-cells = <2>; 115 cooling-min-level = <0>; 116 cooling-max-level = <9>; 117 118 maxim,fan-rotor-input = "tach"; 119 maxim,fan-dual-tach; 120 }; 121 122 /* 123 * Hardware controlled fan: Fan speed is controlled by a 124 * temperature sensor feeding values into the lookup table. The 125 * fan association is done in the temperature sensor node. One 126 * sensor can drive multiple fans. 127 */ 128 cpu_fan: fan@1 { 129 compatible = "pmbus-fan"; 130 reg = <1>; 131 mode = "rpm"; 132 tach-pulses = <1>; 133 134 #cooling-cells = <2>; 135 136 maxim,fan-rotor-input = "tach"; 137 maxim,tmp-hysteresis = <2>; 138 maxim,fan-lookup-table = < 139 /* Temperature RPM */ 140 0 1000 141 10 2000 142 20 3000 143 30 4000 144 40 5000 145 50 6000 146 60 7000 147 70 8000 148 >; 149 }; 150 151 cpu_temp: sensor@6 { 152 compatible = "pmbus-temperature"; 153 reg = <6>; 154 155 maxim,tmp-offset = <0>; 156 maxim,tmp-fans = <&cpu_fan>; 157 }; 158 }; 159