On 23.03.25 12:35, Andre Przywara wrote:
The Allwinner A523 SoC moved the watchdog into a separate MMIO frame,
and also shifted the registers a bit: the control, config, and mode
register are located four bytes earlier.

Add the new compatible string, and connect it to the new struct
describing the new register layout.

Signed-off-by: Andre Przywara <andre.przyw...@arm.com>

Reviewed-by: Stefan Roese <s...@denx.de>

Thanks,
Stefan

---
  drivers/watchdog/sunxi_wdt.c | 11 +++++++++++
  1 file changed, 11 insertions(+)

diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 8eeac935760..467db5fe9bf 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -153,10 +153,21 @@ static const struct sunxi_wdt_reg sun20i_wdt_reg = {
        .wdt_key_val            = 0x16aa0000,
  };
+static const struct sunxi_wdt_reg sun55i_wdt_reg = {
+       .wdt_ctrl               = 0x0c,
+       .wdt_cfg                = 0x10,
+       .wdt_mode               = 0x14,
+       .wdt_timeout_shift      = 4,
+       .wdt_reset_mask         = 0x03,
+       .wdt_reset_val          = 0x01,
+       .wdt_key_val            = 0x16aa0000,
+};
+
  static const struct udevice_id sunxi_wdt_ids[] = {
        { .compatible = "allwinner,sun4i-a10-wdt", .data = 
(ulong)&sun4i_wdt_reg },
        { .compatible = "allwinner,sun6i-a31-wdt", .data = 
(ulong)&sun6i_wdt_reg },
        { .compatible = "allwinner,sun20i-d1-wdt", .data = 
(ulong)&sun20i_wdt_reg },
+       { .compatible = "allwinner,sun55i-a523-wdt", .data = 
(ulong)&sun55i_wdt_reg },
        { /* sentinel */ }
  };

Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de

Reply via email to