@@ -6,6 +6,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/hi3660-clock.h>
+#include <dt-bindings/thermal/hi3660-thermal.h>
/ {
compatible = "hisilicon,hi3660";
@@ -848,5 +849,14 @@
&sdio_cfg_func>;
status = "disabled";
};
+
+ tsensor: tsensor@FFF3000 {
+ compatible = "hisilicon,tsensor";
+ reg = <0x0 0xfff30000 0x0 0x1000>;
+ offset = <0x1c 0x5c 0x9c>;
+ coefficients = <165000 (-40000)>;
+ hisi,adc-range = <0x74 0x39A>;
+ #thermal-sensor-cells = <1>;
+ };
};
};
new file mode 100644
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Hisilicon Limited.
+ * Copyright (c) 2017 Linaro Limited.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DTS_HI3660_THERMAL_H
+#define __DTS_HI3660_THERMAL_H
+
+/* sensor id */
+#define LITTLE_CPU_TEMP 0
+#define BIG_CPU_TEMP 1
+#define GPU_TEMP 2
+#define MAX_TEMP 3
+#define AVG_TEMP 4
+
+#define THERMAL_NO_LIMIT (~0)
+
+#endif