npcm750-pwm-fan.txt 2.7 KB

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