All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yixun Lan" <dlan@kernel.org>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: mmc: spacemit-sdhci: Add clock-frequency property
Date: Wed, 02 Sep 2026 07:11:27 +0000	[thread overview]
Message-ID: <20260902071128.2EC4B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260902-07-k3-sdhci-dts-v1-1-4e7909cf4233@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Introduction of a redundant custom clock configuration property, bypassing standard Device Tree mechanisms.
--

commit 1745887406b566692891c256f7b9ab7126926f90
Author: Long Wan <long.wan@linux.spacemit.com>

dt-bindings: mmc: spacemit-sdhci: Add clock-frequency property

This commit introduces a custom clock-frequency property to the
spacemit-sdhci device tree binding. The property is intended to define the
initial rate of the IO clock based on board layout validation.

> diff --git a/Documentation/devicetree/bindings/mmc/spacemit,sdhci.yaml b/Documentation/devicetree/bindings/mmc/spacemit,sdhci.yaml
> index 34d202af909f2..f35bf7ce08dd8 100644
> --- a/Documentation/devicetree/bindings/mmc/spacemit,sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/spacemit,sdhci.yaml
> @@ -29,6 +29,13 @@ properties:
>        - description: core clock, used by internal controller
>        - description: io clock, output for SD, SDIO, eMMC device
>  
> +  clock-frequency:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Rate of the io clock in Hz. When present the io clock is programmed to
> +      this rate, allowing a board to select the rate its layout was validated
> +      at.

[Severity: Medium]
Does this property reinvent standard clock configuration mechanisms?

In modern Device Tree design, setting the initial rate of a clock provider
consumed by a device is typically achieved using the standard assigned-clocks
and assigned-clock-rates properties, which the core clock framework processes
automatically.

Alternatively, if the goal is to cap the bus frequency for signal integrity,
the standard MMC max-frequency property should be used. Repurposing
clock-frequency to manually parse and call clk_set_rate() creates a
non-standard ABI for clock configuration and duplicates core functionality.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260902-07-k3-sdhci-dts-v1-0-4e7909cf4233@kernel.org?part=1

  reply	other threads:[~2026-09-02  7:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  7:03 [PATCH 0/4] mmc: spacemit: Introduce two DT properties Yixun Lan
2026-09-02  7:03 ` Yixun Lan
2026-09-02  7:03 ` [PATCH 1/4] dt-bindings: mmc: spacemit-sdhci: Add clock-frequency property Yixun Lan
2026-09-02  7:03   ` Yixun Lan
2026-09-02  7:11   ` sashiko-bot [this message]
2026-09-02  9:08     ` Yixun Lan
2026-09-02  7:03 ` [PATCH 2/4] dt-bindings: mmc: spacemit,sdhci: Add tx delay property Yixun Lan
2026-09-02  7:03   ` Yixun Lan
2026-09-02 18:03   ` Conor Dooley
2026-09-02 18:03     ` Conor Dooley
2026-09-03 13:00   ` Krzysztof Kozlowski
2026-09-03 13:00     ` Krzysztof Kozlowski
2026-09-04 20:32     ` Yixun Lan
2026-09-04 20:32       ` Yixun Lan
2026-09-02  7:03 ` [PATCH 3/4] mmc: sdhci-of-k1: Set clock-frequency of io clock Yixun Lan
2026-09-02  7:03   ` Yixun Lan
2026-09-02  7:14   ` sashiko-bot
2026-09-03  3:29   ` Troy Mitchell
2026-09-03  3:29     ` Troy Mitchell
2026-09-03 10:29     ` Yixun Lan
2026-09-03 10:29       ` Yixun Lan
2026-09-02  7:03 ` [PATCH 4/4] mmc: sdhci-of-k1: Add TX tuning parameter Yixun Lan
2026-09-02  7:03   ` Yixun Lan
2026-09-03  3:27   ` Troy Mitchell
2026-09-03  3:27     ` Troy Mitchell
2026-09-03 10:37     ` Yixun Lan
2026-09-03 10:37       ` Yixun Lan

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=20260902071128.2EC4B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@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 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.