[9610] arm64: Add exynos thermal related node to dt.
authorChungwoo Park <cww.park@samsung.com>
Mon, 14 May 2018 05:21:02 +0000 (14:21 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:22:32 +0000 (17:22 +0900)
Change-Id: I286530ef87e04b0fd6954afda4284f0f352a99e8
Signed-off-by: Chungwoo Park <cww.park@samsung.com>
arch/arm64/boot/dts/exynos/exynos9610-tmu-sensor-conf.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/exynos/exynos9610.dtsi

diff --git a/arch/arm64/boot/dts/exynos/exynos9610-tmu-sensor-conf.dtsi b/arch/arm64/boot/dts/exynos/exynos9610-tmu-sensor-conf.dtsi
new file mode 100644 (file)
index 0000000..777630e
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Device tree sources for Exynos9810 TMU sensor configuration
+ *
+ * Copyright (c) 2017 Lukasz Majewski <l.majewski@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <dt-bindings/thermal/thermal_exynos.h>
+
+#thermal-sensor-cells = <0>;
+samsung,tmu_gain = <0>;
+samsung,tmu_reference_voltage = <0>;
+samsung,tmu_noise_cancel_mode = <4>;
+samsung,tmu_efuse_value = <55>;
+samsung,tmu_first_point_trim = <25>;
+samsung,tmu_second_point_trim = <85>;
+samsung,tmu_default_temp_offset = <50>;
+samsung,tmu_default_trip_temp = <115>;
+samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
+samsung,tmu_sensor_type = <TEM1002X>;
index 0cba2e4def89e0ee857fc35be24c8543a29bf376..f72be9239007319d9301300d0aa0b48de4c8f814 100644 (file)
@@ -17,6 +17,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "exynos9610-pinctrl.dtsi"
 #include "exynos9610-display-lcd.dtsi"
+#include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/ufs/ufs.h>
 #include "exynos9610-sysmmu.dtsi"
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
+                       #cooling-cells = <2>; /* min followed by max */
                };
                cpu1: cpu@101 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a73", "arm,armv8";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
+                       #cooling-cells = <2>; /* min followed by max */
                };
                cpu5: cpu@1 {
                        device_type = "cpu";
                status = "disabled";
        };
 
