Skip to contentSkip to conversation

mips: bmips: add bcm6345 watchdog support

PATCH Superseded Álvaro Fernández Rojas 3 participants 27 messages May 12, 2017 – May 20, 2017

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

cover mips: bmips: add bcm6345 watchdog support

Adds support for Broadcom MIPS BCM6345 watchdog controller.
Also adds a generic watchdog sysreset driver to allow rebooting by expiring the SoC watchdog.
This is needed for some specific Broadcom MIPS SoCs where pll_conf if bugged and it can't be used to perform SoC reboots, like in BCM6348 (a1 rev).

Álvaro Fernández Rojas (8):
dm: watchdog: add BCM6345 watchdog driver
mips: bmips: add bcm6345-wdt driver support for BCM6358
mips: bmips: add bcm6345-wdt driver support for BCM6328
mips: bmips: add bcm6345-wdt driver support for BCM63268
dm: sysreset: add watchdog-reboot driver
mips: bmips: add wdt-reboot driver support for BCM6358
mips: bmips: add wdt-reboot driver support for BCM6328
mips: bmips: add wdt-reboot driver support for BCM63268

 arch/mips/dts/brcm,bcm63268.dtsi     |  11 ++++
 arch/mips/dts/brcm,bcm6328.dtsi      |  11 ++++
 arch/mips/dts/brcm,bcm6358.dtsi      |  11 ++++
 drivers/sysreset/Kconfig             |   6 ++
 drivers/sysreset/Makefile            |   1 +
 drivers/sysreset/sysreset_watchdog.c |  57 ++++++++++++++++++
 drivers/watchdog/Kconfig             |   8 +++
 drivers/watchdog/Makefile            |   1 +
 drivers/watchdog/bcm6345_wdt.c       | 109 +++++++++++++++++++++++++++++++++++
 9 files changed, 215 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c
 create mode 100644 drivers/watchdog/bcm6345_wdt.c
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/8 dm: watchdog: add BCM6345 watchdog driver

This driver is a simplified version of linux/drivers/watchdog/bcm63xx_wdt.c

---
 drivers/watchdog/Kconfig       |   8 +++
 drivers/watchdog/Makefile      |   1 +
 drivers/watchdog/bcm6345_wdt.c | 109 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+)
 create mode 100644 drivers/watchdog/bcm6345_wdt.c
drivers/watchdog/Kconfig +8 -0
index bdaf5d4..8d56af7 100644
@@ -46,4 +46,12 @@ config WDT_ASPEED
 	  It currently does not support Boot Flash Addressing Mode Detection or
 	  Second Boot.
 
+config WDT_BCM6345
+	bool "BCM6345 watchdog timer support"
+	depends on WDT && ARCH_BMIPS
+	help
+	  Select this to enable watchdog timer for BCM6345 SoCs.
+	  The watchdog timer is stopped when initialized.
+	  It performs full SoC reset.
+
 endmenu
drivers/watchdog/Makefile +1 -0
index 8378601..4b19e4c 100644
@@ -18,4 +18,5 @@ obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o
 obj-$(CONFIG_WDT) += wdt-uclass.o
 obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
 obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
+obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o
 obj-$(CONFIG_BCM2835_WDT)       += bcm2835_wdt.o
drivers/watchdog/bcm6345_wdt.c new file +110 -0

110 lines not on this page · raw message

Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/8 dm: watchdog: add BCM6345 watchdog driver

Quoted 10 lines · Álvaro Fernández Rojas

This driver is a simplified version of linux/drivers/watchdog/bcm63xx_wdt.c

---
 drivers/watchdog/Kconfig       |   8 +++
 drivers/watchdog/Makefile      |   1 +
 drivers/watchdog/bcm6345_wdt.c | 109 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+)
 create mode 100644 drivers/watchdog/bcm6345_wdt.c
#3 lore raw

PATCH 2/8 mips: bmips: add bcm6345-wdt driver support for BCM6358

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
 arch/mips/dts/brcm,bcm6358.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm6358.dtsi +6 -0
index 0dad998..5d8399c 100644
@@ -87,6 +87,12 @@
 			#reset-cells = <1>;
 		};
 
+		wdt: watchdog at fffe005c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0xfffe005c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio1: gpio-controller at fffe0080 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
Signature · 1 line
2.1.4
#5 lore raw

PATCH 3/8 mips: bmips: add bcm6345-wdt driver support for BCM6328

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
 arch/mips/dts/brcm,bcm6328.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm6328.dtsi +6 -0
index 3926885..36dd8bc 100644
@@ -78,6 +78,12 @@
 			mask = <0x1>;
 		};
 
+		wdt: watchdog at 1000005c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x1000005c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio: gpio-controller at 10000084 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
Signature · 1 line
2.1.4
#7 lore raw

PATCH 4/8 mips: bmips: add bcm6345-wdt driver support for BCM63268

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
 arch/mips/dts/brcm,bcm63268.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm63268.dtsi +6 -0
index b03763f..a3b7e73 100644
@@ -84,6 +84,12 @@
 			#reset-cells = <1>;
 		};
 
+		wdt: watchdog at 1000009c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x1000009c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio1: gpio-controller at 100000c0 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
Signature · 1 line
2.1.4
#9 lore raw

PATCH 5/8 dm: sysreset: add watchdog-reboot driver

In reply to Álvaro Fernández Rojas

Add a new sysreset driver that uses the recently added watchdog support. It performs a full SoC reset by calling wdt_expire_now op.

---
 drivers/sysreset/Kconfig             |  6 ++++
 drivers/sysreset/Makefile            |  1 +
 drivers/sysreset/sysreset_watchdog.c | 57 ++++++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c
drivers/sysreset/Kconfig +6 -0
index b2f7464..a6d48e8 100644
@@ -31,4 +31,10 @@ config SYSRESET_SYSCON
 	help
 	  Reboot support for generic SYSCON mapped register reset.
 
+config SYSRESET_WATCHDOG
+	bool "Enable support for watchdog reboot driver"
+	select WDT
+	help
+	  Reboot support for generic watchdog reset.
+
 endmenu
drivers/sysreset/Makefile +1 -0
index bd352e7..b683811 100644
@@ -7,6 +7,7 @@
 obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
+obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
drivers/sysreset/sysreset_watchdog.c new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.1.4
#10 lore raw

PATCH 5/8 dm: sysreset: add watchdog-reboot driver

Quoted 11 lines · Álvaro Fernández Rojas

Add a new sysreset driver that uses the recently added watchdog support. It performs a full SoC reset by calling wdt_expire_now op.

---
 drivers/sysreset/Kconfig             |  6 ++++
 drivers/sysreset/Makefile            |  1 +
 drivers/sysreset/sysreset_watchdog.c | 57 ++++++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c

Please see below.

Quoted 44 lines
drivers/sysreset/Kconfig +6 -0
index b2f7464..a6d48e8 100644
@@ -31,4 +31,10 @@ config SYSRESET_SYSCON
        help
          Reboot support for generic SYSCON mapped register reset.
 
+config SYSRESET_WATCHDOG
+       bool "Enable support for watchdog reboot driver"
+       select WDT
+       help
+         Reboot support for generic watchdog reset.
+
 endmenu
drivers/sysreset/Makefile +1 -0
index bd352e7..b683811 100644
@@ -7,6 +7,7 @@
 obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
+obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
drivers/sysreset/sysreset_watchdog.c new file +11 -0
new file mode 100644
index 0000000..caeb039
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <sysreset.h>
+#include <wdt.h>

drivers/sysreset/sysreset_watchdog.c line 21

Quoted 10 lines
drivers/sysreset/sysreset_watchdog.c new file +10 -0
+
+struct wdt_reboot_priv {
+       struct udevice *wdt;
+};
+
+static int wdt_reboot_request(struct udevice *dev, enum sysreset_t type)
+{
+       struct wdt_reboot_priv *priv = dev_get_priv(dev);
+
+       wdt_expire_now(priv->wdt, 0);

Missing error check?

Quoted 39 lines
drivers/sysreset/sysreset_watchdog.c new file +36 -1
+
+       return -EINPROGRESS;
+}
+
+static struct sysreset_ops wdt_reboot_ops = {
+       .request = wdt_reboot_request,
+};
+
+int wdt_reboot_probe(struct udevice *dev)
+{
+       struct wdt_reboot_priv *priv = dev_get_priv(dev);
+       int err;
+
+       err = uclass_get_device_by_phandle(UCLASS_WDT, dev,
+                                          "wdt", &priv->wdt);
+       if (err) {
+               error("unable to find wdt device\n");
+               return err;
+       }
+
+       return 0;
+}
+
+static const struct udevice_id wdt_reboot_ids[] = {
+       { .compatible = "wdt-reboot" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(wdt_reboot) = {
+       .name = "wdt_reboot",
+       .id = UCLASS_SYSRESET,
+       .of_match = wdt_reboot_ids,
+       .ops = &wdt_reboot_ops,
+       .priv_auto_alloc_size = sizeof(struct wdt_reboot_priv),
+       .probe = wdt_reboot_probe,
+};
--

2.1.4

#11 lore raw

PATCH 6/8 mips: bmips: add wdt-reboot driver support for BCM6358

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
 arch/mips/dts/brcm,bcm6358.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm6358.dtsi +5 -0
index 5d8399c..4f63cf8 100644
@@ -93,6 +93,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio1: gpio-controller at fffe0080 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
Signature · 1 line
2.1.4
#13 lore raw

PATCH 7/8 mips: bmips: add wdt-reboot driver support for BCM6328

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
 arch/mips/dts/brcm,bcm6328.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm6328.dtsi +5 -0
index 36dd8bc..a996075 100644
@@ -84,6 +84,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio: gpio-controller at 10000084 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
Signature · 1 line
2.1.4
#15 lore raw

PATCH 8/8 mips: bmips: add wdt-reboot driver support for BCM63268

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
 arch/mips/dts/brcm,bcm63268.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm63268.dtsi +5 -0
index a3b7e73..113a96b 100644
@@ -90,6 +90,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio1: gpio-controller at 100000c0 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
Signature · 1 line
2.1.4
#17 lore raw

v2 cover mips: bmips: add bcm6345 watchdog support

In reply to Álvaro Fernández Rojas

Adds support for Broadcom MIPS BCM6345 watchdog controller.
Also adds a generic watchdog sysreset driver to allow rebooting by expiring the SoC watchdog.
This is needed for some specific Broadcom MIPS SoCs where pll_conf if bugged and it can't be used to perform SoC reboots, like in BCM6348 (a1 rev).

v2: add changes requested by Simon Glass.

Álvaro Fernández Rojas (8):
dm: watchdog: add BCM6345 watchdog driver
mips: bmips: add bcm6345-wdt driver support for BCM6358
mips: bmips: add bcm6345-wdt driver support for BCM6328
mips: bmips: add bcm6345-wdt driver support for BCM63268
dm: sysreset: add watchdog-reboot driver
mips: bmips: add wdt-reboot driver support for BCM6358
mips: bmips: add wdt-reboot driver support for BCM6328
mips: bmips: add wdt-reboot driver support for BCM63268

 arch/mips/dts/brcm,bcm63268.dtsi     |  11 ++++
 arch/mips/dts/brcm,bcm6328.dtsi      |  11 ++++
 arch/mips/dts/brcm,bcm6358.dtsi      |  11 ++++
 drivers/sysreset/Kconfig             |   6 ++
 drivers/sysreset/Makefile            |   1 +
 drivers/sysreset/sysreset_watchdog.c |  60 +++++++++++++++++++
 drivers/watchdog/Kconfig             |   8 +++
 drivers/watchdog/Makefile            |   1 +
 drivers/watchdog/bcm6345_wdt.c       | 110 +++++++++++++++++++++++++++++++++++
 9 files changed, 219 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c
 create mode 100644 drivers/watchdog/bcm6345_wdt.c
Signature · 1 line
2.1.4
#18 lore raw

PATCH v2 1/8 dm: watchdog: add BCM6345 watchdog driver

This driver is a simplified version of linux/drivers/watchdog/bcm63xx_wdt.c

---
v2: no changes.

 drivers/watchdog/Kconfig       |   8 +++
 drivers/watchdog/Makefile      |   1 +
 drivers/watchdog/bcm6345_wdt.c | 110 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 119 insertions(+)
 create mode 100644 drivers/watchdog/bcm6345_wdt.c
drivers/watchdog/Kconfig +8 -0
index 22a7c4f..b911233 100644
@@ -54,4 +54,12 @@ config WDT_ASPEED
 	  It currently does not support Boot Flash Addressing Mode Detection or
 	  Second Boot.
 
+config WDT_BCM6345
+	bool "BCM6345 watchdog timer support"
+	depends on WDT && ARCH_BMIPS
+	help
+	  Select this to enable watchdog timer for BCM6345 SoCs.
+	  The watchdog timer is stopped when initialized.
+	  It performs full SoC reset.
+
 endmenu
drivers/watchdog/Makefile +1 -0
index 8378601..4b19e4c 100644
@@ -18,4 +18,5 @@ obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o
 obj-$(CONFIG_WDT) += wdt-uclass.o
 obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
 obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
+obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o
 obj-$(CONFIG_BCM2835_WDT)       += bcm2835_wdt.o
drivers/watchdog/bcm6345_wdt.c new file +110 -0

110 lines not on this page · raw message

Signature · 1 line
2.1.4
#19 lore raw

PATCH v2 2/8 mips: bmips: add bcm6345-wdt driver support for BCM6358

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
v2: no changes.

 arch/mips/dts/brcm,bcm6358.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm6358.dtsi +6 -0
index 0dad998..5d8399c 100644
@@ -87,6 +87,12 @@
 			#reset-cells = <1>;
 		};
 
+		wdt: watchdog at fffe005c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0xfffe005c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio1: gpio-controller at fffe0080 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
Signature · 1 line
2.1.4
#20 lore raw

PATCH v2 3/8 mips: bmips: add bcm6345-wdt driver support for BCM6328

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
v2: no changes.

 arch/mips/dts/brcm,bcm6328.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm6328.dtsi +6 -0
index 3926885..36dd8bc 100644
@@ -78,6 +78,12 @@
 			mask = <0x1>;
 		};
 
+		wdt: watchdog at 1000005c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x1000005c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio: gpio-controller at 10000084 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
Signature · 1 line
2.1.4
#21 lore raw

PATCH v2 4/8 mips: bmips: add bcm6345-wdt driver support for BCM63268

In reply to Álvaro Fernández Rojas

This driver controls the watchdog present on this SoC.

---
v2: no changes.

 arch/mips/dts/brcm,bcm63268.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/dts/brcm,bcm63268.dtsi +6 -0
index b03763f..a3b7e73 100644
@@ -84,6 +84,12 @@
 			#reset-cells = <1>;
 		};
 
+		wdt: watchdog at 1000009c {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x1000009c 0xc>;
+			clocks = <&periph_osc>;
+		};
+
 		gpio1: gpio-controller at 100000c0 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
Signature · 1 line
2.1.4
#22 lore raw

PATCH v2 5/8 dm: sysreset: add watchdog-reboot driver

In reply to Álvaro Fernández Rojas

Add a new sysreset driver that uses the recently added watchdog support. It performs a full SoC reset by calling wdt_expire_now op.

---
v2: introduce changes requested by Simon Glass:
- Check wdt_expire_now() return for errors.

 drivers/sysreset/Kconfig             |  6 ++++
 drivers/sysreset/Makefile            |  1 +
 drivers/sysreset/sysreset_watchdog.c | 60 ++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c
drivers/sysreset/Kconfig +6 -0
index b2f7464..a6d48e8 100644
@@ -31,4 +31,10 @@ config SYSRESET_SYSCON
 	help
 	  Reboot support for generic SYSCON mapped register reset.
 
