rockchip-thermal.txt 2.6 KB

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