All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rong Zhang" <rongrong@oss.cipunited.com>
Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: watchdog: loongson,ls1x-wdt: Add ls7a-wdt compatible
Date: Tue, 10 Nov 2026 07:22:49 +0000	[thread overview]
Message-ID: <sashiko-outbox-206480@kernel.org> (raw)
In-Reply-To: <20261110-mips-ls7a-wdt-v1-1-968bb85122e6@oss.cipunited.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: watchdog: loongson,ls1x-wdt: clock-frequency
  replaces clocks
- [Low] dt-bindings: watchdog: loongson,ls1x-wdt: missing ls2k0300-wdt
  fallback
- [Low] dt-bindings: watchdog: loongson,ls1x-wdt: top-level if and
  single-item enum
--

commit 7aab162e32ac784b9506b7510ce703256e2590fa
Author: Rong Zhang <rongrong@oss.cipunited.com>

dt-bindings: watchdog: loongson,ls1x-wdt: Add ls7a-wdt compatible

This commit adds the "loongson,ls7a-wdt" compatible string and a
conditionally required clock-frequency property to the Loongson-1 watchdog
binding.

> diff --git a/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml b/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml
> index 50a9b468c4a3e..cb93e9578f82a 100644
> --- a/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml
> @@ -18,6 +18,7 @@ properties:
>        - loongson,ls1b-wdt
>        - loongson,ls1c-wdt
>        - loongson,ls2k0300-wdt
> +      - loongson,ls7a-wdt

[Severity: Low]
Should loongson,ls7a-wdt use loongson,ls2k0300-wdt as a fallback
compatible?

The commit message notes that the Loongson-7A watchdog is similar to the
Loongson 2K0300, and the driver uses the same register offsets and bit
definitions for both.  Defining a fallback with oneOf/items allows
existing drivers that match loongson,ls2k0300-wdt to bind without match
table updates.

>   reg:
>     maxItems: 1
> @@ -25,13 +26,34 @@ properties:
>    clocks:
>      maxItems: 1
>  
> +  clock-frequency:
> +    description: Frequency of clock in Hz
> +
>  required:
>    - compatible
>    - reg
> -  - clocks
>  
>  unevaluatedProperties: false
>  
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        enum:
> +          - loongson,ls7a-wdt

[Severity: Low]
Should this if/then/else block be placed under allOf: before
unevaluatedProperties: false, and use const: loongson,ls7a-wdt instead of
a single-entry enum?

> +
> +then:
> +  properties:
> +    clocks: false
> +  required:
> +    - clock-frequency
> +
> +else:
> +  properties:
> +    clock-frequency: false
> +  required:
> +    - clocks

[Severity: Medium]
Should loongson,ls7a-wdt keep the standard clocks property instead of
replacing it with clock-frequency?

Even without a software-programmable clock controller, the watchdog timer
block still has a hardware clock input that can be represented in the DTS
with a fixed-clock provider node, matching other LS7A bindings such as
loongson,ls7a-pwm.yaml.  Forbidding clocks here creates a divergent ABI
and requires separate clock-frequency handling in loongson1_wdt.c.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-mips-ls7a-wdt-v1-0-968bb85122e6@oss.cipunited.com?part=1

  reply	other threads:[~2026-11-10  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  7:02 [PATCH 0/4] watchdog: loongson1: Add Loongson-7A watchdog support Rong Zhang
2026-11-10  7:02 ` [PATCH 1/4] dt-bindings: watchdog: loongson,ls1x-wdt: Add ls7a-wdt compatible Rong Zhang
2026-11-10  7:22   ` sashiko-bot [this message]
2026-11-10 18:58   ` Conor Dooley
2026-11-11  3:17     ` Rong Zhang
2026-11-11 17:45       ` Conor Dooley
2026-11-10  7:02 ` [PATCH 2/4] watchdog: loongson1: Add Loongson-7A watchdog support Rong Zhang
2026-11-10  7:47   ` Guenter Roeck
2026-11-10  7:59     ` Rong Zhang
2026-11-10  7:02 ` [PATCH 3/4] MIPS: Loongson64: Add watchdog node for LS7A PCH Rong Zhang
2026-11-11 17:43   ` Conor Dooley
2026-11-10  7:02 ` [PATCH 4/4] MIPS: loongson3_defconfig: Enable LOONGSON1_WDT by default Rong Zhang

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-206480@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rongrong@oss.cipunited.com \
    --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.