162306a36Sopenharmony_ciBindings for fan connected to GPIO lines 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciRequired properties: 462306a36Sopenharmony_ci- compatible : "gpio-fan" 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciOptional properties: 762306a36Sopenharmony_ci- gpios: Specifies the pins that map to bits in the control value, 862306a36Sopenharmony_ci ordered MSB-->LSB. 962306a36Sopenharmony_ci- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the 1062306a36Sopenharmony_ci control value that should be set to achieve them. This array 1162306a36Sopenharmony_ci must have the RPM values in ascending order. 1262306a36Sopenharmony_ci- alarm-gpios: This pin going active indicates something is wrong with 1362306a36Sopenharmony_ci the fan, and a udev event will be fired. 1462306a36Sopenharmony_ci- #cooling-cells: If used as a cooling device, must be <2> 1562306a36Sopenharmony_ci Also see: 1662306a36Sopenharmony_ci Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml 1762306a36Sopenharmony_ci min and max states are derived from the speed-map of the fan. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciNote: At least one the "gpios" or "alarm-gpios" properties must be set. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciExamples: 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci gpio_fan { 2462306a36Sopenharmony_ci compatible = "gpio-fan"; 2562306a36Sopenharmony_ci gpios = <&gpio1 14 1 2662306a36Sopenharmony_ci &gpio1 13 1>; 2762306a36Sopenharmony_ci gpio-fan,speed-map = <0 0 2862306a36Sopenharmony_ci 3000 1 2962306a36Sopenharmony_ci 6000 2>; 3062306a36Sopenharmony_ci alarm-gpios = <&gpio1 15 1>; 3162306a36Sopenharmony_ci }; 3262306a36Sopenharmony_ci gpio_fan_cool: gpio_fan { 3362306a36Sopenharmony_ci compatible = "gpio-fan"; 3462306a36Sopenharmony_ci gpios = <&gpio2 14 1 3562306a36Sopenharmony_ci &gpio2 13 1>; 3662306a36Sopenharmony_ci gpio-fan,speed-map = <0 0>, 3762306a36Sopenharmony_ci <3000 1>, 3862306a36Sopenharmony_ci <6000 2>; 3962306a36Sopenharmony_ci alarm-gpios = <&gpio2 15 1>; 4062306a36Sopenharmony_ci #cooling-cells = <2>; /* min followed by max */ 4162306a36Sopenharmony_ci }; 42