T113-S3: reboot fails unless "wdt" node is enabled — safe to set status = "okay"?
Hi all,
I'm working with a board based on the Allwinner T113-S3 and running a recent mainline Linux kernel. I noticed that calling reboot from Linux results in:
Reboot failed -- System halted
After some investigation, I found that the watchdog (wdt: watchdog@20500a0) is marked as status = "reserved" in the mainline device tree.
If I override that node to status = "okay" in my board's .dts file, reboot starts working as expected.
Is there a specific reason why the wdt node is marked "reserved" by default in mainline?
Best regards,
Lukas Schmid
On Sun, 06 Jul 2025 19:32:35 +0200
Lukas Schmid <[email protected]> wrote:
(CC:ing Samuel who probably knows more)
Hi Lukas,
Quoted 5 lines
I'm working with a board based on the Allwinner T113-S3 and running a recent mainline Linux kernel. I noticed that calling
rebootfrom Linux results in:Reboot failed -- System halted
Quoted 8 lines
After some investigation, I found that the watchdog (
wdt: watchdog@20500a0) is marked asstatus = "reserved"in the mainline device tree.If I override that node to
status = "okay"in my board's .dts file, reboot starts working as expected.Is there a specific reason why the
wdtnode is marked"reserved"by default in mainline?
Yes, that is deliberate. The T113s uses the same base devicetree as the D1(s), so we share a number of watchdogs. I cannot remember the details, but I think the idea was to pick the right watchdog for each SoC variant, and dedicate one for firmware.
Consequently we fix this up in U-Boot, see the commit message here:
https://source.denx.de/u-boot/u-boot/-/commit/95168d77d391b1464
So if you just use the DT from U-Boot (by just using $fdtcontroladdr on the bootz command line, instead of loading a DT from some storage), you will get the fix for free.
Cheers,
Andre
Quoted 4 lines · On Montag, 7. Juli 2025 15:02:17 CEST Andre Przywara wrote:
On Sun, 06 Jul 2025 19:32:35 +0200
Lukas Schmid <[email protected]> wrote:(CC:ing Samuel who probably knows more)
Hi Andre,
Quoted 6 lines
Hi Lukas,
Quoted 3 lines
I'm working with a board based on the Allwinner T113-S3 and running a recent>
mainline Linux kernel. I noticed that callingrebootfrom Linux results
in:
Quoted 19 lines
Quoted 11 lines
Reboot failed -- System halted
After some investigation, I found that the watchdog (`wdt:
watchdog@20500a0) is marked asstatus = "reserved"` in the mainline device tree.If I override that node to
status = "okay"in my board's .dts file, reboot starts working as expected.Is there a specific reason why the
wdtnode is marked"reserved"by default in mainline?Yes, that is deliberate. The T113s uses the same base devicetree as the D1(s), so we share a number of watchdogs. I cannot remember the details, but I think the idea was to pick the right watchdog for each SoC variant, and dedicate one for firmware.
Consequently we fix this up in U-Boot, see the commit message here:
https://source.denx.de/u-boot/u-boot/-/commit/95168d77d391b1464
Quoted 3 lines
So if you just use the DT from U-Boot (by just using $fdtcontroladdr on the bootz command line, instead of loading a DT from some storage), you will get the fix for free.
So if I need to load the dtb from storage (because I have different trees for my carrier boards) I need to patch the device tree specifically for my devices? Or have a custom U-Boot built for each carrier board instead of the SoM?
Would it be possible for me to enable the watchdog in my SoM's dt as I do not intend to have the RISC-V variant on my SoM due to the missing CAN interfaces?
Best regards,
Lukas
Quoted 3 lines
Cheers,
Andre
On Mon, 07 Jul 2025 15:08:04 +0200
Lukas Schmid <[email protected]> wrote:
Hi Lukas,
Quoted 34 lines · On Montag, 7. Juli 2025 15:02:17 CEST Andre Przywara wrote:
Quoted 4 lines
On Sun, 06 Jul 2025 19:32:35 +0200
Lukas Schmid <[email protected]> wrote:(CC:ing Samuel who probably knows more)
Hi Andre,
Quoted 6 lines
Hi Lukas,
Quoted 3 lines
I'm working with a board based on the Allwinner T113-S3 and running a recent>
mainline Linux kernel. I noticed that callingrebootfrom Linux resultsin:
Quoted 19 lines
Quoted 11 lines
Reboot failed -- System halted
After some investigation, I found that the watchdog (`wdt:
watchdog@20500a0) is marked asstatus = "reserved"` in the mainline device tree.If I override that node to
status = "okay"in my board's .dts file, reboot starts working as expected.Is there a specific reason why the
wdtnode is marked"reserved"by default in mainline?Yes, that is deliberate. The T113s uses the same base devicetree as the D1(s), so we share a number of watchdogs. I cannot remember the details, but I think the idea was to pick the right watchdog for each SoC variant, and dedicate one for firmware.
Consequently we fix this up in U-Boot, see the commit message here:
https://source.denx.de/u-boot/u-boot/-/commit/95168d77d391b1464
Quoted 6 lines
Quoted 3 lines
So if you just use the DT from U-Boot (by just using $fdtcontroladdr on the bootz command line, instead of loading a DT from some storage), you will get the fix for free.
So if I need to load the dtb from storage (because I have different trees for my carrier boards) I need to patch the device tree specifically for my devices?
Conceptually there is one devicetree for any particular board. You upstream that to the kernel, then it will be picked up automatically, into the U-Boot tree.
Even if it's not upstream, you can just copy your DTs into dts/upstream/src/arm/allwinner, to get the same effect.
Quoted 1 line
Or have a custom U-Boot built for each carrier board instead of the SoM?
Traditionally we build U-Boot for one particular *board*, not a SoM. That the board DT then includes a shared SoM .dtsi is just an implementation detail.
Alternatively you can implement board auto-detection in U-Boot: either by including all possible .dtb files in the FIT image, and pick the right one in the SPL (like we do for the original Pine64 board, check CONFIG_PINE64_DT_SELECTION), or by manually patching the DTB already in memory, see U-Boot commit a4fc1e3e27fb0956.
Quoted 2 lines
Would it be possible for me to enable the watchdog in my SoM's dt as I do not intend to have the RISC-V variant on my SoM due to the missing CAN interfaces?
Well, I proposed that back then: to enable it in Arm specific .dtsi, but Samuel denied that, and asked for firmware to set this up. I cannot quickly find that conversation in the archives, and don't remember the exact details, but it was convincing enough for me back then to deploy the U-Boot solution ;-)
Cheers,
Andre.