0001 Nuvoton NPCM7xx PWM and Fan Tacho controller device
0002
0003 The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM)
0004 controller outputs and 16 Fan tachometer controller inputs.
0005
0006 Required properties for pwm-fan node
0007 - #address-cells : should be 1.
0008 - #size-cells : should be 0.
0009 - compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX.
0010 - reg : specifies physical base address and size of the registers.
0011 - reg-names : must contain:
0012 * "pwm" for the PWM registers.
0013 * "fan" for the Fan registers.
0014 - clocks : phandle of reference clocks.
0015 - clock-names : must contain
0016 * "pwm" for PWM controller operating clock.
0017 * "fan" for Fan controller operating clock.
0018 - interrupts : contain the Fan interrupts with flags for falling edge.
0019 - pinctrl-names : a pinctrl state named "default" must be defined.
0020 - pinctrl-0 : phandle referencing pin configuration of the PWM and Fan
0021 controller ports.
0022
0023 fan subnode format:
0024 ===================
0025 Under fan subnode can be upto 8 child nodes, each child node representing a fan.
0026 Each fan subnode must have one PWM channel and atleast one Fan tach channel.
0027
0028 For PWM channel can be configured cooling-levels to create cooling device.
0029 Cooling device could be bound to a thermal zone for the thermal control.
0030
0031 Required properties for each child node:
0032 - reg : specify the PWM output channel.
0033 integer value in the range 0 through 7, that represent
0034 the PWM channel number that used.
0035
0036 - fan-tach-ch : specify the Fan tach input channel.
0037 integer value in the range 0 through 15, that represent
0038 the fan tach channel number that used.
0039
0040 At least one Fan tach input channel is required
0041
0042 Optional property for each child node:
0043 - cooling-levels: PWM duty cycle values in a range from 0 to 255
0044 which correspond to thermal cooling states.
0045
0046 Examples:
0047
0048 pwm_fan:pwm-fan-controller@103000 {
0049 #address-cells = <1>;
0050 #size-cells = <0>;
0051 compatible = "nuvoton,npcm750-pwm-fan";
0052 reg = <0x103000 0x2000>,
0053 <0x180000 0x8000>;
0054 reg-names = "pwm", "fan";
0055 clocks = <&clk NPCM7XX_CLK_APB3>,
0056 <&clk NPCM7XX_CLK_APB4>;
0057 clock-names = "pwm","fan";
0058 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
0059 <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
0060 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
0061 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
0062 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
0063 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
0064 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
0065 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
0066 pinctrl-names = "default";
0067 pinctrl-0 = <&pwm0_pins &pwm1_pins &pwm2_pins
0068 &fanin0_pins &fanin1_pins &fanin2_pins
0069 &fanin3_pins &fanin4_pins>;
0070 fan@0 {
0071 reg = <0x00>;
0072 fan-tach-ch = /bits/ 8 <0x00 0x01>;
0073 cooling-levels = <127 255>;
0074 };
0075 fan@1 {
0076 reg = <0x01>;
0077 fan-tach-ch = /bits/ 8 <0x02 0x03>;
0078 };
0079 fan@2 {
0080 reg = <0x02>;
0081 fan-tach-ch = /bits/ 8 <0x04>;
0082 };
0083
0084 };