[PATCH v2] riscv: dts: sophgo: add watchdog dt node for CV1800

Inochi Amaoto inochiama at gmail.com
Wed Nov 18 03:32:50 PST 2026


On Fri, Nov 13, 2026 at 08:47:47PM +0800, Chen-Yu Yeh wrote:
> On Thu, Jan 25, 2024 at 05:46:40PM +0800, AnnanLiu wrote:
> > Add the watchdog device tree node to cv1800 SoC.
> 
> Hi Annan, Inochi,
> 
> This patch was sent before the clock driver was merged, and I could not
> find a newer version on the lists. Mainline and the sophgo for-next
> branch still have no watchdog node for CV18XX/SG200X.
> 
> Annan, are you still working on this? If not, I would like to pick it
> up, with credit to your patch.
> 
> Inochi, before I start, is this plan fine?
> 
>  - Put the node in cv180x.dtsi and leave it enabled, since it does not
>    depend on the board.
>  - Use the clock controller instead of the stub clock. In the TRM clock
>    table, CLK_APB_WDT is the only clock for WDT0-2, fed by xtal without
>    a divider. The counter clock is selected by reg_wdt_clk_sel in
>    top_wdt_ctrl (top syscon, offset 0x1a8, xtal by default). Only the
>    RTC domain watchdog has a separate clk_wdt, in rtcsys_clk_en.
>    Should the node use <&clk CLK_APB_WDT> alone, or &osc as tclk and
>    CLK_APB_WDT as pclk?
>  - Keep the reset (RST_WDT) and the interrupt from this patch. The
>    vendor DT has the same interrupt (58) but no interrupt-parent for
>    it, and the TRM interrupt table names 58 "WatchDog1", so I will
>    check it with the pretimeout test.
>  - Test on a Milk-V Duo 256M (SG2002): timeout reset, pretimeout
>    interrupt and restart.
> 
> Regards,
> Chen-Yu

If you want to take this patch, you need to add all watchdog device
instead of the only one for RISC-V. There are three watchdog devices
for A53/C906 0/C906 1. IIRC only one can take effect at the same
time.

Regards,
Inochi



More information about the linux-riscv mailing list