[PATCH 1/2] watchdog: add gpio watchdog driver

Rasmus Villemoes rasmus.villemoes at prevas.dk
Mon May 10 21:56:09 CEST 2021


On 10/05/2021 21.19, Simon Glass wrote:
> Hi Rasmus,
> 
> On Mon, 10 May 2021 at 12:45, Rasmus Villemoes
> <rasmus.villemoes at prevas.dk> 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


More information about the U-Boot mailing list