From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Villemoes Date: Mon, 10 May 2021 21:56:09 +0200 Subject: [PATCH 1/2] watchdog: add gpio watchdog driver In-Reply-To: References: <20210510154738.3385393-1-rasmus.villemoes@prevas.dk> Message-ID: <427198ad-e0f4-9bcf-8988-479d1fbb2aa1@prevas.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/05/2021 21.19, Simon Glass wrote: > Hi Rasmus, > > On Mon, 10 May 2021 at 12:45, Rasmus Villemoes > wrote: >> >>>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >>>> index f0ff2612a6..2cf378db29 100644 >>>> --- a/drivers/watchdog/Kconfig >>>> +++ b/drivers/watchdog/Kconfig >>>> @@ -147,6 +147,13 @@ config WDT_CORTINA >>>> This driver support all CPU ISAs supported by Cortina >>>> Access CAxxxx SoCs. >>>> >>>> +config WDT_GPIO >>>> + bool "External gpio watchdog support" >>>> + depends on WDT >>>> + depends on DM_GPIO >>>> + help >>>> + Support for external watchdog fed by toggling a gpio. >>> >>> please add a bit more detail. How do you configure it? e.g. point to >>> the binding file (which you should add to U-Boot if not there). >> >> You mean add a reference to >> doc/device-tree-bindings/watchdog/gpio-wdt.txt which is added in the >> very same patch? I can do that. >> >> No other config option in drivers/watchdog/Kconfig has that, but perhaps >> that's because there's no mention anywhere of wdt under >> doc/device-tree-bindings/. And more generally, very few Kconfig files >> have any such reference. > > Well, the thing is....there is a patman warning about adding at least > three lines of text to next Kconfig options. I think people should > really sit and think for a few minutes about what useful information > can be imparted, so users don't need to go to the source code to > figure out basic details. > > If you don't want to add a mention of the binding, It's not that I don't want to, I was just pointing out that no other WDT drivers have that, nor a binding to refer to. I'll add a ref. perhaps you could > mention that the pin needs to be toggled each xx ms otherwise the > board will be reset? Well, that part depends on which particular watchdog circuit the hardware guys have decided to put on the board - these are very generic components. I'll add the hw_margin_ms property to the .txt file. Rasmus