Path: blob/main/sys/contrib/device-tree/Bindings/hwmon/gpio-fan.txt
48378 views
Bindings for fan connected to GPIO lines12Required properties:3- compatible : "gpio-fan"45Optional properties:6- gpios: Specifies the pins that map to bits in the control value,7ordered MSB-->LSB.8- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the9control value that should be set to achieve them. This array10must have the RPM values in ascending order.11- alarm-gpios: This pin going active indicates something is wrong with12the fan, and a udev event will be fired.13- #cooling-cells: If used as a cooling device, must be <2>14Also see:15Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml16min and max states are derived from the speed-map of the fan.1718Note: At least one the "gpios" or "alarm-gpios" properties must be set.1920Examples:2122gpio_fan {23compatible = "gpio-fan";24gpios = <&gpio1 14 125&gpio1 13 1>;26gpio-fan,speed-map = <0 0273000 1286000 2>;29alarm-gpios = <&gpio1 15 1>;30};31gpio_fan_cool: gpio_fan {32compatible = "gpio-fan";33gpios = <&gpio2 14 134&gpio2 13 1>;35gpio-fan,speed-map = <0 0>,36<3000 1>,37<6000 2>;38alarm-gpios = <&gpio2 15 1>;39#cooling-cells = <2>; /* min followed by max */40};414243