From: Mateusz Majewski <m.majewski2@samsung.com>
To: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Mateusz Majewski <m.majewski2@samsung.com>,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>
Subject: Re: [PATCH 0/6] Add initial Exynos 850 support to the thermal driver
Date: Tue, 23 Jul 2024 16:16:37 +0200 [thread overview]
Message-ID: <20240723141638.374742-1-m.majewski2@samsung.com> (raw)
In-Reply-To: <CAPLW+4m0xG5yHOT_ucGdrOhLZvjhga8caqHQZmVH6HHKUnBgkw@mail.gmail.com>
Hi :)
> Thank you for the contribution! Did you by chance test it on any
> hardware, perhaps on E850-96 board? Just noticed there are no dts
> changes in this series (or as separate patches). If no -- I'll be glad
> to assist you on that, if you can share dts definitions for E850-96
> and the testing instructions with me.
I did test it on our copy of E850-96. I used this for testing:
diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi
index f1c8b4613cbc..cffc173fd059 100644
--- a/arch/arm64/boot/dts/exynos/exynos850.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi
@@ -617,6 +617,53 @@ sysreg_cmgp: syscon@11c20000 {
clocks = <&cmu_cmgp CLK_GOUT_SYSREG_CMGP_PCLK>;
};
+ tmuctrl_0: tmu@10070000{
+ compatible = "samsung,exynos850-tmu";
+ reg = <0x10070000 0x800>;
+ interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ thermal-zones {
+ test_thermal: test-thermal{
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tmuctrl_0>;
+ trips {
+ test_40000: test-40000 {
+ temperature = <40000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ test_50000: test-50000 {
+ temperature = <50000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ test_60000: test-60000 {
+ temperature = <60000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ test_70000: test-70000 {
+ temperature = <70000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ test_80000: test-80000 {
+ temperature = <80000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ test_crit: test-crit {
+ temperature = <90000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
usbdrd: usb@13600000 {
compatible = "samsung,exynos850-dwusb3";
ranges = <0x0 0x13600000 0x10000>;
I did not post this because it would probably need some more thought,
and it probably wouldn't get merged until this series does anyway I
think? During testing I couldn't get readings higher than 35C, but the
values reacted to CPU load as expected. Also, Marek had physical access
to the board while I was testing it and has confirmed that the values
are realistic. Some more testing was done with some combination of
lowering the trip points, emul_temp and those temporary changes:
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index bd52663f1a5a..8db3f9039e7a 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -941,6 +941,7 @@ static irqreturn_t exynos_tmu_threaded_irq(int irq, void *id)
{
struct exynos_tmu_data *data = id;
+ pr_info("interrupt\n");
thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED);
mutex_lock(&data->lock);
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 72b302bf914e..0864179526e2 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -232,13 +232,11 @@ emul_temp_store(struct device *dev, struct device_attribute *attr,
mutex_lock(&tz->lock);
- if (!tz->ops.set_emul_temp)
+ if (!tz->ops.set_emul_temp) {
tz->emul_temperature = temperature;
- else
- ret = tz->ops.set_emul_temp(tz, temperature);
-
- if (!ret)
__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
+ } else
+ ret = tz->ops.set_emul_temp(tz, temperature);
mutex_unlock(&tz->lock);
next prev parent reply other threads:[~2024-07-23 14:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240719120944eucas1p29318fb588150b15f60f637fbea48271f@eucas1p2.samsung.com>
2024-07-19 12:08 ` Mateusz Majewski
[not found] ` <CGME20240719120945eucas1p2aa5e35f78daa7ec1ea07f512180db468@eucas1p2.samsung.com>
2024-07-19 12:08 ` [PATCH 1/6] drivers/thermal/exynos: use DEFINE_SIMPLE_DEV_PM_OPS Mateusz Majewski
2024-07-22 18:41 ` Sam Protsenko
2024-07-24 6:04 ` Anand Moon
[not found] ` <CGME20240719120945eucas1p16058905c95c92840679831ae3383a67a@eucas1p1.samsung.com>
2024-07-19 12:08 ` [PATCH 2/6] drivers/thermal/exynos: use tmu_temp_mask consistently Mateusz Majewski
2024-07-22 19:03 ` Sam Protsenko
[not found] ` <CGME20240719120946eucas1p1b565fa653d33aa2155cd3bb172c29d14@eucas1p1.samsung.com>
2024-07-19 12:08 ` [PATCH 3/6] drivers/thermal/exynos: check IS_ERR(data->clk) consistently Mateusz Majewski
2024-07-22 21:03 ` Sam Protsenko
2024-07-23 14:17 ` Mateusz Majewski
2024-07-23 14:51 ` Sam Protsenko
[not found] ` <CGME20240719120947eucas1p1344134823e100feaf49238de0e226431@eucas1p1.samsung.com>
2024-07-19 12:08 ` [PATCH 4/6] dt-bindings: thermal: samsung,exynos: add exynos850-tmu string Mateusz Majewski
2024-07-22 21:26 ` Sam Protsenko
[not found] ` <CGME20240719120948eucas1p13f3dc8f3aba56027da720d36c6057040@eucas1p1.samsung.com>
2024-07-19 12:08 ` [PATCH 5/6] drivers/thermal/exynos: add initial Exynos 850 support Mateusz Majewski
2024-07-23 0:02 ` Sam Protsenko
2024-07-23 14:16 ` Mateusz Majewski
2024-07-23 15:23 ` Sam Protsenko
2024-07-23 16:47 ` Sam Protsenko
2024-07-24 15:30 ` Mateusz Majewski
2024-07-25 0:42 ` Sam Protsenko
2024-07-24 15:30 ` Mateusz Majewski
2024-07-25 0:56 ` Sam Protsenko
[not found] ` <CGME20240719120949eucas1p1b061c716ac55b4a79ba57c407c0b2d91@eucas1p1.samsung.com>
2024-07-19 12:08 ` [PATCH 6/6] dt-bindings: thermal: samsung,exynos: remove outdated information on trip point count Mateusz Majewski
2024-07-22 21:34 ` Sam Protsenko
2024-07-23 3:08 ` Rob Herring
2024-07-23 14:17 ` Mateusz Majewski
2024-07-23 19:24 ` Rob Herring
2024-07-24 15:31 ` Mateusz Majewski
2024-07-22 18:39 ` [PATCH 0/6] Add initial Exynos 850 support to the thermal driver Sam Protsenko
2024-07-23 14:16 ` Mateusz Majewski [this message]
2024-07-23 14:44 ` Sam Protsenko
2024-07-24 15:31 ` Mateusz Majewski
2024-07-25 1:06 ` Sam Protsenko
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=20240723141638.374742-1-m.majewski2@samsung.com \
--to=m.majewski2@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=bzolnier@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=semen.protsenko@linaro.org \
/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
all inboxes | Powered by JetHome®