Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Charan Pedumuru" <charan.pedumuru@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/2] dt-bindings: mmc: st,sdhci: Convert to DT schema
Date: Sat, 13 Jun 2026 09:48:38 +0000	[thread overview]
Message-ID: <20260613094838.B5AF11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260613-st-mmc-v4-2-b3c385617c16@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The DT schema fails to conditionally require `reg-names` when multiple `reg` entries are provided, which can lead to silent runtime misconfiguration.
- [Medium] The YAML schema loses the original specific allowed values constraint for `max-frequency`.
--

commit e2c333948a6b09aa2bb42febade330d8715b076f
Author: Charan Pedumuru <charan.pedumuru@gmail.com>

dt-bindings: mmc: st,sdhci: Convert to DT schema

This commit converts the STMicroelectronics sdhci-st MMC/SD controller
binding from a text format to a YAML DT schema. It preserves the flexibility
of optional clocks and registers from the original binding.

> diff --git a/Documentation/devicetree/bindings/mmc/st,sdhci.yaml b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml
> new file mode 100644
> index 0000000000000..0bf4fc3ca699f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml

[ ... ]

> +allOf:
> +  - $ref: mmc-controller.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: st,sdhci
> +      - items:
> +          - const: st,sdhci-stih407
> +          - const: st,sdhci

[Severity: Medium]
Is this a regression from the strict constraints of the text binding?

The original text binding restricted max-frequency to 200000000, 100000000,
or 50000000, which matches the driver's behavior in sdhci-st.c. Since this
new YAML schema omits max-frequency entirely, it falls back to the generic
mmc-controller.yaml which permits any integer.

Should this explicitly define max-frequency under properties with an enum
constraint to prevent unsupported frequencies from passing validation and
silently falling back to 50MHz at runtime?

> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: MMC controller base registers
> +      - description: FlashSS Top registers for TX/RX DLL delay configuration
> +
> +  reg-names:
> +    minItems: 1
> +    items:
> +      - const: mmc
> +      - const: top-mmc-delay

[Severity: Medium]
Does this omission create a regression where the schema validation silently
accepts an invalid device tree?

The previous text binding explicitly stated that if the FlashSS Top register
is provided, reg-names must also be specified.

Without an allOf conditional block making reg-names required when the reg
property contains two items, won't the schema validation pass even if
reg-names is missing? If the driver relies on
devm_platform_ioremap_resource_byname() for top-mmc-delay, could this result
in a silent runtime misconfiguration?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260613-st-mmc-v4-0-b3c385617c16@gmail.com?part=2

      reply	other threads:[~2026-06-13  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-13  9:39 [PATCH v4 0/2] dt-bindings: mmc: st,sdhci: convert STMicroelectronics SDHCI-ST MMC/SD Controller controller binding to YAML Charan Pedumuru
2026-06-13  9:39 ` [PATCH v4 1/2] arm: dts: st: align node patterns with established convention Charan Pedumuru
2026-06-13  9:48   ` sashiko-bot
2026-06-13  9:39 ` [PATCH v4 2/2] dt-bindings: mmc: st,sdhci: Convert to DT schema Charan Pedumuru
2026-06-13  9:48   ` sashiko-bot [this message]

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=20260613094838.B5AF11F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=charan.pedumuru@gmail.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