18c2ecf20Sopenharmony_ciBindings for fan connected to GPIO lines 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciRequired properties: 48c2ecf20Sopenharmony_ci- compatible : "gpio-fan" 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciOptional properties: 78c2ecf20Sopenharmony_ci- gpios: Specifies the pins that map to bits in the control value, 88c2ecf20Sopenharmony_ci ordered MSB-->LSB. 98c2ecf20Sopenharmony_ci- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the 108c2ecf20Sopenharmony_ci control value that should be set to achieve them. This array 118c2ecf20Sopenharmony_ci must have the RPM values in ascending order. 128c2ecf20Sopenharmony_ci- alarm-gpios: This pin going active indicates something is wrong with 138c2ecf20Sopenharmony_ci the fan, and a udev event will be fired. 148c2ecf20Sopenharmony_ci- #cooling-cells: If used as a cooling device, must be <2> 158c2ecf20Sopenharmony_ci Also see: 168c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml 178c2ecf20Sopenharmony_ci min and max states are derived from the speed-map of the fan. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciNote: At least one the "gpios" or "alarm-gpios" properties must be set. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciExamples: 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci gpio_fan { 248c2ecf20Sopenharmony_ci compatible = "gpio-fan"; 258c2ecf20Sopenharmony_ci gpios = <&gpio1 14 1 268c2ecf20Sopenharmony_ci &gpio1 13 1>; 278c2ecf20Sopenharmony_ci gpio-fan,speed-map = <0 0 288c2ecf20Sopenharmony_ci 3000 1 298c2ecf20Sopenharmony_ci 6000 2>; 308c2ecf20Sopenharmony_ci alarm-gpios = <&gpio1 15 1>; 318c2ecf20Sopenharmony_ci }; 328c2ecf20Sopenharmony_ci gpio_fan_cool: gpio_fan { 338c2ecf20Sopenharmony_ci compatible = "gpio-fan"; 348c2ecf20Sopenharmony_ci gpios = <&gpio2 14 1 358c2ecf20Sopenharmony_ci &gpio2 13 1>; 368c2ecf20Sopenharmony_ci gpio-fan,speed-map = <0 0>, 378c2ecf20Sopenharmony_ci <3000 1>, 388c2ecf20Sopenharmony_ci <6000 2>; 398c2ecf20Sopenharmony_ci alarm-gpios = <&gpio2 15 1>; 408c2ecf20Sopenharmony_ci #cooling-cells = <2>; /* min followed by max */ 418c2ecf20Sopenharmony_ci }; 42