+       tmuctrl_0: BIG@10070000 {
+               compatible = "samsung,exynos9610-tmu";
+               reg = <0x0 0x10070000 0x700>;
+               interrupts = <0 231 0>;
+               tmu_name = "BIG";
+               id = <0>;
+               sensors = <4>;          /* P2 */
+               sensing_mode = "max";
+               hotplug_enable = <1>;
+               hotplug_in_threshold = <91>;
+               hotplug_out_threshold = <96>;
+               #include "exynos9610-tmu-sensor-conf.dtsi"
+       };
+
+       tmuctrl_1: LITTLE@10070000 {
+               compatible = "samsung,exynos9610-tmu";
+               reg = <0x0 0x10070000 0x700>;
+               interrupts = <0 231 0>;
+               tmu_name = "LITTLE";
+               id = <1>;
+               sensors = <2>;          /* P1 */
+               sensing_mode = "max";
+               #include "exynos9610-tmu-sensor-conf.dtsi"
+       };
+
+       tmuctrl_2: G3D@10070000 {
+               compatible = "samsung,exynos9610-tmu";
+               reg = <0x0 0x10070000 0x700>;
+               interrupts = <0 231 0>;
+               tmu_name = "G3D";
+               id = <2>;
+               sensors = <1>;          /* P0 */
+               sensing_mode = "max";
+               #include "exynos9610-tmu-sensor-conf.dtsi"
+       };
+
+       tmuctrl_3: ISP@10070000 {
+               compatible = "samsung,exynos9610-tmu";
+               reg = <0x0 0x10070000 0x700>;
+               interrupts = <0 231 0>;
+               tmu_name = "ISP";
+               id = <3>;
+               sensors = <2>;          /* P1 */
+               sensing_mode = "max";
+               #include "exynos9610-tmu-sensor-conf.dtsi"
+       };
+
+       acpm_tmu {
+               acpm-ipc-channel = <7>;
+       };
+
+       thermal-zones {
+               big_thermal: BIG {
+                       zone_name  = "BIG_THERMAL";
+                       polling-delay-passive = <50>;
+                       polling-delay = <1000>;
+                       thermal-sensors = <&tmuctrl_0>;
+                       governor = "power_allocator";
+                       sustainable-power = <0>;
+                       k_po = <0>;
+                       k_pu = <0>;
+                       k_i = <0>;
+                       i_max = <0>;
+                       integral_cutoff = <0>;
+
+                       trips {
+                               big_cold: big-cold {
+                                       temperature = <20000>;
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_switch_on: big-switch-on {
+                                       temperature = <63000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_control_temp: big-control-temp {
+                                       temperature = <83000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "passive";
+                               };
+                               big_alert0: big-alert0 {
+                                       temperature = <95000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_alert1: big-alert1 {
+                                       temperature = <100000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_alert2: big-alert2 {
+                                       temperature = <105000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_alert3: big-alert3 {
+                                       temperature = <110000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               big_hot: big-hot {
+                                       temperature = <115000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "hot";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                    trip = <&big_control_temp>;
+                                    cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                              };
+                       };
+               };
+
+               little_thermal: LITTLE {
+                       zone_name  = "LITTLE_THERMAL";
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&tmuctrl_1>;
+
+                       trips {
+                               little_alert0: little-alert0 {
+                                       temperature = <20000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert1: little-alert1 {
+                                       temperature = <76000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert2: little-alert2 {
+                                       temperature = <81000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert3: little-alert3 {
+                                       temperature = <91000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert4: little-alert4 {
+                                       temperature = <96000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert5: little-alert5 {
+                                       temperature = <101000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_alert6: little-alert6 {
+                                       temperature = <106000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               little_hot: little-hot {
+                                       temperature = <115000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "hot";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                    trip = <&little_alert0>;
+                                    /* Corresponds to 1534MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                               map1 {
+                                    trip = <&little_alert1>;
+                                    /* Corresponds to 1326MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                              };
+                               map2 {
+                                    trip = <&little_alert2>;
+                                    /* Corresponds to 1118MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                               map3 {
+                                    trip = <&little_alert3>;
+                                    /* Corresponds to 910MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                               map4 {
+                                    trip = <&little_alert4>;
+                                    /* Corresponds to 702MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                               map5 {
+                                    trip = <&little_alert5>;
+                                    /* Corresponds to 403MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                              };
+                               map6 {
+                                    trip = <&little_alert6>;
+                                    /* Corresponds to 403MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                               map7 {
+                                    trip = <&little_hot>;
+                                    /* Corresponds to 403MHz at freq_table */
+                                    cooling-device = <&cpu0 0 0>;
+                               };
+                       };
+               };
+
+               gpu_thermal: G3D {
+                       zone_name  = "G3D_THERMAL";
+                       polling-delay-passive = <100>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&tmuctrl_2>;
+                       governor = "power_allocator";
+                       sustainable-power = <0>;
+                       k_po = <0>;
+                       k_pu = <0>;
+                       k_i = <0>;
+                       i_max = <0>;
+                       integral_cutoff = <0>;
+
+                       trips {
+                               gpu_cold: gpu-cold {
+                                       temperature = <20000>;
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_switch_on: gpu-switch-on {
+                                       temperature = <80000>; /* millicelsius */
+                                       hysteresis = <2000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_control_temp: gpu-control-temp {
+                                       temperature = <88000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "passive";
+                               };
+                               gpu_alert0: gpu-alert0 {
+                                       temperature = <95000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_alert1: gpu-alert1 {
+                                       temperature = <100000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_alert2: gpu-alert2 {
+                                       temperature = <105000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_alert3: gpu-alert3 {
+                                       temperature = <110000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               gpu_hot: gpu-hot {
+                                       temperature = <115000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "hot";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                    trip = <&gpu_control_temp>;
+                                    cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                              };
+                       };
+               };
+
+               isp_thermal: ISP {
+                       zone_name  = "ISP_THERMAL";
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&tmuctrl_3>;
+
+                       trips {
+                               isp_alert0: isp-alert0 {
+                                       temperature = <20000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert1: isp-alert1 {
+                                       temperature = <76000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert2: isp-alert2 {
+                                       temperature = <81000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert3: isp-alert3 {
+                                       temperature = <91000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert4: isp-alert4 {
+                                       temperature = <96000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert5: isp-alert5 {
+                                       temperature = <101000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_alert6: isp-alert6 {
+                                       temperature = <106000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "active";
+                               };
+                               isp_hot: isp-hot {
+                                       temperature = <115000>; /* millicelsius */
+                                       hysteresis = <5000>; /* millicelsius */
+                                       type = "hot";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                    trip = <&isp_alert0>;
+                                    /* Corresponds to No limit */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map1 {
+                                    trip = <&isp_alert1>;
+                                    /* Corresponds to No limit */
+                                    cooling-device = <&fimc_is 0 0>;
+                              };
+                               map2 {
+                                    trip = <&isp_alert2>;
+                                    /* Corresponds to 15fps at freq_table */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map3 {
+                                    trip = <&isp_alert3>;
+                                    /* Corresponds to 5fps at freq_table */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map4 {
+                                    trip = <&isp_alert4>;
+                                    /* Corresponds to 5fps at freq_table */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map5 {
+                                    trip = <&isp_alert5>;
+                                    /* Corresponds to 5fps at freq_table */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map6 {
+                                    trip = <&isp_alert6>;
+                                    /* Corresponds to 5fps at freq_table */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                               map7 {
+                                    trip = <&isp_hot>;
+                                    /* Corresponds to HW trip */
+                                    cooling-device = <&fimc_is 0 0>;
+                               };
+                       };
+               };
+       };
+
        ufs: ufs@0x13520000 {
                /* ----------------------- */
                /* 1. SYSTEM CONFIGURATION */