@@ -65,7 +65,7 @@
};
chosen {
- bootargs = "console=ttyS0,115200";
+ bootargs = "console=ttyS0,115200 reboot=warm";
};
lx_clk: lx_clk {
@@ -153,6 +153,20 @@
status = "disabled";
};
+ watchdog: watchdog@3150 {
+ compatible = "realtek,rtl8380-wdt";
+ reg = <0x3150 0xc>;
+
+ realtek,reset-mode = "cpu";
+
+ clocks = <&lx_clk>;
+ timeout-sec = <30>;
+
+ interrupt-parent = <&intc>;
+ interrupt-names = "phase1", "phase2";
+ interrupts = <19>, <18>;
+ };
+
gpio0: gpio-controller@3500 {
compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
reg = <0x3500 0x20>;
@@ -162,6 +162,20 @@
status = "disabled";
};
+ watchdog0: watchdog@3260 {
+ compatible = "realtek,rtl9300-wdt";
+ reg = <0x3260 0xc>;
+
+ realtek,reset-mode = "soc";
+
+ clock = <&osc 0>;
+ timeout-sec = <30>;
+
+ interrupt-parent = <&intc>;
+ interrupt-names = "phase1", "phase2";
+ interrupts = <5>, <6>;
+ };
+
gpio0: gpio-controller@3500 {
compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
reg = <0x3500 0x20>;
Add and enable the Realtek Otto WDT peripheral found on these SoCs. Devices that require the PLL value fixup before restarting, should pick the "cpu" or "software" reset mode. These devices also need to provide a custom reboot mode, by adding the reboot argument to the kernel command line: WDT reset mode | kernel reboot mode ----------------+--------------------------------------- soc | reboot=cold (default if not specified) cpu | reboot=warm software | reboot=software Since RTL838x can only perform cold reboots reliably on selected devices, default this platform to use reboot=warm and "cpu" reset. RTL930x devices have more reliable reset logic, and can use the default (cold) reboot and "soc" resets. Note that watchdog restarts are not yet exposed, since the _machine_restart override is still present. Signed-off-by: Sander Vanheule <sander@svanheule.net> --- target/linux/realtek/dts-5.10/rtl838x.dtsi | 16 +++++++++++++++- target/linux/realtek/dts-5.10/rtl930x.dtsi | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-)