ARM: dts: rockchip: add main thermal info to rk3288
authorCaesar Wang <caesar.wang@rock-chips.com>
Mon, 24 Nov 2014 04:59:01 +0000 (12:59 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 24 Nov 2014 23:31:26 +0000 (00:31 +0100)
If for some reason we are unable to shut it down in orderly fashion
(kernel is stuck holding a lock or similar), then hardware TSHUT will
reset it.

If the temperature is over 95C over a period of time the thermal shutdown
of the tsadc is invoked with can either reset the entire chip via the CRU,
or notify the PMIC via a GPIO. This should be set in the specific board.

Signed-off-by: Caesar Wang <caesar.wang@rock-chips.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/boot/dts/rk3288.dtsi

index ebcd2d2eef74612956b0ec62f65c240089fa80b5..acb6a2fba183c29def19c403023076f3fd97438a 100644 (file)
@@ -15,6 +15,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/clock/rk3288-cru.h>
+#include <dt-bindings/thermal/thermal.h>
 #include "skeleton.dtsi"
 
 / {
@@ -68,6 +69,7 @@
                                 216000  900000
                                 126000  900000
                        >;
+                       #cooling-cells = <2>; /* min followed by max */
                        clock-latency = <40000>;
                        clocks = <&cru ARMCLK>;
                };
                status = "disabled";
        };
 
+       thermal-zones {
+               #include "rk3288-thermal.dtsi"
+       };
+
+       tsadc: tsadc@ff280000 {
+               compatible = "rockchip,rk3288-tsadc";
+               reg = <0xff280000 0x100>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+               clock-names = "tsadc", "apb_pclk";
+               resets = <&cru SRST_TSADC>;
+               reset-names = "tsadc-apb";
+               pinctrl-names = "default";
+               pinctrl-0 = <&otp_out>;
+               #thermal-sensor-cells = <1>;
+               rockchip,hw-tshut-temp = <95000>;
+               status = "disabled";
+       };
+
        usb_host0_ehci: usb@ff500000 {
                compatible = "generic-ehci";
                reg = <0xff500000 0x100>;
                        };
                };
 
+               tsadc {
+                       otp_out: otp-out {
+                               rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
                pwm0 {
                        pwm0_pin: pwm0-pin {
                                rockchip,pins = <7 0 RK_FUNC_1 &pcfg_pull_none>;
This page took 0.031373 seconds and 5 git commands to generate.