Re: [U-Boot] [PATCH v3 3/3] arm: sunxi: h6: fix reset using r_wdog

2019-05-12 Thread Clément Péron
Hi Jagan,

Is there anything you need to merge this patch?

Thanks,
Clément


On Mon, 29 Apr 2019 at 22:28, Clément Péron  wrote:
>
> Hi Jagan,
>
> FYI the patch on ATF has been merged just now. It has been tested by
> André Przywara on A64, H5 and H6.
>
> https://github.com/ARM-software/arm-trusted-firmware/commit/523ab5be1a84e9aa15fb62c3a15a6338b01d3961
>
> Thanks,
> Clement
>
> On Fri, 19 Apr 2019 at 11:19, Clément Péron  wrote:
> >
> > Hi,
> >
> > On Fri, 19 Apr 2019 at 10:24, Jagan Teki  wrote:
> > >
> > > On Fri, Apr 19, 2019 at 1:23 PM Clément Péron  
> > > wrote:
> > > >
> > > > 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  
> > > > 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 !
> > >
> > > How about Linux? same issue.
> > Yes, Linux use PSCI, call ATF and we have the same issue as ATF use
> > the watchdog to reboot.
> >
> > Clement
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] arm: sunxi: h6: fix reset using r_wdog

2019-04-29 Thread Clément Péron
Hi Jagan,

FYI the patch on ATF has been merged just now. It has been tested by
André Przywara on A64, H5 and H6.

https://github.com/ARM-software/arm-trusted-firmware/commit/523ab5be1a84e9aa15fb62c3a15a6338b01d3961

Thanks,
Clement

On Fri, 19 Apr 2019 at 11:19, Clément Péron  wrote:
>
> Hi,
>
> On Fri, 19 Apr 2019 at 10:24, Jagan Teki  wrote:
> >
> > On Fri, Apr 19, 2019 at 1:23 PM Clément Péron  wrote:
> > >
> > > 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  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 !
> >
> > How about Linux? same issue.
> Yes, Linux use PSCI, call ATF and we have the same issue as ATF use
> the watchdog to reboot.
>
> Clement
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] arm: sunxi: h6: fix reset using r_wdog

2019-04-19 Thread Clément Péron
Hi,

On Fri, 19 Apr 2019 at 10:24, Jagan Teki  wrote:
>
> On Fri, Apr 19, 2019 at 1:23 PM Clément Péron  wrote:
> >
> > 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  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 !
>
> How about Linux? same issue.
Yes, Linux use PSCI, call ATF and we have the same issue as ATF use
the watchdog to reboot.

Clement
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] arm: sunxi: h6: fix reset using r_wdog

2019-04-19 Thread Jagan Teki
On Fri, Apr 19, 2019 at 1:23 PM Clément Péron  wrote:
>
> 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  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 !

How about Linux? same issue.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/3] arm: sunxi: h6: fix reset using r_wdog

2019-04-19 Thread Clément Péron
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  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 
> ---
>  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 0x0700
>  #define SUNXI_R_CPUCFG_BASE0x07000400
>  #define SUNXI_PRCM_BASE0x0701
> +#define SUNXI_R_WDOG_BASE  0x07020400
>  #define SUNXI_R_PIO_BASE   0x07022000
>  #define SUNXI_R_UART_BASE  0x0708
>  #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, >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, >cfg);
> writel(WDT_MODE_EN, >mode);
> --
> 2.17.1
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot