rockchip-thermal.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. * Temperature Sensor ADC (TSADC) on rockchip SoCs
  2. Required properties:
  3. - compatible : should be "rockchip,<name>-tsadc"
  4. "rockchip,rk3288-tsadc": found on RK3288 SoCs
  5. "rockchip,rk3368-tsadc": found on RK3368 SoCs
  6. - reg : physical base address of the controller and length of memory mapped
  7. region.
  8. - interrupts : The interrupt number to the cpu. The interrupt specifier format
  9. depends on the interrupt controller.
  10. - clocks : Must contain an entry for each entry in clock-names.
  11. - clock-names : Shall be "tsadc" for the converter-clock, and "apb_pclk" for
  12. the peripheral clock.
  13. - resets : Must contain an entry for each entry in reset-names.
  14. See ../reset/reset.txt for details.
  15. - reset-names : Must include the name "tsadc-apb".
  16. - pinctrl-names : The pin control state names;
  17. - pinctrl-0 : The "init" pinctrl state, it will be set before device probe.
  18. - pinctrl-1 : The "default" pinctrl state, it will be set after reset the
  19. TSADC controller.
  20. - pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend.
  21. - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
  22. - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
  23. - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
  24. - rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW
  25. 1:HIGH.
  26. Exiample:
  27. tsadc: tsadc@ff280000 {
  28. compatible = "rockchip,rk3288-tsadc";
  29. reg = <0xff280000 0x100>;
  30. interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  31. clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
  32. clock-names = "tsadc", "apb_pclk";
  33. resets = <&cru SRST_TSADC>;
  34. reset-names = "tsadc-apb";
  35. pinctrl-names = "init", "default", "sleep";
  36. pinctrl-0 = <&otp_gpio>;
  37. pinctrl-1 = <&otp_out>;
  38. pinctrl-2 = <&otp_gpio>;
  39. #thermal-sensor-cells = <1>;
  40. rockchip,hw-tshut-temp = <95000>;
  41. rockchip,hw-tshut-mode = <0>;
  42. rockchip,hw-tshut-polarity = <0>;
  43. };
  44. Example: referring to thermal sensors:
  45. thermal-zones {
  46. cpu_thermal: cpu_thermal {
  47. polling-delay-passive = <1000>; /* milliseconds */
  48. polling-delay = <5000>; /* milliseconds */
  49. /* sensor ID */
  50. thermal-sensors = <&tsadc 1>;
  51. trips {
  52. cpu_alert0: cpu_alert {
  53. temperature = <70000>; /* millicelsius */
  54. hysteresis = <2000>; /* millicelsius */
  55. type = "passive";
  56. };
  57. cpu_crit: cpu_crit {
  58. temperature = <90000>; /* millicelsius */
  59. hysteresis = <2000>; /* millicelsius */
  60. type = "critical";
  61. };
  62. };
  63. cooling-maps {
  64. map0 {
  65. trip = <&cpu_alert0>;
  66. cooling-device =
  67. <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  68. };
  69. };
  70. };
  71. };