Fan connected to PWM lines
Schema identifier ($id): "http://devicetree.org/schemas/hwmon/pwm-fan.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Jean Delvare <jdelvare@suse.com>", "Guenter Roeck <linux@roeck-us.net>"
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "pwm-fan"
cooling-levels — not listed as required here #
PWM duty cycle values corresponding to thermal cooling states.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Array item rules (items) #
Maximum value (
maximum):255
fan-supply — not listed as required here #
Phandle to the regulator that provides power to the fan.
interrupts — not listed as required here #
This contains an interrupt specifier for each fan tachometer output connected to an interrupt source. The output signal must generate a defined number of interrupts per fan revolution, which require that it must be self resetting edge interrupts.
Maximum number of items (maxItems): 1
fan-shutdown-percent — not listed as required here #
Fan RPM in percent set during shutdown. This is used to keep the fan running at fixed RPM after the kernel shut down, which is useful on hardware that does keep heating itself even after the kernel did shut down, for example from some sort of management core.
Minimum value (minimum): 0
Maximum value (maximum): 100
fan-stop-to-start-percent — not listed as required here #
Minimum fan RPM in percent to start when stopped.
Minimum value (minimum): 0
Maximum value (maximum): 100
fan-stop-to-start-us — not listed as required here #
Time to wait in microseconds after start when stopped.
pulses-per-revolution — not listed as required here #
Define the number of pulses per fan revolution for each tachometer input as an integer.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 1
Maximum value (maximum): 4
Default value (default): 2
pwms — required here #
The PWM that is used to control the fan.
Maximum number of items (maxItems): 1
#cooling-cells — not listed as required here #
true — No constraints added by this property rule.
Required in this object (required): "compatible", "pwms"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 102 170 230>;
pwms = <&pwm 0 10000 0>;
#cooling-cells = <2>;
};
thermal-zones {
cpu_thermal: cpu-thermal {
thermal-sensors = <&tmu 0>;
polling-delay-passive = <0>;
polling-delay = <0>;
trips {
cpu_alert1: cpu-alert1 {
temperature = <100000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "passive";
};
};
cooling-maps {
map0 {
trip = <&cpu_alert1>;
cooling-device = <&fan0 0 1>;
};
};
};
};
#include <dt-bindings/interrupt-controller/irq.h>
pwm-fan {
compatible = "pwm-fan";
pwms = <&pwm 0 40000 0>;
fan-supply = <®_fan>;
interrupt-parent = <&gpio5>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
pulses-per-revolution = <2>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)