Hi, On 16/07/2020 16:47:05+0200, Uwe Kleine-König wrote: > Hello, > > On Thu, Aug 22, 2019 at 03:19:35PM +0200, Bruno Thomsen wrote: > > Add partial support for the watchdog functionality of > > both PCF2127 and PCF2129 chips. > > I have a board here with a pcf2127 that has the #RST pin > not connected. > > The problem this creates is: The bootloader arms the SoC's watchdog and > jumps into Linux. The pcf2127 driver happens to load first, so watchdog0 > is provided by the RTC (but non-functional). Systemd is configured to > feed the watchdog, but happens to feed the wrong one, so the machine > resets shortly after it is up :-| > > So I wonder if we need a dt property that tells the driver if the RST > line is connected or not. > I guess the current solution is to set WatchdogDevice to point to a link that is updated by udev thus ensuring it points to the correct watchdog device regardless of the probe order. This would be similar to the /dev/rtc symlink, pointing to the systohc RTC by default (even if I don't really like that heuristic). What you suggest is somewhat okay but doesn't really solve the issue if both watchdogs are functional and systemd still doesn't pick the one that is armed by the bootloader. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com