diff options
author | Rocky Hao <rocky.hao@rock-chips.com> | 2016-03-10 18:51:27 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@rock-chips.com> | 2016-05-30 11:01:10 +0800 |
commit | fe16f4b53f5a0ce564299f402079ab73c9cb8697 (patch) | |
tree | 2ae0ffda2260280759529a92ad397c83bb488042 /arch/arm64/boot/dts/rockchip/rk3366.dtsi | |
parent | ee4021af68b35898309c77bafad3069445f0246b (diff) |
arm64: dts: rockchip: add tsadc node and the IPA parameters for rk3366 thermal
according to our testing results, added the ipa parameters for both cpu
and gpu.
for now,the gpu thermal zone is used only to get the gpu's temperature.
Change-Id: I14274c0b2d7645d08f37d918ddb415ac49ed0d9e
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Diffstat (limited to 'arch/arm64/boot/dts/rockchip/rk3366.dtsi')
-rw-r--r-- | arch/arm64/boot/dts/rockchip/rk3366.dtsi | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3366.dtsi b/arch/arm64/boot/dts/rockchip/rk3366.dtsi index 75784150d756..8b54201b52a0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi @@ -49,6 +49,7 @@ #include <dt-bindings/display/mipi_dsi.h> #include <dt-bindings/power/rk3366-power.h> #include <dt-bindings/soc/rockchip_boot-mode.h> +#include <dt-bindings/thermal/thermal.h> / { compatible = "rockchip,rk3366"; @@ -82,6 +83,8 @@ clocks = <&cru ARMCLK>; operating-points-v2 = <&cpu0_opp_table>; cpu-idle-states = <&cpu_sleep>; + #cooling-cells = <2>; /* min followed by max */ + dynamic-power-coefficient = <166>; }; cpu1: cpu@1 { @@ -261,6 +264,69 @@ status = "disabled"; }; + thermal-zones { + soc_thermal: soc-thermal { + polling-delay-passive = <100>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + sustainable-power = <1600>; /* 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"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + map1 { + trip = <&target>; + cooling-device = + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu_thermal: gpu-thermal { + polling-delay-passive = <100>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + + thermal-sensors = <&tsadc 1>; + }; + }; + + tsadc: tsadc@ff260000 { + compatible = "rockchip,rk3366-tsadc"; + reg = <0x0 0xff260000 0x0 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 = <&tsadc_gpio>; + #thermal-sensor-cells = <1>; + rockchip,hw-tshut-temp = <95000>; + status = "disabled"; + }; + sdmmc: rksdmmc@ff400000 { compatible = "rockchip,rk3366-dw-mshc","rockchip,rk3288-dw-mshc"; clock-freq-min-max = <400000 150000000>; @@ -1544,6 +1610,18 @@ <0 25 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + tsadc_pin { + tsadc_gpio: tsadc-gpio { + rockchip,pins = + <0 22 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + tsadc_int: tsadc-int { + rockchip,pins = + <0 22 RK_FUNC_2 &pcfg_pull_none>; + }; + }; }; gpu: gpu@ffa30000 { @@ -1561,8 +1639,19 @@ clocks = <&cru ACLK_GPU>; clock-names = "clk_mali"; + #cooling-cells = <2>; /* min followed by max */ operating-points-v2 = <&gpu_opp_table>; status = "disabled"; + + power_model { + compatible = "arm,mali-simple-power-model"; + voltage = <900>; + frequency = <500>; + static-power = <300>; + dynamic-power = <1780>; + ts = <32000 4700 (-80) 2>; + thermal-zone = "gpu-thermal"; + }; }; gpu_opp_table: gpu_opp_table { |