047-0020-ARM-dts-BCM5301X-Add-CPU-thermal-sensor-and-zone.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From e55d2c7272ff647efac4aecd895b20ee66e43519 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
  3. Date: Fri, 14 Apr 2017 23:42:28 +0200
  4. Subject: [PATCH] ARM: dts: BCM5301X: Add CPU thermal sensor and zone
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This uses CPU thermal sensor available on every Northstar chipset to
  9. monitor temperature. We don't have any cooling or throttling so only a
  10. critical trip was added.
  11. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  12. Acked-by: Jon Mason <jon.mason@broadcom.com>
  13. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  14. ---
  15. arch/arm/boot/dts/bcm5301x.dtsi | 26 ++++++++++++++++++++++++++
  16. 1 file changed, 26 insertions(+)
  17. --- a/arch/arm/boot/dts/bcm5301x.dtsi
  18. +++ b/arch/arm/boot/dts/bcm5301x.dtsi
  19. @@ -363,6 +363,12 @@
  20. "sata2";
  21. };
  22. + thermal: thermal@1800c2c0 {
  23. + compatible = "brcm,ns-thermal";
  24. + reg = <0x1800c2c0 0x10>;
  25. + #thermal-sensor-cells = <0>;
  26. + };
  27. +
  28. srab: srab@18007000 {
  29. compatible = "brcm,bcm5301x-srab";
  30. reg = <0x18007000 0x1000>;
  31. @@ -390,4 +396,24 @@
  32. brcm,nand-has-wp;
  33. };
  34. +
  35. + thermal-zones {
  36. + cpu_thermal: cpu-thermal {
  37. + polling-delay-passive = <0>;
  38. + polling-delay = <1000>;
  39. + coefficients = <(-556) 418000>;
  40. + thermal-sensors = <&thermal>;
  41. +
  42. + trips {
  43. + cpu-crit {
  44. + temperature = <125000>;
  45. + hysteresis = <0>;
  46. + type = "critical";
  47. + };
  48. + };
  49. +
  50. + cooling-maps {
  51. + };
  52. + };
  53. + };
  54. };