From: sashiko-bot@kernel.org
To: christian.koever-draxl@student.uibk.ac.at
Cc: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 2/3] thermal/drivers/amlogic: add S4 support
Date: Sun, 25 Oct 2026 19:43:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-184389@kernel.org> (raw)
In-Reply-To: <20261025192244.209256-3-christian.koever-draxl@student.uibk.ac.at>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] thermal/drivers/amlogic: missing S4 bus clock in binding and compatible
--
commit dfe5abf7967aecb95213a29d43ea6efa65ceb5d9
Author: Christian Stefan Kövér-Draxl <ckoever@outlook.de>
thermal/drivers/amlogic: add S4 support
This commit adds the amlogic,s4-cpu-thermal compatible string to the Amlogic
thermal driver match table, reusing the T7 parameter data so that the S4 CPU
thermal sensor reads its calibration via the secure monitor.
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 60728de6968ac..c58bac633bedc 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -292,6 +292,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
> .compatible = "amlogic,a1-cpu-thermal",
> .data = &amlogic_thermal_a1_cpu_param,
> },
> + {
> + .compatible = "amlogic,s4-cpu-thermal",
> + .data = &amlogic_thermal_t7_param,
> + },
[Severity: Medium]
Should S4 use amlogic,s4-thermal (either with amlogic,t7-thermal as a
fallback compatible or added to the two-clock condition in the binding)
instead of a standalone amlogic,s4-cpu-thermal compatible?
In drivers/clk/meson/s4-peripherals.c, Amlogic S4 provides both a shared
functional clock (s4_ts_clk) and dedicated per-sensor APB bus clocks for the
PLL/CPU and DDR thermal sensors:
static S4_PCLK(s4_ts_ddr, CLKCTRL_SYS_CLK_EN0_REG1, 15, CLK_IGNORE_UNUSED);
static S4_PCLK(s4_ts_pll, CLKCTRL_SYS_CLK_EN0_REG1, 16, CLK_IGNORE_UNUSED);
However, in Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml,
the allOf conditional block only permits two clocks when the compatible
contains amlogic,t7-thermal:
- if:
properties:
compatible:
contains:
const: amlogic,t7-thermal
then:
properties:
clocks:
minItems: 2
required:
- clock-names
else:
properties:
clocks:
maxItems: 1
clock-names: false
Because amlogic,s4-cpu-thermal falls into the else branch, the schema forbids
specifying the per-sensor APB bus clock (CLKID_TS_PLL / CLKID_TS_DDR) alongside
CLKID_TS. If the bootloader does not leave the APB bus clock enabled, or once
CLK_IGNORE_UNUSED is removed from s4_ts_pll and s4_ts_ddr, register accesses in
amlogic_thermal_enable() and amlogic_thermal_get_temp() during
amlogic_thermal_probe() can access an unclocked peripheral.
Additionally, since S4 passes the sensor index via the amlogic,secure-monitor
phandle argument rather than hardcoding u_efuse_off per compatible, does
naming the compatible amlogic,s4-cpu-thermal prevent reusing it for the S4 DDR
thermal sensor?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261025192244.209256-1-christian.koever-draxl@student.uibk.ac.at?part=2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-10-25 19:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 19:22 [PATCH 0/3] " christian.koever-draxl
2026-10-25 19:22 ` [PATCH 1/3] dt-bindings: thermal: amlogic: add the S4 CPU sensor christian.koever-draxl
2026-10-25 19:43 ` sashiko-bot
2026-10-25 19:22 ` [PATCH 2/3] thermal/drivers/amlogic: add S4 support christian.koever-draxl
2026-10-25 19:43 ` sashiko-bot [this message]
2026-10-25 19:22 ` [PATCH 3/3] thermal/drivers/amlogic: do not log the secure monitor deferral as an error christian.koever-draxl
2026-10-26 8:47 ` neil.armstrong
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=sashiko-outbox-184389@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=christian.koever-draxl@student.uibk.ac.at \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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®