On 11/5/24 05:52, Marek Vasut wrote:
Delta AFC0612DB-F00 fan has to be set to at least 30% PWM duty cycle
to spin up from a dead stop, and can be afterward throttled down to
lower PWM duty cycle. Introduce support for operating such fans which
Doesn't this imply that a minimum pwm value is needed as well ?
Super-IO chips such as the NCT67xx series typically have two separate
registers, one for the pwm start value and one for the minimum pwm value.
need to start at higher PWM duty cycle first and can slow down next.
Document two new DT properties, "fan-dead-stop-start-percent" and
"fan-dead-stop-start-usec". The former describes the minimum percent
of fan RPM at which it will surely spin up from dead stop. This value
can be found in the fan datasheet and can be converted to PWM duty
cycle easily. The "fan-dead-stop-start-usec" describes the minimum
time in microseconds for which the fan has to be set to dead stop
start RPM for the fan to surely spin up.
Signed-off-by: Marek Vasut <marex@xxxxxxx>
---
Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: Jean Delvare <jdelvare@xxxxxxxx>
Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-hwmon@xxxxxxxxxxxxxxx
---
Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
index 4e5abf7580cc6..f1042471b5176 100644
--- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
+++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
@@ -31,6 +31,17 @@ properties:
it must be self resetting edge interrupts.
maxItems: 1
+ fan-dead-stop-start-percent:
Personally I don't think that "dead-stop" in the property name adds any value.
On the contrary, I think it leads to confusion. I head to read the description
to understand.
+ description:
+ Minimum fan RPM in percent to start from dead stop.
"to start when stopped" should be sufficient.
+ minimum: 0
+ maximum: 100
+
+ fan-dead-stop-start-usec:
+ description:
+ Time to wait in microseconds after start from dead stop.
Same as above for both name and description.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
pulses-per-revolution:
description:
Define the number of pulses per fan revolution for each tachometer