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

Chen-Yu Yeh chenyou910331 at gmail.com
Fri Nov 13 04:47:47 PST 2026


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



More information about the linux-riscv mailing list