Back to home page

OSCL-LXR

 
 

    


0001 ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver
0002 
0003 The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho
0004 controller can support upto 16 Fan tachometer inputs.
0005 
0006 There can be upto 8 fans supported. Each fan can have one PWM output and
0007 one/two Fan tach inputs.
0008 
0009 Required properties for pwm-tacho node:
0010 - #address-cells : should be 1.
0011 
0012 - #size-cells : should be 1.
0013 
0014 - #cooling-cells: should be 2.
0015 
0016 - reg : address and length of the register set for the device.
0017 
0018 - pinctrl-names : a pinctrl state named "default" must be defined.
0019 
0020 - pinctrl-0 : phandle referencing pin configuration of the PWM ports.
0021 
0022 - compatible : should be "aspeed,ast2400-pwm-tacho" for AST2400 and
0023                "aspeed,ast2500-pwm-tacho" for AST2500.
0024 
0025 - clocks : phandle to clock provider with the clock number in the second cell
0026 
0027 - resets : phandle to reset controller with the reset number in the second cell
0028 
0029 fan subnode format:
0030 ===================
0031 Under fan subnode there can upto 8 child nodes, with each child node
0032 representing a fan. If there are 8 fans each fan can have one PWM port and
0033 one/two Fan tach inputs.
0034 For PWM port can be configured cooling-levels to create cooling device.
0035 Cooling device could be bound to a thermal zone for the thermal control.
0036 
0037 Required properties for each child node:
0038 - reg : should specify PWM source port.
0039         integer value in the range 0 to 7 with 0 indicating PWM port A and
0040         7 indicating PWM port H.
0041 
0042 - cooling-levels: PWM duty cycle values in a range from 0 to 255
0043                   which correspond to thermal cooling states.
0044 
0045 - aspeed,fan-tach-ch : should specify the Fan tach input channel.
0046                 integer value in the range 0 through 15, with 0 indicating
0047                 Fan tach channel 0 and 15 indicating Fan tach channel 15.
0048                 Atleast one Fan tach input channel is required.
0049 
0050 Examples:
0051 
0052 pwm_tacho: pwmtachocontroller@1e786000 {
0053         #address-cells = <1>;
0054         #size-cells = <1>;
0055         #cooling-cells = <2>;
0056         reg = <0x1E786000 0x1000>;
0057         compatible = "aspeed,ast2500-pwm-tacho";
0058         clocks = <&syscon ASPEED_CLK_APB>;
0059         resets = <&syscon ASPEED_RESET_PWM>;
0060         pinctrl-names = "default";
0061         pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
0062 
0063         fan@0 {
0064                 reg = <0x00>;
0065                 cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
0066                 aspeed,fan-tach-ch = /bits/ 8 <0x00>;
0067         };
0068 
0069         fan@1 {
0070                 reg = <0x01>;
0071                 aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
0072         };
0073 };