回复: [PATCH v2 2/5] arm: dts: imx: Update watchdog nodes for dynamic base address lookup
Alice Guo (OSS)
alice.guo at oss.nxp.com
Wed Apr 22 05:48:59 CEST 2026
> -----邮件原件-----
> 发件人: Stefan Roese <stefan.roese at mailbox.org>
> 发送时间: 2026年4月21日 22:10
> 收件人: Alice Guo (OSS) <alice.guo at oss.nxp.com>; dl-uboot-imx
> <uboot-imx at nxp.com>; u-boot at lists.denx.de; Christoph Stoidner
> <c.stoidner at phytec.de>; upstream at lists.phytec.de
> 抄送: Stefano Babic <sbabic at nabladev.com>; Fabio Estevam
> <festevam at gmail.com>; Tom Rini <trini at konsulko.com>; Peng Fan
> <peng.fan at nxp.com>; Ye Li <ye.li at nxp.com>; Simon Glass
> <sjg at chromium.org>; Ross, Fedor <fedor.ross at ifm.com>; Sébastien Szymanski
> <sebastien.szymanski at armadeus.com>; João Paulo Gonçalves
> <joao.goncalves at toradex.com>; Primoz Fiser <primoz.fiser at norik.com>;
> Frieder Schrempf <frieder.schrempf at kontron.de>; Jérémie Dautheribes
> (Schneider Electric) <jeremie.dautheribes at bootlin.com>; Jacky Bai
> <ping.bai at nxp.com>; Francesco Dolcini <francesco.dolcini at toradex.com>;
> Mathieu Othacehe <m.othacehe at gmail.com>; Lukasz Majewski
> <lukma at denx.de>; Ernest Van Hoecke <ernest.vanhoecke at toradex.com>;
> Emanuele Ghidoli <emanuele.ghidoli at toradex.com>; Max Krummenacher
> <max.krummenacher at toradex.com>; Wadim Egorov <w.egorov at phytec.de>;
> Sumit Garg <sumit.garg at oss.qualcomm.com>; tharvey at gateworks.com;
> Anshul Dalal <anshuld at ti.com>; Franz Schnyder
> <franz.schnyder at toradex.com>; Sam Protsenko
> <semen.protsenko at linaro.org>; Joseph Guo <qijian.guo at nxp.com>; Ji Luo
> <ji.luo at nxp.com>; Marek Vasut <marex at nabladev.com>; Alice Guo
> <alice.guo at nxp.com>
> 主题: Re: [PATCH v2 2/5] arm: dts: imx: Update watchdog nodes for dynamic
> base address lookup
>
> On 4/21/26 16:01, alice.guo at oss.nxp.com wrote:
> > From: Alice Guo <alice.guo at nxp.com>
> >
> > Update watchdog device tree nodes to enable dynamic base address
> > retrieval for i.MX7ULP, i.MX8ULP, i.MX91, i.MX93, i.MX943, i.MX95 and
> > i.MX952. This allows the bootloader to obtain watchdog base addresses
> > from the device tree instead of using hardcoded values.
> >
> > - imx7ulp: Add wdog2 node
> > - imx8ulp: Mark wdog3 available
> > - imx91/imx93: Add wdog4 and wdog5 nodes
> > Mark wdog3/wdog4/wdog5 available
> > - imx943: Add wdog4 node and mark wdog3/wdog4 available
> > - imx95/imx952: Add wdog4 node and mark wdog3/wdog4 available
> >
> > Watchdog nodes are marked with "bootph-all" to ensure availability
> > during early boot stages when init_wdog() occurs.
> >
> > Signed-off-by: Alice Guo <alice.guo at nxp.com>
> > ---
> > arch/arm/dts/imx7ulp.dtsi | 6 ++++++
> > arch/arm/dts/imx8ulp-u-boot.dtsi | 4 ++++
> > arch/arm/dts/imx91-u-boot.dtsi | 12 ++++++++++++
> > arch/arm/dts/imx93-u-boot.dtsi | 12 ++++++++++++
> > arch/arm/dts/imx93.dtsi | 18 ++++++++++++++++++
> > arch/arm/dts/imx943-u-boot.dtsi | 16 ++++++++++++++++
> > arch/arm/dts/imx95-u-boot.dtsi | 14 ++++++++++++++
> > arch/arm/dts/imx952-u-boot.dtsi | 14 ++++++++++++++
> > 8 files changed, 96 insertions(+)
> >
> > diff --git a/arch/arm/dts/imx7ulp.dtsi b/arch/arm/dts/imx7ulp.dtsi
> > index bcec98b9641..45a69f06e20 100644
> > --- a/arch/arm/dts/imx7ulp.dtsi
> > +++ b/arch/arm/dts/imx7ulp.dtsi
> > @@ -295,6 +295,12 @@
> > clock-names = "divcore", "hsrun_divcore";
> > };
> >
> > + wdog2: watchdog at 40430000 {
> > + compatible = "fsl,imx7ulp-wdt";
> > + reg = <0x40430000 0x10000>;
> > + timeout-sec = <40>;
> > + };
> > +
> > pcc3: clock-controller at 40b30000 {
> > compatible = "fsl,imx7ulp-pcc3";
> > reg = <0x40b30000 0x10000>;
> > diff --git a/arch/arm/dts/imx8ulp-u-boot.dtsi
> > b/arch/arm/dts/imx8ulp-u-boot.dtsi
> > index 30baaeff8ef..54ecbcf1795 100644
> > --- a/arch/arm/dts/imx8ulp-u-boot.dtsi
> > +++ b/arch/arm/dts/imx8ulp-u-boot.dtsi
> > @@ -61,3 +61,7 @@
> > };
> > };
> > #endif
> > +
> > +&wdog3 {
> > + bootph-all;
> > +};
> > diff --git a/arch/arm/dts/imx91-u-boot.dtsi
> > b/arch/arm/dts/imx91-u-boot.dtsi index 5b639c965d6..149f7bc685a 100644
> > --- a/arch/arm/dts/imx91-u-boot.dtsi
> > +++ b/arch/arm/dts/imx91-u-boot.dtsi
> > @@ -90,3 +90,15 @@
> > };
> > };
> > };
> > +
> > +&wdog3 {
> > + bootph-all;
> > +};
> > +
> > +&wdog4 {
> > + bootph-all;
> > +};
> > +
> > +&wdog5 {
> > + bootph-all;
> > +};
> > diff --git a/arch/arm/dts/imx93-u-boot.dtsi
> > b/arch/arm/dts/imx93-u-boot.dtsi index dc86746ac90..a84cdf2bc45 100644
> > --- a/arch/arm/dts/imx93-u-boot.dtsi
> > +++ b/arch/arm/dts/imx93-u-boot.dtsi
> > @@ -96,3 +96,15 @@
> > 0x000001b2 0x800001b6>;
> > #thermal-sensor-cells = <1>;
> > };
> > +
> > +&wdog3 {
> > + bootph-all;
> > +};
> > +
> > +&wdog4 {
> > + bootph-all;
> > +};
> > +
> > +&wdog5 {
> > + bootph-all;
> > +};
> > diff --git a/arch/arm/dts/imx93.dtsi b/arch/arm/dts/imx93.dtsi index
> > d6964714ea0..511e9594e37 100644
> > --- a/arch/arm/dts/imx93.dtsi
> > +++ b/arch/arm/dts/imx93.dtsi
> > @@ -414,6 +414,24 @@
> > timeout-sec = <40>;
> > };
> >
> > + wdog4: watchdog at 424a0000 {
> > + compatible = "fsl,imx93-wdt";
> > + reg = <0x424a0000 0x10000>;
> > + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&clk IMX93_CLK_WDOG4_GATE>;
> > + timeout-sec = <40>;
> > + status = "disabled";
> > + };
> > +
> > + wdog5: watchdog at 424b0000 {
> > + compatible = "fsl,imx93-wdt";
> > + reg = <0x424b0000 0x10000>;
> > + interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&clk IMX93_CLK_WDOG5_GATE>;
> > + timeout-sec = <40>;
> > + status = "disabled";
> > + };
> > +
> > tpm3: pwm at 424e0000 {
> > compatible = "fsl,imx7ulp-pwm";
> > reg = <0x424e0000 0x1000>;
> > diff --git a/arch/arm/dts/imx943-u-boot.dtsi
> > b/arch/arm/dts/imx943-u-boot.dtsi index 3457442a3b0..fca0f10c865
> > 100644
> > --- a/arch/arm/dts/imx943-u-boot.dtsi
> > +++ b/arch/arm/dts/imx943-u-boot.dtsi
> > @@ -159,6 +159,18 @@
> > };
> > };
> >
> > +&aips4 {
> > + bootph-all;
> > +
> > + wdog4: watchdog at 49230000 {
> > + bootph-all;
> > +
> > + compatible = "fsl,imx94-wdt", "fsl,imx93-wdt";
> > + reg = <0x49230000 0x10000>;
> > + status = "disabled";
> > + };
> > +};
> > +
> > &clk_ext1 {
> > bootph-all;
> > };
> > @@ -460,3 +472,7 @@
> > &sram0 {
> > bootph-all;
> > };
> > +
> > +&wdog3 {
> > + bootph-all;
> > +};
> > diff --git a/arch/arm/dts/imx95-u-boot.dtsi
> > b/arch/arm/dts/imx95-u-boot.dtsi index 6dec159752b..2fdb7e331b6 100644
> > --- a/arch/arm/dts/imx95-u-boot.dtsi
> > +++ b/arch/arm/dts/imx95-u-boot.dtsi
> > @@ -138,6 +138,16 @@
> >
> > &aips2 {
> > bootph-all;
> > +
> > + wdog4: watchdog at 424a0000 {
> > + bootph-all;
> > +
> > + compatible = "fsl,imx93-wdt";
> > + reg = <0x424a0000 0x10000>;
> > + clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
> > + timeout-sec = <40>;
> > + status = "disabled";
>
> I understand why "bootph-all" is in the u-boot special file. But the other main
> properties defining the watchdog device should be in the common dts(i) file, no?
>
> Checking mainline kernel I see, that "bootph-all" is used there as well.
> It seems to be accepted. So why not move everything into the common dts/dtsi
> files instead?
>
> Thanks,
> Stefan
>
Hi Stefan,
For platforms with CONFIG_OF_UPSTREAM enabled, the DTS/DTSI files come directly from the upstream kernel tree and should not be modified in U-Boot, so the watchdog node is added in the corresponding xxx-u-boot.dtsi.
For platforms without CONFIG_OF_UPSTREAM, the DTS/DTSI files are maintained locally in U-Boot, and the watchdog node is added directly to xxx.dtsi.
Thanks,
Alice
More information about the U-Boot
mailing list