[PATCH v7] wdt: nuvoton: Add support for Nuvoton

Michael Walle michael at walle.cc
Tue Mar 22 13:03:12 CET 2022


Am 2022-03-22 11:54, schrieb Andre Przywara:
> On Tue, 22 Mar 2022 17:19:53 +0800
> Jim Liu <jim.t90615 at gmail.com> wrote:
> 
> Hi,
> 
>> Add watchdog controller driver for NPCM7xx/npcm8xx
> 
> So this is now the same as v4, with both compatible strings listed.
> Which *might* be right, but my question still stands:
> 
> Is the 845 watchdog compatible to the 740 version? Does the current
> Linux driver work?
> 
> If yes (and your driver suggests so, because you treat the two
> compatible strings the same), then you would not need to list both *in
> the driver*, but just do so in the .dts file.
> 
> So the driver just matches "nuvoton,npcm750-wdt" (as does the Linux
> driver), the nuvoton-common-npcm7xx.dtsi stays the same, but in the
> npcm845.dtsi you write:
> 	watchdog: watchdog at xxx {
> 		compatible = "nuvoton,npcm845-wdt",
> 			     "nuvoton,npcm750-wdt";
> 		interrupts = ...
> 		...
> 	};
> 
> This way you don't need to change the (Linux) driver, and get away with
> one compatible string, for both devices.

Ahh didn't noticed that there are different compatible strings
in the linux kernel driver.

And even
> 		compatible = "nuvoton,npcm845-wdt",
> 			     "nuvoton,npcm750-wdt";
would be undocumented if it is not upstreamed to linux.

> So can you please confirm that both are compatible. I couldn't find any
> information on that.
> 
> Please just don't send another patch without answering the question ;-)

I'd suggest to convert the binding to yaml format so it is unambiguous
what is supported and what isn't.

-michael


More information about the U-Boot mailing list