Re: [PATCH 1/4] dt-bindings: watchdog: loongson,ls1x-wdt: Add ls7a-wdt compatible
From: Conor Dooley
Date: Tue Nov 10 2026 - 14:22:35 EST
On Tue, Nov 10, 2026 at 03:02:30PM +0800, Rong Zhang wrote:
> The Loongson-7A has a watchdog, which is similar to Loongson 2K0300,
> except that it has no clock controller.
I find this hard to believe, the device seems to be getting a clock from
somewhere that the clock-frequency property is providing the rate of.
Why is that clock not represented in devicetree?
Confused,
Conor.
>
> Add "loongson,ls7a-wdt" compatible as well as a conditionally required
> field clock-frequency.
>
> Signed-off-by: Rong Zhang <rongrong@xxxxxxxxxxxxxxxxx>
> ---
> .../bindings/watchdog/loongson,ls1x-wdt.yaml | 31 +++++++++++++++++++++-
> 1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml b/Documentation/devicetree/bindings/watchdog/loongson,ls1x-wdt.yaml
> index 50a9b468c4a3..cb93e9578f82 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
>
> 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
> +
> +then:
> + properties:
> + clocks: false
> + required:
> + - clock-frequency
> +
> +else:
> + properties:
> + clock-frequency: false
> + required:
> + - clocks
> +
> examples:
> - |
> #include <dt-bindings/clock/loongson,ls1x-clk.h>
> @@ -41,3 +63,10 @@ examples:
>
> clocks = <&clkc LS1X_CLKID_APB>;
> };
> +
> + - |
> + watchdog@100d0030 {
> + compatible = "loongson,ls7a-wdt";
> + reg = <0x100d0030 0xc>;
> + clock-frequency = <50000000>;
> + };
>
> --
> 2.55.0
Attachment:
signature.asc
Description: PGP signature