1*c66ec88fSEmmanuel VadotBindings for fan connected to GPIO lines 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot- compatible : "gpio-fan" 5*c66ec88fSEmmanuel Vadot 6*c66ec88fSEmmanuel VadotOptional properties: 7*c66ec88fSEmmanuel Vadot- gpios: Specifies the pins that map to bits in the control value, 8*c66ec88fSEmmanuel Vadot ordered MSB-->LSB. 9*c66ec88fSEmmanuel Vadot- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the 10*c66ec88fSEmmanuel Vadot control value that should be set to achieve them. This array 11*c66ec88fSEmmanuel Vadot must have the RPM values in ascending order. 12*c66ec88fSEmmanuel Vadot- alarm-gpios: This pin going active indicates something is wrong with 13*c66ec88fSEmmanuel Vadot the fan, and a udev event will be fired. 14*c66ec88fSEmmanuel Vadot- #cooling-cells: If used as a cooling device, must be <2> 15*c66ec88fSEmmanuel Vadot Also see: 16*c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml 17*c66ec88fSEmmanuel Vadot min and max states are derived from the speed-map of the fan. 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel VadotNote: At least one the "gpios" or "alarm-gpios" properties must be set. 20*c66ec88fSEmmanuel Vadot 21*c66ec88fSEmmanuel VadotExamples: 22*c66ec88fSEmmanuel Vadot 23*c66ec88fSEmmanuel Vadot gpio_fan { 24*c66ec88fSEmmanuel Vadot compatible = "gpio-fan"; 25*c66ec88fSEmmanuel Vadot gpios = <&gpio1 14 1 26*c66ec88fSEmmanuel Vadot &gpio1 13 1>; 27*c66ec88fSEmmanuel Vadot gpio-fan,speed-map = <0 0 28*c66ec88fSEmmanuel Vadot 3000 1 29*c66ec88fSEmmanuel Vadot 6000 2>; 30*c66ec88fSEmmanuel Vadot alarm-gpios = <&gpio1 15 1>; 31*c66ec88fSEmmanuel Vadot }; 32*c66ec88fSEmmanuel Vadot gpio_fan_cool: gpio_fan { 33*c66ec88fSEmmanuel Vadot compatible = "gpio-fan"; 34*c66ec88fSEmmanuel Vadot gpios = <&gpio2 14 1 35*c66ec88fSEmmanuel Vadot &gpio2 13 1>; 36*c66ec88fSEmmanuel Vadot gpio-fan,speed-map = <0 0>, 37*c66ec88fSEmmanuel Vadot <3000 1>, 38*c66ec88fSEmmanuel Vadot <6000 2>; 39*c66ec88fSEmmanuel Vadot alarm-gpios = <&gpio2 15 1>; 40*c66ec88fSEmmanuel Vadot #cooling-cells = <2>; /* min followed by max */ 41*c66ec88fSEmmanuel Vadot }; 42