From: Tao Wang <kevin.wangtao@hisilicon.com>
To: rui.zhang@intel.com, edubezval@gmail.com, robh+dt@kernel.org,
mark.rutland@arm.com, xuwei5@hisilicon.com,
catalin.marinas@arm.com, will.deacon@arm.com
Cc: leo.yan@linaro.org, kevin.wangtao@linaro.org,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, sunzhaosheng@hisilicon.com,
gengyanping@hisilicon.com
Subject: [PATCH v4 3/3] arm64: dts: register Hi3660's thermal sensor
Date: Tue, 29 Aug 2017 16:17:46 +0800 [thread overview]
Message-ID: <1503994666-13954-4-git-send-email-kevin.wangtao@hisilicon.com> (raw)
In-Reply-To: <1503994666-13954-1-git-send-email-kevin.wangtao@hisilicon.com>
From: Tao Wang <kevin.wangtao@linaro.org>
Bind thermal sensor driver for Hi3660.
Signed-off-by: Tao Wang <kevin.wangtao@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 14 +++++++++++++
include/dt-bindings/thermal/hi3660-thermal.h | 31 ++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 include/dt-bindings/thermal/hi3660-thermal.h
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index c6a1961..1ee6084 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -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,18 @@
&sdio_cfg_func>;
status = "disabled";
};
+
+ tsensor: tsensor@fff30000 {
+ compatible = "hisilicon,hi3660-tsensor";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ reg = <0x0 0xfff3001c 0x0 0x4>,
+ <0x0 0xfff3005c 0x0 0x4>,
+ <0x0 0xfff3009c 0x0 0x4>;
+ hisi,tsensors = <HISI_MAX_TSENSORS>;
+ hisi,coef = <165000 (-40000)>;
+ hisi,adc-range = <0x74 0x39A>;
+ #thermal-sensor-cells = <1>;
+ };
};
};
diff --git a/include/dt-bindings/thermal/hi3660-thermal.h b/include/dt-bindings/thermal/hi3660-thermal.h
new file mode 100644
index 0000000..d9d9b6a
--- /dev/null
+++ b/include/dt-bindings/thermal/hi3660-thermal.h
@@ -0,0 +1,31 @@
+/*
+ * 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 HISI_MAX_TSENSORS 3
+#define THERMAL_NO_LIMIT (~0)
+
+#endif
--
2.8.1
next prev parent reply other threads:[~2017-08-29 8:17 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 3:40 [PATCH 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-06-20 3:40 ` [PATCH 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
[not found] ` <1497930035-60894-2-git-send-email-kevin.wangtao-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-06-20 10:31 ` Wei Xu
[not found] ` <5948F983.5060902-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-06-21 2:21 ` Wangtao (Kevin, Kirin)
2017-06-21 2:29 ` Leo Yan
2017-06-20 3:40 ` [PATCH 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-06-20 7:38 ` Guodong Xu
2017-06-20 8:32 ` Wangtao (Kevin, Kirin)
[not found] ` <7abe5b01-c728-accd-d6bb-05d9ceee2176-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-06-21 1:58 ` Guodong Xu
2017-06-22 3:42 ` [Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-06-22 3:42 ` [Patch v2 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
[not found] ` <1498102923-68481-2-git-send-email-kevin.wangtao-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-07-01 3:04 ` Eduardo Valentin
2017-07-04 11:24 ` Wangtao (Kevin, Kirin)
2017-06-22 3:42 ` [Patch v2 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-07-01 3:06 ` Eduardo Valentin
[not found] ` <20170701030613.GC11424-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-07-04 10:50 ` 答复: " Wangtao (Kevin, Kirin)
2017-07-01 3:05 ` [Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Eduardo Valentin
[not found] ` <20170701030534.GB11424-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-07-04 11:03 ` Wangtao (Kevin, Kirin)
2017-08-10 8:32 ` [PATCH v3 0/3] thermal: add thermal sensor driver for Hi3660 Tao Wang
2017-08-10 8:32 ` [PATCH v3 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-08-17 15:10 ` Rob Herring
2017-08-21 2:17 ` Wangtao (Kevin, Kirin)
2017-08-29 8:17 ` [PATCH v4 0/3] thermal: add thermal sensor driver for Hi3660 Tao Wang
2017-08-29 8:17 ` [PATCH v4 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-08-31 18:24 ` Daniel Lezcano
2017-09-04 6:39 ` Wangtao (Kevin, Kirin)
[not found] ` <38fdf052-97be-1b54-5e7d-9dd0bc11e9b4-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-09-04 10:36 ` Daniel Lezcano
2017-08-29 8:17 ` [PATCH v4 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-08-31 21:17 ` Daniel Lezcano
2017-09-04 7:56 ` Wangtao (Kevin, Kirin)
2017-09-04 11:06 ` Daniel Lezcano
[not found] ` <8fe3ad22-59db-40c6-18db-7b6859f05a95-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-09-04 15:06 ` Leo Yan
2017-09-05 7:56 ` Wangtao (Kevin, Kirin)
2017-08-29 8:17 ` Tao Wang [this message]
2017-08-31 21:13 ` [PATCH v4 3/3] arm64: dts: register Hi3660's thermal sensor Daniel Lezcano
2017-09-04 8:11 ` Wangtao (Kevin, Kirin)
[not found] ` <1502353935-92924-1-git-send-email-kevin.wangtao-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2017-08-10 8:32 ` [PATCH v3 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-08-10 8:32 ` [PATCH v3 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-06-20 10:27 ` [PATCH 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Wei Xu
2017-06-21 2:10 ` Wangtao (Kevin, Kirin)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503994666-13954-4-git-send-email-kevin.wangtao@hisilicon.com \
--to=kevin.wangtao@hisilicon.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=gengyanping@hisilicon.com \
--cc=kevin.wangtao@linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sunzhaosheng@hisilicon.com \
--cc=will.deacon@arm.com \
--cc=xuwei5@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).