1Nuvoton NPCM PWM and Fan Tacho controller device 2 3The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM) 4controller outputs and 16 Fan tachometer controller inputs. 5 6The Nuvoton BMC NPCM8XX supports 12 Pulse-width modulation (PWM) 7controller outputs and 16 Fan tachometer controller inputs. 8 9Required properties for pwm-fan node 10- #address-cells : should be 1. 11- #size-cells : should be 0. 12- compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX. 13 : "nuvoton,npcm845-pwm-fan" for Arbel NPCM8XX. 14- reg : specifies physical base address and size of the registers. 15- reg-names : must contain: 16 * "pwm" for the PWM registers. 17 * "fan" for the Fan registers. 18- clocks : phandle of reference clocks. 19- clock-names : must contain 20 * "pwm" for PWM controller operating clock. 21 * "fan" for Fan controller operating clock. 22- interrupts : contain the Fan interrupts with flags for falling edge. 23- pinctrl-names : a pinctrl state named "default" must be defined. 24- pinctrl-0 : phandle referencing pin configuration of the PWM and Fan 25 controller ports. 26 27fan subnode format: 28=================== 29Under fan subnode can be upto 8 child nodes, each child node representing a fan. 30Each fan subnode must have one PWM channel and at least one Fan tach channel. 31 32For PWM channel can be configured cooling-levels to create cooling device. 33Cooling device could be bound to a thermal zone for the thermal control. 34 35Required properties for each child node: 36- reg : specify the PWM output channel. 37 integer value in the range 0 through 7, that represent 38 the PWM channel number that used. 39 40- fan-tach-ch : specify the Fan tach input channel. 41 integer value in the range 0 through 15, that represent 42 the fan tach channel number that used. 43 44 At least one Fan tach input channel is required 45 46Optional property for each child node: 47- cooling-levels: PWM duty cycle values in a range from 0 to 255 48 which correspond to thermal cooling states. 49 50Examples: 51 52pwm_fan:pwm-fan-controller@103000 { 53 #address-cells = <1>; 54 #size-cells = <0>; 55 compatible = "nuvoton,npcm750-pwm-fan"; 56 reg = <0x103000 0x2000>, 57 <0x180000 0x8000>; 58 reg-names = "pwm", "fan"; 59 clocks = <&clk NPCM7XX_CLK_APB3>, 60 <&clk NPCM7XX_CLK_APB4>; 61 clock-names = "pwm","fan"; 62 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, 63 <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 64 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 65 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 66 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 67 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, 68 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 69 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; 70 pinctrl-names = "default"; 71 pinctrl-0 = <&pwm0_pins &pwm1_pins &pwm2_pins 72 &fanin0_pins &fanin1_pins &fanin2_pins 73 &fanin3_pins &fanin4_pins>; 74 fan@0 { 75 reg = <0x00>; 76 fan-tach-ch = /bits/ 8 <0x00 0x01>; 77 cooling-levels = <127 255>; 78 }; 79 fan@1 { 80 reg = <0x01>; 81 fan-tach-ch = /bits/ 8 <0x02 0x03>; 82 }; 83 fan@2 { 84 reg = <0x02>; 85 fan-tach-ch = /bits/ 8 <0x04>; 86 }; 87 88}; 89