[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f8305ee-d706-a5a3-0691-1aa296a65125@linaro.org>
Date: Thu, 18 Aug 2022 16:39:13 +0300
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Srinivas Neeli <srinivas.neeli@...inx.com>, linux@...ck-us.net,
krzysztof.kozlowski+dt@...aro.org, wim@...ux-watchdog.org,
michal.simek@...inx.com, shubhrajyoti.datta@...inx.com
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-watchdog@...r.kernel.org,
git@...inx.com, git@....com, sgoud@...inx.com,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: Re: [PATCH] dt-bindings: Convert Xilinx watchdog bindings to
json-schema
On 18/08/2022 15:42, Srinivas Neeli wrote:
> Convert Xilinx watchdog bindings to DT schema format using json-schema
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Use subject perfixes matching the subsystem (git log --oneline -- ...).
> diff --git a/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml
> new file mode 100644
> index 000000000000..fd2e3f2df54c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml
xlnx,xps-timebase-wdt.yaml
(name should be matching compatibles)
> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/xlnx,xps-timebase.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx AXI/PLB softcore and window Watchdog Timer
> +
> +allOf:
> + - $ref: "watchdog.yaml#"
No need for quotes. Put the allOf just above "properties".
> +
> +maintainers:
> + - Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
> + - Srinivas Neeli <srinivas.neeli@...inx.com>
> +
> +description:
> + The Timebase watchdog timer(WDT) is a free-running 32 bit counter.
> + WDT uses a dual-expiration architecture. After one expiration of
> + the timeout interval, an interrupt is generated and the WDT state
> + bit is set to one in the status register. If the state bit is not
> + cleared (by writing a one to the state bit) before the next
> + expiration of the timeout interval, a WDT reset is generated.
> +
> +properties:
> + compatible:
> + oneOf:
There is no other option, so no need for oneOf.
> + - items:
You do not have items, just one item. Drop items as well.
> + - enum:
> + - xlnx,xps-timebase-wdt-1.01.a
> + - xlnx,xps-timebase-wdt-1.00.a
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + minItems: 1
instead maxItems
> +
> + clock-frequency:
> + $ref: /schemas/types.yaml#/definitions/uint32
No need for ref. This is a standard property.
> + description: Frequency of clock in Hz
Would be useful to add constraints (minimum/maximum and default), but
that's not a big deal.
> +
> + xlnx,wdt-interval:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Watchdog timeout interval
> + minimum: 8
> + maximum: 32
> +
> + xlnx,wdt-enable-once:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + description: If watchdog is configured as enable once,
> + then the watchdog cannot be disabled after
> + it has been enabled.
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + watchdog@...00000 {
> + compatible = "xlnx,xps-timebase-wdt-1.00.a";
> + reg = <0x40100000 0x1000>;
> + clock-frequency = <50000000>;
> + clocks = <&clkc 15>;
> + xlnx,wdt-enable-once = <0x0>;
> + xlnx,wdt-interval = <0x1b>;
> + } ;
No need for space after ';'
Best regards,
Krzysztof
Powered by blists - more mailing lists