Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Adrian Ng Ho Yin" <adrian.ho.yin.ng@altera.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 1/3] arm64: dts: socfpga: agilex5: replace clocks reference with clock-frequency for dw-apb-timer
Date: Thu, 03 Sep 2026 17:53:56 +0000	[thread overview]
Message-ID: <20260903175356.BF1461F000E9@smtp.kernel.org> (raw)
In-Reply-To: <6317aa2675ab36ec1dfd881ae7e95d1f3378aed0.1788457041.git.adrian.ho.yin.ng@altera.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Replacing 'clocks' with 'clock-frequency' to work around Linux driver initialization ordering is a Devicetree anti-pattern.
--

commit bdc3d28e7cc7c5d8502d6fe42848d2feefd3bf47
Author: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>

arm64: dts: socfpga: agilex5: replace clocks reference with clock-frequency for dw-apb-timer

This patch replaces the dynamic clock reference for the Agilex5 timers with a
hardcoded clock frequency. This is done to bypass a driver initialization
ordering issue where the clock manager probes later than the timer.

> diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> index f54767d1526e1..f5bc37fa85832 100644
> --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> @@ -429,32 +429,28 @@ timer0: timer0@10c03000 {
>  			compatible = "snps,dw-apb-timer";
>  			reg = <0x10c03000 0x100>;
>  			interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
> -			clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
> -			clock-names = "timer";
> +			clock-frequency = <100000000>;

[Severity: Medium]
Is it appropriate to encode an OS-specific probe-order workaround directly
into the hardware description?

Devicetree is designed to describe hardware topology rather than provide
workarounds for Linux driver initialization sequences. By replacing the clocks
reference to the Agilex5 clock manager with a hardcoded clock-frequency, the
correct physical clock association is lost.

If the bootloader changes the L4_SP clock rate in the future, wouldn't the
hardcoded 100 MHz value lead to incorrect kernel timekeeping since it no longer
queries the actual clock manager?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1788457041.git.adrian.ho.yin.ng@altera.com?part=1

  reply	other threads:[~2026-09-03 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1788457041.git.adrian.ho.yin.ng@altera.com>
2026-09-03 17:41 ` [PATCH v2 1/3] arm64: dts: socfpga: agilex5: replace clocks reference with clock-frequency for dw-apb-timer Adrian Ng Ho Yin
2026-09-03 17:53   ` sashiko-bot [this message]
2026-09-03 17:41 ` [PATCH v2 2/3] arm64: dts: socfpga: agilex: " Adrian Ng Ho Yin
2026-09-03 17:41 ` [PATCH v2 3/3] arm64: dts: socfpga: stratix10: " Adrian Ng Ho Yin

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=20260903175356.BF1461F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=adrian.ho.yin.ng@altera.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.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