@@ -12,6 +12,9 @@ maintainers:
properties:
compatible:
oneOf:
+ - items:
+ - const: canaan,k210-apb-timer
+ - const: snps,dw-apb-timer
- const: snps,dw-apb-timer
- enum:
- snps,dw-apb-timer-sp
@@ -21,9 +24,6 @@ properties:
reg:
maxItems: 1
- interrupts:
- maxItems: 1
-
resets:
maxItems: 1
@@ -41,7 +41,23 @@ properties:
clock-frequency: true
-additionalProperties: false
+unevaluatedProperties: false
+
+if:
+ properties:
+ compatible:
+ contains:
+ const: canaan,k210-apb-timer
+
+then:
+ properties:
+ interrupts:
+ maxItems: 2
+
+else:
+ properties:
+ interrupts:
+ maxItems: 1
required:
- compatible
@@ -60,8 +76,8 @@ oneOf:
examples:
- |
timer@ffe00000 {
- compatible = "snps,dw-apb-timer";
- interrupts = <0 170 4>;
+ compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer";
+ interrupts = <0 170 4>, <0 170 4>;
reg = <0xffe00000 0x1000>;
clocks = <&timer_clk>, <&timer_pclk>;
clock-names = "timer", "pclk";