mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@vger.kernel.org,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Ethan Nelson-Moore <enelsonmoore@gmail.com>,
	Eric Biggers <ebiggers@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mingyu Wang <25181214217@stu.xidian.edu.cn>,
	Robert Marko <robert.marko@sartura.hr>,
	"open list:WATCHDOG DEVICE DRIVERS"
	<linux-watchdog@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	manuel.lauss@gmail.com
Subject: Re: [PATCH 4/5] MIPS: Alchemy: Use the GPIO watchdog driver on MTX-1
Date: Fri, 23 Oct 2026 10:26:53 +0200	[thread overview]
Message-ID: <atsaTfcvlrV_EEcK@alpha.franken.de> (raw)
In-Reply-To: <20261016221617.2223004-5-f.fainelli@gmail.com>

On Fri, Oct 16, 2026 at 03:16:16PM -0700, Florian Fainelli wrote:
> The MTX-1 watchdog is serviced by toggling GPIO 215. Describe its toggle
> algorithm and 1.6-second minimum interval through the existing software
> node properties, and register gpio-wdt instead of mtx1-wdt.
> 
> The nominal 100-second circuit reset the test board about 82 seconds after
> starting an unclean-close test over the serial console. Allow for circuit
> tolerance and console transmission time with a conservative 70-second
> hardware service margin. Keep a 100-second initial userspace timeout and
> let the core schedule keepalives for the longer userspace timeout.
> 
> Mark the watchdog always-running so the core services it before userspace
> opens the device and after a clean stop, without trying to disable the
> hardware by tristating the GPIO. Enable GPIO_WATCHDOG in the MTX-1
> defconfig.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/mips/alchemy/board-mtx1.c   | 8 +++++++-
>  arch/mips/configs/mtx1_defconfig | 2 +-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c
> index 88c20c0ca96d..8543ae42af92 100644
> --- a/arch/mips/alchemy/board-mtx1.c
> +++ b/arch/mips/alchemy/board-mtx1.c
> @@ -125,13 +125,19 @@ static void __init mtx1_keys_init(void)
>  }
>  
>  static const struct property_entry mtx1_wdt_props[] = {
> +	PROPERTY_ENTRY_STRING("hw_algo", "toggle"),
> +	/* Allow for tolerance in the nominal 100-second timeout. */
> +	PROPERTY_ENTRY_U32("hw_margin_ms", 70000),
> +	PROPERTY_ENTRY_U32("hw-min-interval-ms", 1600),
> +	PROPERTY_ENTRY_U32("timeout-sec", 100),
> +	PROPERTY_ENTRY_BOOL("always-running"),
>  	/* Global number 215 is offset 15 on Alchemy GPIO 2 */
>  	PROPERTY_ENTRY_GPIO("gpios", &alchemy_gpio2_node, 15, GPIO_ACTIVE_HIGH),
>  	{ }
>  };
>  
>  static const struct platform_device_info mtx1_wdt_info __initconst = {
> -	.name = "mtx1-wdt",
> +	.name = "gpio-wdt",
>  	.id = 0,
>  	.properties = mtx1_wdt_props,
>  };
> diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
> index e28a0b1e6d52..5e060daded9d 100644
> --- a/arch/mips/configs/mtx1_defconfig
> +++ b/arch/mips/configs/mtx1_defconfig
> @@ -377,7 +377,7 @@ CONFIG_SENSORS_W83627HF=m
>  CONFIG_SENSORS_W83627EHF=m
>  CONFIG_WATCHDOG=y
>  CONFIG_WATCHDOG_NOWAYOUT=y
> -CONFIG_WDT_MTX1=y
> +CONFIG_GPIO_WATCHDOG=y
>  # CONFIG_VGA_ARB is not set
>  # CONFIG_LCD_CLASS_DEVICE is not set
>  CONFIG_BACKLIGHT_CLASS_DEVICE=y
> -- 
> 2.53.0
> 

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2026-10-23  8:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 22:16 [PATCH 0/5] MTX-1 watchdog driver removal Florian Fainelli
2026-10-16 22:16 ` [PATCH 1/5] watchdog: gpio: Allow devices described by software nodes Florian Fainelli
2026-10-20  1:01   ` Guenter Roeck
2026-10-20  1:38   ` Guenter Roeck
2026-10-16 22:16 ` [PATCH 2/5] dt-bindings: watchdog: gpio: Describe minimum heartbeat intervals Florian Fainelli
2026-10-18 19:07   ` Conor Dooley
2026-10-20  1:01   ` Guenter Roeck
2026-10-20  1:38   ` Guenter Roeck
2026-10-16 22:16 ` [PATCH 3/5] watchdog: gpio: Support watchdogs with a minimum heartbeat interval Florian Fainelli
2026-10-20  1:01   ` Guenter Roeck
2026-10-20  1:39   ` Guenter Roeck
2026-10-16 22:16 ` [PATCH 4/5] MIPS: Alchemy: Use the GPIO watchdog driver on MTX-1 Florian Fainelli
2026-10-23  8:26   ` Thomas Bogendoerfer [this message]
2026-10-16 22:16 ` [PATCH 5/5] watchdog: Remove the MTX-1 watchdog driver Florian Fainelli
2026-10-20  1:01   ` Guenter Roeck
2026-10-20  1:00 ` [PATCH 0/5] MTX-1 watchdog driver removal Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atsaTfcvlrV_EEcK@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=25181214217@stu.xidian.edu.cn \
    --cc=andrew@lunn.ch \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ebiggers@kernel.org \
    --cc=enelsonmoore@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=manuel.lauss@gmail.com \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®