From: Rocky Hao Date: Fri, 24 Feb 2017 06:55:04 +0000 (+0800) Subject: arm64: dts: rockchip: add tsadc and thermal basic config for rk3328 X-Git-Tag: firefly_0821_release~549 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a065a81f3dfc66b6c3fc049eadd87700ab2f52f5;p=firefly-linux-kernel-4.4.55.git arm64: dts: rockchip: add tsadc and thermal basic config for rk3328 Change-Id: Ic0d417093c54fea5948fd79cab276ebe7aea0f2e Signed-off-by: Rocky Hao --- diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts index 923786c23f87..004d739543e8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts @@ -121,6 +121,10 @@ pmuio-supply = <&vcc_io>; }; +&tsadc { + status = "okay"; +}; + &u2phy { otg-vbus-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index af169ca376fa..7a998af7cdc5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -47,6 +47,7 @@ #include #include #include +#include / { compatible = "rockchip,rk3328"; @@ -266,6 +267,56 @@ }; }; + thermal-zones { + soc_thermal: soc-thermal { + polling-delay-passive = <20>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + sustainable-power = <1000>; /* milliwatts */ + + thermal-sensors = <&tsadc 0>; + + trips { + threshold: trip-point@0 { + temperature = <70000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + target: trip-point@1 { + temperature = <85000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + soc_crit: soc-crit { + temperature = <95000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + }; + + }; + + tsadc: tsadc@ff250000 { + compatible = "rockchip,rk3328-tsadc"; + reg = <0x0 0xff250000 0x0 0x100>; + interrupts = ; + rockchip,grf = <&grf>; + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + assigned-clocks = <&cru SCLK_TSADC>; + assigned-clock-rates = <50000>; + resets = <&cru SRST_TSADC>; + reset-names = "tsadc-apb"; + pinctrl-names = "init", "default", "sleep"; + pinctrl-0 = <&otp_gpio>; + pinctrl-1 = <&otp_out>; + pinctrl-2 = <&otp_gpio>; + #thermal-sensor-cells = <1>; + rockchip,hw-tshut-temp = <100000>; + status = "disabled"; + }; + uart0: serial@ff110000 { compatible = "rockchip,rk3328-uart", "snps,dw-apb-uart"; reg = <0x0 0xff110000 0x0 0x100>; @@ -930,6 +981,16 @@ }; }; + tsadc { + otp_gpio: otp-gpio { + rockchip,pins = <2 13 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + otp_out: otp-out { + rockchip,pins = <2 13 RK_FUNC_1 &pcfg_pull_none>; + }; + }; + uart0 { uart0_xfer: uart0-xfer { rockchip,pins =