Path: blob/master/Documentation/devicetree/bindings/hwmon/npcm750-pwm-fan.txt
26308 views
Nuvoton NPCM PWM and Fan Tacho controller device12The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM)3controller outputs and 16 Fan tachometer controller inputs.45The Nuvoton BMC NPCM8XX supports 12 Pulse-width modulation (PWM)6controller outputs and 16 Fan tachometer controller inputs.78Required properties for pwm-fan node9- #address-cells : should be 1.10- #size-cells : should be 0.11- compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX.12: "nuvoton,npcm845-pwm-fan" for Arbel NPCM8XX.13- reg : specifies physical base address and size of the registers.14- reg-names : must contain:15* "pwm" for the PWM registers.16* "fan" for the Fan registers.17- clocks : phandle of reference clocks.18- clock-names : must contain19* "pwm" for PWM controller operating clock.20* "fan" for Fan controller operating clock.21- interrupts : contain the Fan interrupts with flags for falling edge.22- pinctrl-names : a pinctrl state named "default" must be defined.23- pinctrl-0 : phandle referencing pin configuration of the PWM and Fan24controller ports.2526fan subnode format:27===================28Under fan subnode can be upto 8 child nodes, each child node representing a fan.29Each fan subnode must have one PWM channel and at least one Fan tach channel.3031For PWM channel can be configured cooling-levels to create cooling device.32Cooling device could be bound to a thermal zone for the thermal control.3334Required properties for each child node:35- reg : specify the PWM output channel.36integer value in the range 0 through 7, that represent37the PWM channel number that used.3839- fan-tach-ch : specify the Fan tach input channel.40integer value in the range 0 through 15, that represent41the fan tach channel number that used.4243At least one Fan tach input channel is required4445Optional property for each child node:46- cooling-levels: PWM duty cycle values in a range from 0 to 25547which correspond to thermal cooling states.4849Examples:5051pwm_fan:pwm-fan-controller@103000 {52#address-cells = <1>;53#size-cells = <0>;54compatible = "nuvoton,npcm750-pwm-fan";55reg = <0x103000 0x2000>,56<0x180000 0x8000>;57reg-names = "pwm", "fan";58clocks = <&clk NPCM7XX_CLK_APB3>,59<&clk NPCM7XX_CLK_APB4>;60clock-names = "pwm","fan";61interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,62<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,63<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,64<GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,65<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,66<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,67<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,68<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;69pinctrl-names = "default";70pinctrl-0 = <&pwm0_pins &pwm1_pins &pwm2_pins71&fanin0_pins &fanin1_pins &fanin2_pins72&fanin3_pins &fanin4_pins>;73fan@0 {74reg = <0x00>;75fan-tach-ch = /bits/ 8 <0x00 0x01>;76cooling-levels = <127 255>;77};78fan@1 {79reg = <0x01>;80fan-tach-ch = /bits/ 8 <0x02 0x03>;81};82fan@2 {83reg = <0x02>;84fan-tach-ch = /bits/ 8 <0x04>;85};8687};888990