From: Sascha Hauer <s.hauer@pengutronix.de> To: linux-pm@vger.kernel.org Cc: Zhang Rui <rui.zhang@intel.com>, Eduardo Valentin <edubezval@gmail.com>, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger <matthias.bgg@gmail.com> Subject: [PATCH] thermal: Add Mediatek thermal support Date: Mon, 13 Jul 2015 12:34:51 +0200 [thread overview] Message-ID: <1436783694-30717-1-git-send-email-s.hauer@pengutronix.de> (raw) This series adds support for the thermal sensors included in the MT8173 SoC. Currently only basic temperature reading is supported without any interrupt support. The cpufreq driver for MT8173 is currently under review, so there's no real cooling device available in mainline. Until this is available the thermal driver can be tested with the following dts snippet. It creates a fake gpio fan and a fake trip point which is so low that it can easily be reached with a "cat /dev/zero > /dev/null" on the command line. Please review and let me know what's missing to be included in mainline. Sascha fan: gpio_fan { compatible = "gpio-fan"; gpios = <&pio 24 0>; gpio-fan,speed-map = <0 0 4500 1>; #cooling-cells = <2>; }; thermal-zones { cpu_thermal: cpu_thermal { polling-delay-passive = <1000>; /* milliseconds */ polling-delay = <1000>; /* milliseconds */ thermal-sensors = <&thermal 0>; trips { cpu_passive: cpu_passive { temperature = <47000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "passive"; }; cpu_crit { temperature = <90000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "critical"; }; }; cooling-maps { map0 { trip = <&cpu_passive>; cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; }; ---------------------------------------------------------------- Sascha Hauer (3): dt-bindings: thermal: Add binding document for Mediatek thermal controller thermal: Add Mediatek thermal controller support ARM64: dts: mt8173: Add thermal/auxadc device nodes .../bindings/thermal/mediatek-thermal.txt | 38 ++ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 18 + drivers/thermal/Kconfig | 8 + drivers/thermal/Makefile | 1 + drivers/thermal/mtk_thermal.c | 602 +++++++++++++++++++++ 5 files changed, 667 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal.txt create mode 100644 drivers/thermal/mtk_thermal.c
WARNING: multiple messages have this Message-ID (diff)
From: s.hauer@pengutronix.de (Sascha Hauer) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] thermal: Add Mediatek thermal support Date: Mon, 13 Jul 2015 12:34:51 +0200 [thread overview] Message-ID: <1436783694-30717-1-git-send-email-s.hauer@pengutronix.de> (raw) This series adds support for the thermal sensors included in the MT8173 SoC. Currently only basic temperature reading is supported without any interrupt support. The cpufreq driver for MT8173 is currently under review, so there's no real cooling device available in mainline. Until this is available the thermal driver can be tested with the following dts snippet. It creates a fake gpio fan and a fake trip point which is so low that it can easily be reached with a "cat /dev/zero > /dev/null" on the command line. Please review and let me know what's missing to be included in mainline. Sascha fan: gpio_fan { compatible = "gpio-fan"; gpios = <&pio 24 0>; gpio-fan,speed-map = <0 0 4500 1>; #cooling-cells = <2>; }; thermal-zones { cpu_thermal: cpu_thermal { polling-delay-passive = <1000>; /* milliseconds */ polling-delay = <1000>; /* milliseconds */ thermal-sensors = <&thermal 0>; trips { cpu_passive: cpu_passive { temperature = <47000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "passive"; }; cpu_crit { temperature = <90000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "critical"; }; }; cooling-maps { map0 { trip = <&cpu_passive>; cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; }; ---------------------------------------------------------------- Sascha Hauer (3): dt-bindings: thermal: Add binding document for Mediatek thermal controller thermal: Add Mediatek thermal controller support ARM64: dts: mt8173: Add thermal/auxadc device nodes .../bindings/thermal/mediatek-thermal.txt | 38 ++ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 18 + drivers/thermal/Kconfig | 8 + drivers/thermal/Makefile | 1 + drivers/thermal/mtk_thermal.c | 602 +++++++++++++++++++++ 5 files changed, 667 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal.txt create mode 100644 drivers/thermal/mtk_thermal.c
next reply other threads:[~2015-07-13 10:35 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-07-13 10:34 Sascha Hauer [this message] 2015-07-13 10:34 ` [PATCH] thermal: Add Mediatek thermal support Sascha Hauer 2015-07-13 10:34 ` [PATCH 1/3] dt-bindings: thermal: Add binding document for Mediatek thermal controller Sascha Hauer 2015-07-13 10:34 ` Sascha Hauer 2015-07-15 17:41 ` Daniel Kurtz 2015-07-15 17:41 ` Daniel Kurtz 2015-07-15 17:41 ` Daniel Kurtz 2015-07-13 10:34 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer 2015-07-13 10:34 ` Sascha Hauer 2015-07-13 10:34 ` [PATCH 3/3] ARM64: dts: mt8173: Add thermal/auxadc device nodes Sascha Hauer 2015-07-13 10:34 ` Sascha Hauer
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=1436783694-30717-1-git-send-email-s.hauer@pengutronix.de \ --to=s.hauer@pengutronix.de \ --cc=edubezval@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-pm@vger.kernel.org \ --cc=matthias.bgg@gmail.com \ --cc=rui.zhang@intel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.