+config SYSRESET_WATCHDOG
+	bool "Enable support for watchdog reboot driver"
+	select WDT
+	help
+	  Reboot support for generic watchdog reset.
+
 endmenu
drivers/sysreset/Makefile +1 -0
index bd352e7..b683811 100644
@@ -7,6 +7,7 @@
 obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
+obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
drivers/sysreset/sysreset_watchdog.c new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
2.1.4
#23 lore raw

PATCH v2 6/8 mips: bmips: add wdt-reboot driver support for BCM6358

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
v2: no changes.

 arch/mips/dts/brcm,bcm6358.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm6358.dtsi +5 -0
index 5d8399c..4f63cf8 100644
@@ -93,6 +93,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio1: gpio-controller at fffe0080 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
Signature · 1 line
2.1.4
#24 lore raw

PATCH v2 7/8 mips: bmips: add wdt-reboot driver support for BCM6328

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
v2: no changes.

 arch/mips/dts/brcm,bcm6328.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm6328.dtsi +5 -0
index 36dd8bc..a996075 100644
@@ -84,6 +84,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio: gpio-controller at 10000084 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
Signature · 1 line
2.1.4
#25 lore raw

PATCH v2 8/8 mips: bmips: add wdt-reboot driver support for BCM63268

In reply to Álvaro Fernández Rojas

This driver allows rebooting the SoC by calling wdt_expire_now op.

---
v2: no changes.

 arch/mips/dts/brcm,bcm63268.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/mips/dts/brcm,bcm63268.dtsi +5 -0
index a3b7e73..113a96b 100644
@@ -90,6 +90,11 @@
 			clocks = <&periph_osc>;
 		};
 
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt>;
+		};
+
 		gpio1: gpio-controller at 100000c0 {
 			compatible = "brcm,bcm6345-gpio";
 			reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
Signature · 1 line
2.1.4
#26 lore raw

v2 cover mips: bmips: add bcm6345 watchdog support

In reply to Álvaro Fernández Rojas

Am 16.05.2017 um 18:29 schrieb Álvaro Fernández Rojas:

Quoted 18 lines

Adds support for Broadcom MIPS BCM6345 watchdog controller.
Also adds a generic watchdog sysreset driver to allow rebooting by expiring the SoC watchdog.
This is needed for some specific Broadcom MIPS SoCs where pll_conf if bugged and it can't be used to perform SoC reboots, like in BCM6348 (a1 rev).

v2: add changes requested by Simon Glass.

Álvaro Fernández Rojas (8):
dm: watchdog: add BCM6345 watchdog driver
mips: bmips: add bcm6345-wdt driver support for BCM6358
mips: bmips: add bcm6345-wdt driver support for BCM6328
mips: bmips: add bcm6345-wdt driver support for BCM63268
dm: sysreset: add watchdog-reboot driver
mips: bmips: add wdt-reboot driver support for BCM6358
mips: bmips: add wdt-reboot driver support for BCM6328
mips: bmips: add wdt-reboot driver support for BCM63268

Quoted 13 lines
 arch/mips/dts/brcm,bcm63268.dtsi     |  11 ++++
 arch/mips/dts/brcm,bcm6328.dtsi      |  11 ++++
 arch/mips/dts/brcm,bcm6358.dtsi      |  11 ++++
 drivers/sysreset/Kconfig             |   6 ++
 drivers/sysreset/Makefile            |   1 +
 drivers/sysreset/sysreset_watchdog.c |  60 +++++++++++++++++++
 drivers/watchdog/Kconfig             |   8 +++
 drivers/watchdog/Makefile            |   1 +
 drivers/watchdog/bcm6345_wdt.c       | 110 +++++++++++++++++++++++++++++++++++
 9 files changed, 219 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_watchdog.c
 create mode 100644 drivers/watchdog/bcm6345_wdt.c

series applied to u-boot-mips, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170520/682351dc/attachment.sig>