lib: utils/reset: Add Andes fdt reset driver support
authorYu Chien Peter Lin <peterlin@andestech.com>
Fri, 14 Oct 2022 00:32:47 +0000 (08:32 +0800)
committerAnup Patel <anup@brainfault.org>
Sun, 23 Oct 2022 04:59:23 +0000 (10:29 +0530)
commit8234fc1bdf4629fc0fec41ebc2e091c407ef8d6a
tree99b85e606ba6d59473b4d6a60037e69e8618b1a9
parentef9f02e7fba47412d6c057ba78fd3d89cb4e5fc3
lib: utils/reset: Add Andes fdt reset driver support

Add ATCWDT200 as reset device of AE350 platform, this driver requires
SMU to program the reset vector registers before triggering WDT software
restart signal.

dts example:

  smu@f0100000 {
    compatible = "andestech,atcsmu";
    reg = <0x00000000 0xf0100000 0x00000000 0x00001000>;
  };

  wdt: wdt@f0500000 {
    compatible = "andestech,atcwdt200";
    reg = <0x00000000 0xf0500000 0x00000000 0x00001000>;
    interrupts = <3 4>;
    interrupt-parent = <&plic0>;
    clock-frequency = <15000000>;
  };

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/utils/reset/Kconfig
lib/utils/reset/fdt_reset_atcwdt200.c [new file with mode: 0644]
lib/utils/reset/objects.mk
platform/andes/ae350/Kconfig
platform/andes/ae350/platform.c