dt-binding to define default watchdog and machine reset (Was: Re: [RFC] Using a watchdog as system reset)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

[promoted Rob from Cc: to To: and adapted the subject in the hope to get
some feedback]

On Wed, Oct 07, 2020 at 09:25:30AM +0200, Ahmad Fatoum wrote:
> On 10/7/20 9:12 AM, Uwe Kleine-König wrote:
> > On Tue, Oct 06, 2020 at 02:04:10PM -0700, Guenter Roeck wrote:
> >> With that in mind, your other option kind of makes sense. The only
> >> question would be how to express this in devicetree. I am certainly
> >> open to accepting a patch introducing such a property/functionality
> >> into the watchdog core.
> > 
> > OK, will try to come up with a patch.
> 
> Instead of having a `provide-system-reset' property, how about providing
> it unconditionally, but with a very low priority?
> 
> This can be coupled with Guenther's suggestion of having a dynamic
> way to set the priority, e.g. a `watchdog-priority' property in the device
> tree that's common to all watchdogs? That's the way barebox is handling
> multiple watchdogs (default value in driver overridable in DT and at runtime).

OK, I'll try to put this in more verbose words:

Let's introduce a generic watchdog property `watchdog-priority' that
provides a u32 to order the watchdogs for systems having two or more.
The value 0 means the watchdog is unusable/broken/disabled and the
watchdog with the biggest value is the one supposed to be used by
default.

Analogous a property `watchdog-restart-priority` is used to define if a
watchdog is supposed to be used to restart the machine. Again a value of
0 means "Don't use" and otherwise the highest-value watchdog is used to
reset the machine.

Maybe `restart-priority` is a better name that can also be used by
PMICs?!

> What's the DT folks opinion on that?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux