Skip to contentSkip to conversation

Add Beelink GS1 Board

PATCH In review Clément Péron 2 participants 16 messages Apr 17, 2019 – May 20, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v3 cover Add Beelink GS1 Board

This serie introduce the Beelink GS1 board with a patch for the reset on Allwinner H6.

The first patch has been submitted but is still not merged. But it's required for this series

Thanks to Jagan Teki most of the Beelink GS1 device-tree is taken from the Orange Pi boards.

Changes with v2:
- Add myself in sunxi MAINTAINERS file
- Update with Jagan Teki's rsync patch
- Change to complete DTS same as linux
- Add linux sha1 to the commit log

Changes with v1:
- Add bus-width for mmc2 node
- Add sha1 in the sync dts commit

Clément Péron (2):
arm: dts: h6: Add Beelink GS1 initial support
arm: sunxi: h6: fix reset using r_wdog

Jagan Teki (1):
arm64: allwinner: sun50i: Sync H6 dts(i) files from Linux

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/sun50i-h6-beelink-gs1.dts        | 260 ++++++++++++
 arch/arm/dts/sun50i-h6-orangepi.dtsi          |  62 ++-
 arch/arm/dts/sun50i-h6-pine-h64.dts           |  88 +++-
 arch/arm/dts/sun50i-h6.dtsi                   | 398 +++++++++++++++++-
 .../include/asm/arch-sunxi/cpu_sun50i_h6.h    |   1 +
 arch/arm/mach-sunxi/board.c                   |   9 +-
 board/sunxi/MAINTAINERS                       |   6 +
 configs/beelink_gs1_defconfig                 |  15 +
 include/dt-bindings/clock/sun8i-tcon-top.h    |  11 +
 10 files changed, 828 insertions(+), 23 deletions(-)
 create mode 100644 arch/arm/dts/sun50i-h6-beelink-gs1.dts
 create mode 100644 configs/beelink_gs1_defconfig
 create mode 100644 include/dt-bindings/clock/sun8i-tcon-top.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/3 arm64: allwinner: sun50i: Sync H6 dts(i) files from Linux

From: Jagan Teki <[email protected]>

Usually the Linux dts changes were synced in specific tags in Allwinner, to keep track for whats been synced so-far and plan for future syncs.

But this patch sync sun50i-h6* dts(i) files from Linux w/o any specific tag since these dts(i) changes are required for new H6 boards support.

Linux commit details about the sun50i-h6* sync:
"arm64: dts: allwinner: h6: move MMC pinctrl to dtsi" (sha1: 6ba2e45d57afdfd982d12f168edd6a79a65075d8)

Linux commit details about the sun8i-tcon-top.h sync:
"dt-bindings: display: sunxi-drm: Add TCON TOP description" (sha1: 59a9c39544cd1e5952c2a33028d71aa8180648f8)

Part of the sync initiated by 'Clément Péron'.

---
 arch/arm/dts/sun50i-h6-orangepi.dtsi       |  62 +++-
 arch/arm/dts/sun50i-h6-pine-h64.dts        |  88 ++++-
 arch/arm/dts/sun50i-h6.dtsi                | 398 ++++++++++++++++++++-
 include/dt-bindings/clock/sun8i-tcon-top.h |  11 +
 4 files changed, 538 insertions(+), 21 deletions(-)
 create mode 100644 include/dt-bindings/clock/sun8i-tcon-top.h
arch/arm/dts/sun50i-h6-orangepi.dtsi +60 -2
index 0612c19cd9..62e27948a3 100644
@@ -21,17 +21,55 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "orangepi:red:power";
+			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+			default-state = "on";
+		};
+
+		status {
+			label = "orangepi:green:status";
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+		};
+	};
+
+	reg_vcc5v: vcc5v {
+		/* board wide 5V supply directly from the DC jack */
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-5v";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&ehci3 {
+	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins>;
 	vmmc-supply = <&reg_cldo1>;
 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
 	bus-width = <4>;
 	status = "okay";
 };
 
+&ohci0 {
+	status = "okay";
+};
+
+&ohci3 {
+	status = "okay";
+};
+
 &r_i2c {
 	status = "okay";
 
@@ -43,6 +81,14 @@
 		interrupt-controller;
 		#interrupt-cells = <1>;
 		x-powers,self-working-mode;
+		vina-supply = <&reg_vcc5v>;
+		vinb-supply = <&reg_vcc5v>;
+		vinc-supply = <&reg_vcc5v>;
+		vind-supply = <&reg_vcc5v>;
+		vine-supply = <&reg_vcc5v>;
+		aldoin-supply = <&reg_vcc5v>;
+		bldoin-supply = <&reg_vcc5v>;
+		cldoin-supply = <&reg_vcc5v>;
 
 		regulators {
 			reg_aldo1: aldo1 {
@@ -148,3 +194,15 @@
 	pinctrl-0 = <&uart0_ph_pins>;
 	status = "okay";
 };
+
+&usb2otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb2phy {
+	usb0_id_det-gpios = <&pio 2 6 GPIO_ACTIVE_HIGH>; /* PC6 */
+	usb0_vbus-supply = <&reg_vcc5v>;
+	usb3_vbus-supply = <&reg_vcc5v>;
+	status = "okay";
+};
arch/arm/dts/sun50i-h6-pine-h64.dts +84 -4

128 lines not on this page · raw message

arch/arm/dts/sun50i-h6.dtsi +383 -15

489 lines not on this page · raw message

include/dt-bindings/clock/sun8i-tcon-top.h new file +11 -0
new file mode 100644
index 0000000000..25164d7678
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/* Copyright (C) 2018 Jernej Skrabec <[email protected]> */
+
+#ifndef _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_
+#define _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_
+
+#define CLK_TCON_TOP_TV0	0
+#define CLK_TCON_TOP_TV1	1
+#define CLK_TCON_TOP_DSI	2
+
+#endif /* _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_ */
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 2/3 arm: dts: h6: Add Beelink GS1 initial support

In reply to Clément Péron

Beelink GS1 is an Allwinner H6 based TV box,
which support:
- Allwinner H6 Quad-core 64-bit ARM Cortex-A53
- GPU Mali-T720
- 2GB LPDDR3 RAM
- 16GB eMMC
- AXP805 PMIC
- 1Gbps GMAC via RTL8211E
- USB 2.0 and 3.0 Host
- HDMI port
- S/PDIF port
- 5V/2A DC power supply
- Wi-Fi/BT via Fn-Link 6222B-SRB (RTL8222BS)

Introduced in Linux with commit :
089bee8dd119 arm64: dts: allwinner: h6: Introduce Beelink GS1 board

---
 arch/arm/dts/Makefile                  |   1 +
 arch/arm/dts/sun50i-h6-beelink-gs1.dts | 260 +++++++++++++++++++++++++
 board/sunxi/MAINTAINERS                |   6 +
 configs/beelink_gs1_defconfig          |  15 ++
 4 files changed, 282 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-h6-beelink-gs1.dts
 create mode 100644 configs/beelink_gs1_defconfig
arch/arm/dts/Makefile +1 -0
index 0aee8dfde0..4bba8b81f8 100644
@@ -469,6 +469,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
 	sun50i-h5-orangepi-prime.dtb \
 	sun50i-h5-orangepi-zero-plus2.dtb
 dtb-$(CONFIG_MACH_SUN50I_H6) += \
+	sun50i-h6-beelink-gs1.dtb \
 	sun50i-h6-orangepi-lite2.dtb \
 	sun50i-h6-orangepi-one-plus.dtb \
 	sun50i-h6-pine-h64.dtb
arch/arm/dts/sun50i-h6-beelink-gs1.dts new file +260 -0

260 lines not on this page · raw message

board/sunxi/MAINTAINERS +6 -0
index 338f374e56..03153f7252 100644
@@ -166,6 +166,12 @@ M:	Jagan Teki <[email protected]>
 S:	Maintained
 F:	configs/bananapi_m64_defconfig
 
+BEELINK GS1
+M:	Clément Péron <[email protected]>
+S:	Maintained
+F:	configs/beelink_gs1_defconfig
+F:	arch/arm/dts/sun50i-h6-beelink-gs1.dts
+
 COLOMBUS BOARD
 M:	Maxime Ripard <[email protected]>
 S:	Maintained
configs/beelink_gs1_defconfig new file +15 -0
new file mode 100644
index 0000000000..ef4dd29549
@@ -0,0 +1,15 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I_H6=y
+CONFIG_MMC0_CD_PIN="PF6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_PSCI_RESET is not set
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-beelink-gs1"
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
Signature · 1 line
2.17.1
#3 lore raw

PATCH v3 2/3 arm: dts: h6: Add Beelink GS1 initial support

Quoted 15 lines · Clément Péron

Beelink GS1 is an Allwinner H6 based TV box,
which support:
- Allwinner H6 Quad-core 64-bit ARM Cortex-A53
- GPU Mali-T720
- 2GB LPDDR3 RAM
- 16GB eMMC
- AXP805 PMIC
- 1Gbps GMAC via RTL8211E
- USB 2.0 and 3.0 Host
- HDMI port
- S/PDIF port
- 5V/2A DC power supply
- Wi-Fi/BT via Fn-Link 6222B-SRB (RTL8222BS)

Quoted 5 lines

Introduced in Linux with commit :
089bee8dd119 arm64: dts: allwinner: h6: Introduce Beelink GS1 board

---

With simple edit on commit message and

Applied to u-boot-sunxi/master

#4 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

In reply to Clément Péron

WDOG is broken for some H6 rev. The board is not
reseted correctly.

Use the R_WDOG instead.

---
 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(-)
arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h +1 -0
index 41a9b0fc47..6392cb07b4 100644
@@ -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
arch/arm/mach-sunxi/board.c +7 -2
index c6dd7b8e54..921e4c5175 100644
@@ -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);
Signature · 1 line
2.17.1
#5 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Hi,

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

Quoted 5 lines · Clément Péron

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

Quoted 43 lines
---
 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(-)
arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h +1 -0
index 41a9b0fc47..6392cb07b4 100644
@@ -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
arch/arm/mach-sunxi/board.c +7 -3
index c6dd7b8e54..921e4c5175 100644
@@ -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

#6 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Quoted 33 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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

Quoted 6 lines

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.

#7 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Hi,

Quoted 35 lines · Jagan Teki
Quoted 33 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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

Quoted 8 lines
Quoted 6 lines

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

#8 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

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

Quoted 51 lines · Clément Péron

Hi,

Quoted 35 lines · Jagan Teki
Quoted 33 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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

Quoted 8 lines
Quoted 6 lines

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

#9 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Hi Jagan,

Is there anything you need to merge this patch?

Thanks,
Clément

Quoted 63 lines · 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

Quoted 51 lines · Clément Péron

Hi,

Quoted 35 lines · Jagan Teki
Quoted 33 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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

Quoted 8 lines
Quoted 6 lines

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

#10 lore raw

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

In reply to Clément Péron
Quoted 42 lines · Clément Péron

Hi,

Quoted 38 lines · Jagan Teki
Quoted 36 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

There is an RFC for watchdog, can you have any change to add reset_cpu via that driver (ofcourse it's a rework)?

#11 lore raw

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

Quoted 44 lines · Jagan Teki
Quoted 42 lines · Clément Péron

Hi,

Quoted 38 lines · Jagan Teki
Quoted 36 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Hi,

Quoted 2 lines

There is an RFC for watchdog, can you have any change to add reset_cpu via that driver (ofcourse it's a rework)?

It's indeed a more proper way but it's a different work. I'm only trying to fix the reboot issue on some H6 boards. Moreover modifying this part will require some testing on different Allwinner boards that I don't have.

Thanks,
Clement

#12 lore raw

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

Quoted 55 lines · Clément Péron
Quoted 44 lines · Jagan Teki
Quoted 42 lines · Clément Péron

Hi,

Quoted 38 lines · Jagan Teki
Quoted 36 lines · Clément Péron

Hi,

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

Quoted 5 lines · Clément Péron

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.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 8 lines

Hi,

Quoted 2 lines

There is an RFC for watchdog, can you have any change to add reset_cpu via that driver (ofcourse it's a rework)?

It's indeed a more proper way but it's a different work. I'm only trying to fix the reboot issue on some H6 boards. Moreover modifying this part will require some testing on different Allwinner boards that I don't have.

True, may be we can plan it for next MW.

#13 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

In reply to Clément Péron
Quoted 5 lines · Clément Péron

WDOG is broken for some H6 rev. The board is not
reseted correctly.

Use the R_WDOG instead.

Can you describe the proper issue why it broken? this would really help us to understand and future reference.

#14 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Hi Jagan,

Quoted 10 lines · Jagan Teki
Quoted 5 lines · Clément Péron

WDOG is broken for some H6 rev. The board is not
reseted correctly.

Use the R_WDOG instead.

Can you describe the proper issue why it broken? this would really help us to understand and future reference.

I would like but I don't have much information on it. If I take the information in my 2nd email is it ok for you ?

Something like this
"
Some H6 boards have a watchdog which didn't make the SoC reboot properly. Reason is still unknown but several people have test it. Chen-Yu Tsai :
Pine H64 = H6 V200-AWIN H6448BA 7782 => OK
OrangePi Lite 2 = H6 V200-AWIN H8068BA 61C2 => KO

Martin Ayotte :
Pine H64 = H8069BA 6892 => OK
OrangePi 3 = HA047BA 69W2 => KO
OrangePi One Plus = H7310BA 6842 => KO
OrangePi Lite2 = 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.

As we don't have the ARIS coproc to do power management and watchdogis the only solution to reset the board.
Change from watchdog to R_watchdog to allow a reboot on all H6 boards. "

Thanks,
Clement

#15 lore raw

PATCH v3 3/3 arm: sunxi: h6: fix reset using r_wdog

Quoted 35 lines · Clément Péron

Hi Jagan,

Quoted 10 lines · Jagan Teki
Quoted 5 lines · Clément Péron

WDOG is broken for some H6 rev. The board is not
reseted correctly.

Use the R_WDOG instead.

Can you describe the proper issue why it broken? this would really help us to understand and future reference.

I would like but I don't have much information on it. If I take the information in my 2nd email is it ok for you ?

Something like this
"
Some H6 boards have a watchdog which didn't make the SoC reboot properly. Reason is still unknown but several people have test it. Chen-Yu Tsai :
Pine H64 = H6 V200-AWIN H6448BA 7782 => OK
OrangePi Lite 2 = H6 V200-AWIN H8068BA 61C2 => KO

Martin Ayotte :
Pine H64 = H8069BA 6892 => OK
OrangePi 3 = HA047BA 69W2 => KO
OrangePi One Plus = H7310BA 6842 => KO
OrangePi Lite2 = H6448BA 6662 => KO

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

Quoted 6 lines

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

As we don't have the ARIS coproc to do power management and watchdogis the only solution to reset the board.
Change from watchdog to R_watchdog to allow a reboot on all H6 boards.

Thanks, included this and

Applied to u-boot-sunxi/master