Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: lianfeng.ouyang <lianfeng.ouyang@starfivetech.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
	krzk+dt@kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: Add bindings for StarFive JHB100 SoC trng controller.
Date: Wed, 13 May 2026 05:17:26 +0000	[thread overview]
Message-ID: <20260513051727.0571AC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260512062404.4540-2-lianfeng.ouyang@starfivetech.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] The commit silently removes the `starfive,jh8100-trng` compatible string, breaking backward ABI compatibility.
- [High] The schema enforces an invalid device tree compatible array order (generic fallback before specific device) for the new JHB100 SoC.
--

commit eafedaf1268d7bf5cd0934352607dcf457417047
Author: Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>

dt-bindings: Add bindings for StarFive JHB100 SoC trng controller.

This commit adds device tree bindings for the TRNG controller on the StarFive
JHB100 SoC.

> diff --git a/Documentation/devicetree/bindings/rng/starfive,jh7110-trng.yaml b/Documentation/devicetree/bindings/rng/starfive,jh7110-trng.yaml
> index 4639247e9e510..11346d77b2f6d 100644
> --- a/Documentation/devicetree/bindings/rng/starfive,jh7110-trng.yaml
> +++ b/Documentation/devicetree/bindings/rng/starfive,jh7110-trng.yaml
> @@ -13,8 +13,8 @@ properties:
>    compatible:
>      oneOf:
>        - items:
> -          - const: starfive,jh8100-trng

Does this break backward ABI compatibility?

Device tree bindings are considered kernel ABI, and removing this line drops
support for any existing device trees that use the starfive,jh8100-trng
compatible string. The commit message doesn't document or justify the removal
of the JH8100 support.

>            - const: starfive,jh7110-trng
> +          - const: starfive,jhb100-trng

Does this enforce an invalid device tree compatible array order?

In YAML binding schemas, the items list enforces the exact sequence required in
the device tree source. By placing starfive,jh7110-trng before
starfive,jhb100-trng, this sequence puts the generic fallback before the
specific hardware variant.

This violates the device tree specification which mandates that the most
specific hardware match must come first.

To support both variants falling back to jh7110, would it be better to use
an enum for the first item containing both specific strings, followed by the
fallback constant?

>        - const: starfive,jh7110-trng

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260512062404.4540-1-lianfeng.ouyang@starfivetech.com?part=1

  parent reply	other threads:[~2026-05-13  5:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  6:24 [PATCH v1 0/2] Add trng driver to JHB100 lianfeng.ouyang
2026-05-12  6:24 ` [PATCH v1 1/2] dt-bindings: Add bindings for StarFive JHB100 SoC trng controller lianfeng.ouyang
2026-05-12 17:15   ` Conor Dooley
2026-05-12 19:35     ` Conor Dooley
2026-05-13  5:17   ` sashiko-bot [this message]
2026-05-12  6:24 ` [PATCH v1 2/2] hwrng: starfive: Update clk and reset sequence lianfeng.ouyang
2026-05-13  5:56   ` sashiko-bot

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=20260513051727.0571AC2BCB7@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lianfeng.ouyang@starfivetech.com \
    --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