[PATCH 1/4] dt-bindings: watchdog: loongson,ls1x-wdt: Add ls7a-wdt compatible
From: Rong Zhang
Date: Tue Nov 10 2026 - 02:09:33 EST
The Loongson-7A has a watchdog, which is similar to Loongson 2K0300,
except that it has no clock controller.
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