Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andreas Kemnade" <andreas@kemnade.info>
Cc: imx@lists.linux.dev, devicetree@vger.kernel.org, robh@kernel.org,
	conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH 3/3] ARM: dts: imx: kobo-clarahd: Use 32K clock for the timer
Date: Mon, 23 Nov 2026 20:59:52 +0000	[thread overview]
Message-ID: <sashiko-outbox-230043@kernel.org> (raw)
In-Reply-To: <20261123-imx6-idlestop-v1-3-e32f1f44e46f@kemnade.info>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] ARM: dts: imx: kobo-clarahd: missing Signed-off-by trailer in
  commit message
- [High] ARM: dts: imx: overriding gpt1 per clock with 32K CKIL degrades
  system timer
--

commit f6e6f44334678659ba2ecc2406ebe0d33a2e4544
Author: Andreas Kemnade <andreas@kemnade.info>

> ARM: dts: imx: kobo-clarahd: Use 32K clock for the timer
>
> To avoid depending on PLL infrastructure for timekeeping, use 32K timer
> for the timer.

[Severity: High]
The commit message is missing a Signed-off-by: tag.

> diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clarahd.dts b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clarahd.dts
> index 1000ee8b807aa..2e907c4163629 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clarahd.dts
> +++ b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clarahd.dts
> @@ -46,6 +46,11 @@ &gpio_keys {
>  	pinctrl-0 = <&pinctrl_gpio_keys>;
>  };
>  
> +&gpt1 {
> +	clocks = <&clks IMX6SLL_CLK_GPT_BUS>,
> +		 <&clks IMX6SLL_CLK_CKIL>;
> +};
> +
>  &i2c1 {
>  	pinctrl-names = "default","sleep";
>  	pinctrl-0 = <&pinctrl_i2c1>;

[Severity: High]
Does overriding gpt1's per clock with the 32.768 kHz IMX6SLL_CLK_CKIL
degrade system timekeeping on i.MX6SLL, where gpt1 is the only system
timer?

In drivers/clocksource/timer-imx-gpt.c, mxc_clockevent_init() registers
the clockevent device with a hardcoded min_delta of 0xff ticks:

drivers/clocksource/timer-imx-gpt.c:mxc_clockevent_init() {
	...
	clockevents_config_and_register(ced, clk_get_rate(imxtm->clk_per),
					0xff, 0xfffffffe);
	...
}

At 32768 Hz, 255 ticks is ~7.78 ms, so clockevents_program_event() clamps
every timer or hrtimer wakeup below 7.78 ms (including scheduler ticks at
CONFIG_HZ >= 200 and short cpuidle sleeps) to 7.78 ms.

At 32768 Hz, mxc_clocksource_init() also reduces sched_clock and
clocksource resolution to ~30.5 us, and register_current_timer_delay()
rejects imx_delay_timer because its resolution exceeds 1000 ns, falling
back to loop-based udelay() on a board with cpufreq scaling.  In addition,
the GPT clock inputs are internal to the i.MX6SLL SoC, so overriding the
per clock in the board DTS does not describe board-specific hardware.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-imx6-idlestop-v1-0-e32f1f44e46f@kemnade.info?part=3

  reply	other threads:[~2026-11-23 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 20:31 [PATCH RFC 0/3] ARM: imx: Add a more agressive idle mode on i.MX6SLL Andreas Kemnade
2026-11-23 20:31 ` [PATCH RFC 1/3] ARM: imx: enable STOP-ON mode in idle if wakeup requirements permit Andreas Kemnade
2026-11-23 20:49   ` sashiko-bot
2026-11-23 20:31 ` [PATCH 2/3] timer-imx-gpt: Allow 32K clock to be used as a clock source Andreas Kemnade
2026-11-23 20:45   ` sashiko-bot
2026-11-23 20:31 ` [PATCH 3/3] ARM: dts: imx: kobo-clarahd: Use 32K clock for the timer Andreas Kemnade
2026-11-23 20:59   ` sashiko-bot [this message]
2026-11-23 21:26     ` Andreas Kemnade

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-230043@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=andreas@kemnade.info \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --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