* [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one
[not found] <20200306132747.14701-1-Sergey.Semin@baikalelectronics.ru>
@ 2020-03-06 13:27 ` Sergey.Semin
2020-03-06 15:18 ` Guenter Roeck
[not found] ` <20200306151839.374AA80307C2@mail.baikalelectronics.ru>
2020-03-06 13:27 ` [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property Sergey.Semin
2020-03-10 0:32 ` [PATCH 0/7] watchdog: dw_wdt: Take Baikal-T1 DW WDT peculiarities into account Sergey Semin
2 siblings, 2 replies; 6+ messages in thread
From: Sergey.Semin @ 2020-03-06 13:27 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland
Cc: Serge Semin, Serge Semin, Alexey Malahov, Thomas Bogendoerfer,
Paul Burton, Ralf Baechle, linux-watchdog, devicetree,
linux-kernel
From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Modern device tree bindings are supposed to be created as YAML-files
in accordane with dt-schema. This commit replaces the DW Watchdog
legacy bare text bindings with YAML file. As before the the bindings
states that the corresponding dts node is supposed to have a registers
range reference, at least one clocks phandle reference, optional reset
lines. Seeing all the platforms with DW Watchdog provide the watchdog
interrupt property and since in further commit we'll alter the driver
to use it for pre-timeout functionality implementation, lets declare
the IRQ property to be required.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
.../devicetree/bindings/watchdog/dw_wdt.txt | 24 -------
.../bindings/watchdog/snps,dw-wdt.yaml | 66 +++++++++++++++++++
2 files changed, 66 insertions(+), 24 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
create mode 100644 Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
deleted file mode 100644
index eb0914420c7c..000000000000
--- a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Synopsys Designware Watchdog Timer
-
-Required Properties:
-
-- compatible : Should contain "snps,dw-wdt"
-- reg : Base address and size of the watchdog timer registers.
-- clocks : phandle + clock-specifier for the clock that drives the
- watchdog timer.
-
-Optional Properties:
-
-- interrupts : The interrupt used for the watchdog timeout warning.
-- resets : phandle pointing to the system reset controller with
- line index for the watchdog.
-
-Example:
-
- watchdog0: wd@ffd02000 {
- compatible = "snps,dw-wdt";
- reg = <0xffd02000 0x1000>;
- interrupts = <0 171 4>;
- clocks = <&per_base_clk>;
- resets = <&rst WDT0_RESET>;
- };
diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
new file mode 100644
index 000000000000..8b30f9601c38
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (C) 2019 BAIKAL ELECTRONICS, JSC
+#
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/snps,dw-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synopsys Designware Watchdog Timer
+
+allOf:
+ - $ref: "watchdog.yaml#"
+
+maintainers:
+ - Jamie Iles <jamie@jamieiles.com>
+
+properties:
+ compatible:
+ const: snps,dw-wdt
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: DW Watchdog pre-timeout interrupts.
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ items:
+ - description: Watchdog timer reference clock.
+ - description: APB3 interface clock.
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: tclk
+ - const: pclk
+
+ assigned-clocks: true
+
+ assigned-clock-rates: true
+
+ resets:
+ description: Phandle to the DW Watchdog reset lane.
+ maxItems: 1
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+examples:
+ - |
+ watchdog0: watchdog@ffd02000 {
+ compatible = "snps,dw-wdt";
+ reg = <0xffd02000 0x1000>;
+ interrupts = <0 171 4>;
+ clocks = <&per_base_clk>;
+ resets = <&wdt_rst>;
+ };
+...
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one
2020-03-06 13:27 ` [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one Sergey.Semin
@ 2020-03-06 15:18 ` Guenter Roeck
[not found] ` <20200306151839.374AA80307C2@mail.baikalelectronics.ru>
1 sibling, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2020-03-06 15:18 UTC (permalink / raw)
To: Sergey.Semin, Wim Van Sebroeck, Rob Herring, Mark Rutland
Cc: Serge Semin, Alexey Malahov, Thomas Bogendoerfer, Paul Burton,
Ralf Baechle, linux-watchdog, devicetree, linux-kernel
On 3/6/20 5:27 AM, Sergey.Semin@baikalelectronics.ru wrote:
> From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> Modern device tree bindings are supposed to be created as YAML-files
> in accordane with dt-schema. This commit replaces the DW Watchdog
> legacy bare text bindings with YAML file. As before the the bindings
> states that the corresponding dts node is supposed to have a registers
> range reference, at least one clocks phandle reference, optional reset
> lines. Seeing all the platforms with DW Watchdog provide the watchdog
> interrupt property and since in further commit we'll alter the driver
> to use it for pre-timeout functionality implementation, lets declare
> the IRQ property to be required.
>
First, this is not just a replacement - it changes semantics.
Second, I disagree with making interrupts mandatory. They are only needed
for pretimeout functionality, and not everyone may want to enable that.
I don't see the point of forcing everyone to enable and provide functionality
that is neither wanted or needed for a given use case. Yes, the interrupt
is provided by all users today, but we may have one coming up tomorrow
where the interrupt line is not even wired up. What then ?
Guenter
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> ---
> .../devicetree/bindings/watchdog/dw_wdt.txt | 24 -------
> .../bindings/watchdog/snps,dw-wdt.yaml | 66 +++++++++++++++++++
> 2 files changed, 66 insertions(+), 24 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> create mode 100644 Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> deleted file mode 100644
> index eb0914420c7c..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Synopsys Designware Watchdog Timer
> -
> -Required Properties:
> -
> -- compatible : Should contain "snps,dw-wdt"
> -- reg : Base address and size of the watchdog timer registers.
> -- clocks : phandle + clock-specifier for the clock that drives the
> - watchdog timer.
> -
> -Optional Properties:
> -
> -- interrupts : The interrupt used for the watchdog timeout warning.
> -- resets : phandle pointing to the system reset controller with
> - line index for the watchdog.
> -
> -Example:
> -
> - watchdog0: wd@ffd02000 {
> - compatible = "snps,dw-wdt";
> - reg = <0xffd02000 0x1000>;
> - interrupts = <0 171 4>;
> - clocks = <&per_base_clk>;
> - resets = <&rst WDT0_RESET>;
> - };
> diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> new file mode 100644
> index 000000000000..8b30f9601c38
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Copyright (C) 2019 BAIKAL ELECTRONICS, JSC
> +#
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/snps,dw-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Synopsys Designware Watchdog Timer
> +
> +allOf:
> + - $ref: "watchdog.yaml#"
> +
> +maintainers:
> + - Jamie Iles <jamie@jamieiles.com>
> +
> +properties:
> + compatible:
> + const: snps,dw-wdt
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + description: DW Watchdog pre-timeout interrupts.
> + maxItems: 1
> +
> + clocks:
> + minItems: 1
> + items:
> + - description: Watchdog timer reference clock.
> + - description: APB3 interface clock.
> +
> + clock-names:
> + minItems: 1
> + items:
> + - const: tclk
> + - const: pclk
> +
> + assigned-clocks: true
> +
> + assigned-clock-rates: true
> +
> + resets:
> + description: Phandle to the DW Watchdog reset lane.
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +examples:
> + - |
> + watchdog0: watchdog@ffd02000 {
> + compatible = "snps,dw-wdt";
> + reg = <0xffd02000 0x1000>;
> + interrupts = <0 171 4>;
> + clocks = <&per_base_clk>;
> + resets = <&wdt_rst>;
> + };
> +...
>
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20200306151839.374AA80307C2@mail.baikalelectronics.ru>]
* Re: [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one
[not found] ` <20200306151839.374AA80307C2@mail.baikalelectronics.ru>
@ 2020-04-07 17:48 ` Sergey Semin
0 siblings, 0 replies; 6+ messages in thread
From: Sergey Semin @ 2020-04-07 17:48 UTC (permalink / raw)
To: Guenter Roeck
Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Alexey Malahov,
Thomas Bogendoerfer, Paul Burton, Ralf Baechle, linux-watchdog,
devicetree, linux-kernel
Hi Guenter,
On Fri, Mar 06, 2020 at 07:18:35AM -0800, Guenter Roeck wrote:
> On 3/6/20 5:27 AM, Sergey.Semin@baikalelectronics.ru wrote:
> > From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> >
> > Modern device tree bindings are supposed to be created as YAML-files
> > in accordane with dt-schema. This commit replaces the DW Watchdog
> > legacy bare text bindings with YAML file. As before the the bindings
> > states that the corresponding dts node is supposed to have a registers
> > range reference, at least one clocks phandle reference, optional reset
> > lines. Seeing all the platforms with DW Watchdog provide the watchdog
> > interrupt property and since in further commit we'll alter the driver
> > to use it for pre-timeout functionality implementation, lets declare
> > the IRQ property to be required.
> >
>
> First, this is not just a replacement - it changes semantics.
>
> Second, I disagree with making interrupts mandatory. They are only needed
> for pretimeout functionality, and not everyone may want to enable that.
> I don't see the point of forcing everyone to enable and provide functionality
> that is neither wanted or needed for a given use case. Yes, the interrupt
> is provided by all users today, but we may have one coming up tomorrow
> where the interrupt line is not even wired up. What then ?
Ok. I'll leave the interrupts optional, though I would have to implement
it in the driver as well. Is this all semantic changes you were referring to?
There is one more change, which you may have also considered as semantic
update. It's async clocks support - "pclk" clock. Would you like me to
unpin this alteration into an additional patch? Rob?
I'll also provide the next fixes in v2:
- single license with GPL-2.0-only,
- remove copyrights (it's not right to add our copyrights here),
- replace "additionalProperties: false" with "unevaluatedProperties: false"
- Remove "assigned-clocks" and "assigned-clock-rates" properties
Regards,
-Sergey
>
> Guenter
>
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> > Cc: Paul Burton <paulburton@kernel.org>
> > Cc: Ralf Baechle <ralf@linux-mips.org>
> > ---
> > .../devicetree/bindings/watchdog/dw_wdt.txt | 24 -------
> > .../bindings/watchdog/snps,dw-wdt.yaml | 66 +++++++++++++++++++
> > 2 files changed, 66 insertions(+), 24 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> > create mode 100644 Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> > deleted file mode 100644
> > index eb0914420c7c..000000000000
> > --- a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> > +++ /dev/null
> > @@ -1,24 +0,0 @@
> > -Synopsys Designware Watchdog Timer
> > -
> > -Required Properties:
> > -
> > -- compatible : Should contain "snps,dw-wdt"
> > -- reg : Base address and size of the watchdog timer registers.
> > -- clocks : phandle + clock-specifier for the clock that drives the
> > - watchdog timer.
> > -
> > -Optional Properties:
> > -
> > -- interrupts : The interrupt used for the watchdog timeout warning.
> > -- resets : phandle pointing to the system reset controller with
> > - line index for the watchdog.
> > -
> > -Example:
> > -
> > - watchdog0: wd@ffd02000 {
> > - compatible = "snps,dw-wdt";
> > - reg = <0xffd02000 0x1000>;
> > - interrupts = <0 171 4>;
> > - clocks = <&per_base_clk>;
> > - resets = <&rst WDT0_RESET>;
> > - };
> > diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> > new file mode 100644
> > index 000000000000..8b30f9601c38
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> > @@ -0,0 +1,66 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +#
> > +# Copyright (C) 2019 BAIKAL ELECTRONICS, JSC
> > +#
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/watchdog/snps,dw-wdt.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Synopsys Designware Watchdog Timer
> > +
> > +allOf:
> > + - $ref: "watchdog.yaml#"
> > +
> > +maintainers:
> > + - Jamie Iles <jamie@jamieiles.com>
> > +
> > +properties:
> > + compatible:
> > + const: snps,dw-wdt
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + description: DW Watchdog pre-timeout interrupts.
> > + maxItems: 1
> > +
> > + clocks:
> > + minItems: 1
> > + items:
> > + - description: Watchdog timer reference clock.
> > + - description: APB3 interface clock.
> > +
> > + clock-names:
> > + minItems: 1
> > + items:
> > + - const: tclk
> > + - const: pclk
> > +
> > + assigned-clocks: true
> > +
> > + assigned-clock-rates: true
> > +
> > + resets:
> > + description: Phandle to the DW Watchdog reset lane.
> > + maxItems: 1
> > +
> > +additionalProperties: false
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > +
> > +examples:
> > + - |
> > + watchdog0: watchdog@ffd02000 {
> > + compatible = "snps,dw-wdt";
> > + reg = <0xffd02000 0x1000>;
> > + interrupts = <0 171 4>;
> > + clocks = <&per_base_clk>;
> > + resets = <&wdt_rst>;
> > + };
> > +...
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property
[not found] <20200306132747.14701-1-Sergey.Semin@baikalelectronics.ru>
2020-03-06 13:27 ` [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one Sergey.Semin
@ 2020-03-06 13:27 ` Sergey.Semin
2020-03-12 22:22 ` Rob Herring
2020-03-10 0:32 ` [PATCH 0/7] watchdog: dw_wdt: Take Baikal-T1 DW WDT peculiarities into account Sergey Semin
2 siblings, 1 reply; 6+ messages in thread
From: Sergey.Semin @ 2020-03-06 13:27 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland
Cc: Serge Semin, Serge Semin, Alexey Malahov, Thomas Bogendoerfer,
Paul Burton, Ralf Baechle, linux-watchdog, devicetree,
linux-kernel
From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
In case if DW Watchdog IP core is built with WDT_USE_FIX_TOP == false,
a custom timeout periods are used to preset the timer counter. In
this case that periods should be specified in a new "snps,watchdog-tops"
property of the DW watchdog dts node.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
.../bindings/watchdog/snps,dw-wdt.yaml | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
index 8b30f9601c38..1b3b71351628 100644
--- a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
@@ -46,6 +46,21 @@ properties:
description: Phandle to the DW Watchdog reset lane.
maxItems: 1
+ snps,watchdog-tops:
+ description: |
+ DW APB Watchdog custom timer intervals - Timeout Period ranges (TOPs).
+ Each TOP is a number loaded into the watchdog counter at the moment of
+ the timer restart. The counter decrementing happens each tick of the
+ reference clock. Therefore the TOPs array is equivalent to an array of
+ the timer expiration intervals supported by the DW APB Watchdog. Note
+ DW APB Watchdog IP-cores might be synthesized with fixed TOP values,
+ in which case this property is unnecessary.
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32-array
+ - items:
+ minItems: 16
+ maxItems: 16
+
additionalProperties: false
required:
@@ -63,4 +78,19 @@ examples:
clocks = <&per_base_clk>;
resets = <&wdt_rst>;
};
+
+ - |
+ watchdog1: watchdog@ffd02000 {
+ compatible = "snps,dw-wdt";
+ reg = <0xffd02000 0x1000>;
+ interrupts = <0 171 4>;
+ clocks = <&per_base_clk>;
+ clock-names = "tclk";
+ snps,watchdog-tops = <0x000000FF 0x000001FF 0x000003FF
+ 0x000007FF 0x0000FFFF 0x0001FFFF
+ 0x0003FFFF 0x0007FFFF 0x000FFFFF
+ 0x001FFFFF 0x003FFFFF 0x007FFFFF
+ 0x00FFFFFF 0x01FFFFFF 0x03FFFFFF
+ 0x07FFFFFF>;
+ };
...
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property
2020-03-06 13:27 ` [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property Sergey.Semin
@ 2020-03-12 22:22 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-12 22:22 UTC (permalink / raw)
To: Sergey.Semin
Cc: Wim Van Sebroeck, Guenter Roeck, Mark Rutland, Serge Semin,
Serge Semin, Alexey Malahov, Thomas Bogendoerfer, Paul Burton,
Ralf Baechle, linux-watchdog, devicetree, linux-kernel
On Fri, 6 Mar 2020 16:27:42 +0300, <Sergey.Semin@baikalelectronics.ru> wrote:
> From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> In case if DW Watchdog IP core is built with WDT_USE_FIX_TOP == false,
> a custom timeout periods are used to preset the timer counter. In
> this case that periods should be specified in a new "snps,watchdog-tops"
> property of the DW watchdog dts node.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> ---
> .../bindings/watchdog/snps,dw-wdt.yaml | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] watchdog: dw_wdt: Take Baikal-T1 DW WDT peculiarities into account
[not found] <20200306132747.14701-1-Sergey.Semin@baikalelectronics.ru>
2020-03-06 13:27 ` [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one Sergey.Semin
2020-03-06 13:27 ` [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property Sergey.Semin
@ 2020-03-10 0:32 ` Sergey Semin
2 siblings, 0 replies; 6+ messages in thread
From: Sergey Semin @ 2020-03-10 0:32 UTC (permalink / raw)
To: Alexey Malahov, Maxim Kaurkin, Pavel Parkhomenko, Ramil Zaripov,
Ekaterina Skachko, Vadim Vlasov, Thomas Bogendoerfer, Paul Burton,
Ralf Baechle, Wim Van Sebroeck, Guenter Roeck, Philipp Zabel,
Rob Herring, Mark Rutland, linux-watchdog, devicetree,
linux-kernel
On Fri, Mar 06, 2020 at 04:27:40PM +0300, Sergey.Semin@baikalelectronics.ru wrote:
> From: Serge Semin <fancer.lancer@gmail.com>
>
> There were a few features enabled at the time of the Baikal-T1 SoC DW WDT
> IP synthesis, which weren't taken into account in the DW WDT driver available
> in the kernel. First of all the SoC engineers synthesized the watchdog core
> with WDT_USE_FIX_TOP set to false (don't really know why, but they did).
> Due to this the timer reset values weren't fixed as the driver expected
> but were initialized with a pre-defined values selected by the engineers.
> Secondly the driver expected that the watchdog APB bus and the timer had
> synchronous reference clocks, while Baikal-T1 SoC DW WDT was created with
> asynchronous ones. So the driver should enable two clock devices: APB bus
> clocks and a separate timer reference clock. Finally DW Watchdog Timer is
> capable of generating a pre-timeout interrupt if corresponding config is
> enabled. The problem was that the pre-timeout IRQ happens when the set
> timeout elapses, while the actual WDT expiration and subsequent reboot take
> place in the next timeout. This makes the pre-timeout functionality
> implementation a bit tricky, since in this case we would have to find a
> WDT timeout twice smaller the requested timeout. All of the changes described
> above are provided by the patches in this patchset.
>
> In addition traditionally we replaced the legacy plain text-based dt-binding
> file with yaml-based one, made some cleanups in the watchdog core code (just
> replaced time-unit numerical literals with corresponding macro) and added
> DebugFS nodes to ease the driver debug procedure.
>
> This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
> commit 98d54f81e36b ("Linux 5.6-rc4").
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
> Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
> Cc: Ekaterina Skachko <Ekaterina.Skachko@baikalelectronics.ru>
> Cc: Vadim Vlasov <V.Vlasov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-watchdog@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
>
> Serge Semin (7):
> dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with
> YAML-based one
> dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property
> watchdog: watchdog_dev: Use generic msec-per-sec macro
> watchdog: dw_wdt: Support devices with non-fixed TOP values
> watchdog: dw_wdt: Support devices with asynch clocks
> watchdog: dw_wdt: Add pre-timeouts support
> watchdog: dw_wdt: Add DebugFS files
>
> .../devicetree/bindings/watchdog/dw_wdt.txt | 24 -
> .../bindings/watchdog/snps,dw-wdt.yaml | 96 ++++
> drivers/watchdog/dw_wdt.c | 460 ++++++++++++++++--
> drivers/watchdog/watchdog_dev.c | 4 +-
> 4 files changed, 523 insertions(+), 61 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> create mode 100644 Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
>
> --
> 2.25.1
>
Folks,
It appears our corporate email server changes the Message-Id field of
messages passing through it. Due to that the emails threading gets to be
broken. I'll resubmit the properly structured v2 patchset as soon as our
system administrator fixes the problem and all the questions, already raised by
the maintainers/reviewer, are settled. Sorry for the inconvenience caused me.
Regards,
-Sergey
^ permalink raw reply [flat|nested] 6+ messages in thread