Hi,

+Chen-Yu Tsai for test and +Icenowy because she try to contact AW
about this issue.

On Wed, 17 Apr 2019 at 19:41, Clément Péron <peron.c...@gmail.com> wrote:
>
> WDOG is broken for some H6 rev. The board is not
> reseted correctly.
>
> Use the R_WDOG instead.

The issue is real except on Pine H64 and Rongpin RP-H6B which seems to
be NOT affected.
Lot of users on OrangePi boards (Lite2 / One Plus and 3) are
complaining about this issue.

We perform a simple watchdog test on different board :

Chen-Yu Tsai :
Pine h64 = H6 V200-AWIN H6448BA 7782 => OK
OrangePi Lite 2 = H6 V200-AWIN H8068BA 61C2 => KO

Martin Ayotte :
PineH64 = H8069BA 6892 => OK
Orange Pi 3 = HA047BA 69W2 => KO
OPiOnePlus = H7310BA 6842 => KO
OPiLite2 = H6448BA 6662 => KO

Clément Péron:
Beelink GS1 = H6 V200-AWIN H7309BA 6842 => KO

After the series of result, Icenowy try to reach Allwinner about this
issue but they seems not interested to investigate it.

I'm not sure if it's an HW errata or if there something misconfigured
but the result is here WDOG doesn't make these boards reboot.
And this should not happens !

As we don't have the ARIS co proc to do power management and watchdog
is the only solution to reset the board for now.
A really simple change from Watchdog to R_Watchdog fix the issue and
has been tested on several boards.
Patch is already applied on Armbian.

Thanks,
Clément

>
> Signed-off-by: Clément Péron <peron.c...@gmail.com>
> ---
>  arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h | 1 +
>  arch/arm/mach-sunxi/board.c                     | 9 +++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h 
> b/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h
> index 41a9b0fc47..6392cb07b4 100644
> --- a/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h
> +++ b/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h
> @@ -60,6 +60,7 @@
>  #define SUNXI_RTC_BASE                 0x07000000
>  #define SUNXI_R_CPUCFG_BASE            0x07000400
>  #define SUNXI_PRCM_BASE                        0x07010000
> +#define SUNXI_R_WDOG_BASE              0x07020400
>  #define SUNXI_R_PIO_BASE               0x07022000
>  #define SUNXI_R_UART_BASE              0x07080000
>  #define SUNXI_R_TWI_BASE               0x07081400
> diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
> index c6dd7b8e54..921e4c5175 100644
> --- a/arch/arm/mach-sunxi/board.c
> +++ b/arch/arm/mach-sunxi/board.c
> @@ -289,9 +289,14 @@ void reset_cpu(ulong addr)
>                 writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
>         }
>  #elif defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)
> +#if defined(CONFIG_MACH_SUN50I_H6)
> +       /* WDOG is broken for some H6 rev. use the R_WDOG instead */
>         static const struct sunxi_wdog *wdog =
> -                ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
> -
> +               (struct sunxi_wdog *)SUNXI_R_WDOG_BASE;
> +#else
> +       static const struct sunxi_wdog *wdog =
> +               ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
> +#endif
>         /* Set the watchdog for its shortest interval (.5s) and wait */
>         writel(WDT_CFG_RESET, &wdog->cfg);
>         writel(WDT_MODE_EN, &wdog->mode);
> --
> 2.17.1
>
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to