Skip to contentSkip to conversation

watchdog: driver for BCM7038 and newer chips.

PATCH In review Justin Chen 2 participants 4 messages Sep 8, 2015

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

v3 cover watchdog: driver for BCM7038 and newer chips.

This driver is for a watchdog block contained in all Broadcom Set-top Box chips since BCM7038. BCM7038 was made public during the 2004 CES, and since then, many chips use this watchdog block including some cable modem chips.

Changes since v2:
Added clk_disable_unprepare if watchdog fails to register.

Changes since v1:
Removed clock-frequency because it brought unnecessary complexity to the driver.
Renamed a few variables.

Patch 1: watchdog device tree binding documentation

Patch 2: watchdog driver

Justin Chen (2):
watchdog: bcm7038: add device tree binding documentation
watchdog: Watchdog driver for Broadcom Set-Top Box

 .../bindings/watchdog/brcm,bcm7038-wdt.txt         |  19 ++
 drivers/watchdog/Kconfig                           |   8 +
 drivers/watchdog/Makefile                          |   1 +
 drivers/watchdog/bcm7038_wdt.c                     | 237 +++++++++++++++++++++
 4 files changed, 265 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
 create mode 100644 drivers/watchdog/bcm7038_wdt.c
Signature · 6 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v3 1/2 watchdog: bcm7038: add device tree binding documentation

Add device tree binding documentation for the watchdog hardware block on bcm7038 and newer SoCs.

---
 .../devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file +19 -0
new file mode 100644
index 0000000..39e5cf5
@@ -0,0 +1,19 @@
+BCM7038 Watchdog timer
+
+Required properties:
+
+- compatible : should be "brcm,bcm7038-wdt"
+- reg : Specifies base physical address and size of the registers.
+
+Optional properties:
+
+- clocks: The clock running the watchdog. If no clock is found the
+	  driver will default to 27000000 HZ.
+
+Example:
+
+watchdog {
+	compatible = "brcm,bcm7038-wdt";
+	clocks = <&upg_fixed>;
+	reg = <0xf040a7e8 0x16>;
+};
Signature · 6 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v3 1/2
#2 lore raw

Re: [PATCH 1/2 v3] watchdog: bcm7038: add device tree binding documentation

Quoted 5 lines · Justin Chen

Add device tree binding documentation for the watchdog hardware block on bcm7038 and newer SoCs.

Some minor comments, otherwise:

Quoted 12 lines
---
 .../devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file +1 -0
new file mode 100644
index 0000000..39e5cf5
@@ -0,0 +1,19 @@
+BCM7038 Watchdog timer

Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file +10 -0
+
+Required properties:
+
+- compatible : should be "brcm,bcm7038-wdt"
+- reg : Specifies base physical address and size of the registers.
+
+Optional properties:
+
+- clocks: The clock running the watchdog. If no clock is found the
+	  driver will default to 27000000 HZ.

s/HZ/Hz/

Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt line 15

Quoted 4 lines
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file +4 -0
+
+Example:
+
+watchdog {

This should have a unit address (watchdog@f040a7e8).

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file +4 -0
+	compatible = "brcm,bcm7038-wdt";
+	clocks = <&upg_fixed>;
+	reg = <0xf040a7e8 0x16>;
+};
#3 lore raw

PATCH v3 2/2 watchdog: Watchdog driver for Broadcom Set-Top Box

In reply to Justin Chen

Watchdog driver for Broadcom 7038 and newer chips.

---
 drivers/watchdog/Kconfig       |   8 ++
 drivers/watchdog/Makefile      |   1 +
 drivers/watchdog/bcm7038_wdt.c | 237 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 246 insertions(+)
 create mode 100644 drivers/watchdog/bcm7038_wdt.c
drivers/watchdog/Kconfig +8 -0
index 55c4b5b..b92222b 100644
@@ -1292,6 +1292,14 @@ config BCM_KONA_WDT_DEBUG
 
 	  If in doubt, say 'N'.
 
+config BCM7038_WDT
+	tristate "BCM7038 Watchdog"
+	select WATCHDOG_CORE
+	help
+	 Watchdog driver for the built-in hardware in Broadcom 7038 SoCs.
+
+	 Say 'Y or 'M' here to enable the driver.
+
 config IMGPDC_WDT
 	tristate "Imagination Technologies PDC Watchdog Timer"
 	depends on HAS_IOMEM
drivers/watchdog/Makefile +1 -0
index 59ea9a1..65d4169 100644
@@ -66,6 +66,7 @@ obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o
 obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o
 obj-$(CONFIG_MEDIATEK_WATCHDOG) += mtk_wdt.o
 obj-$(CONFIG_DIGICOLOR_WATCHDOG) += digicolor_wdt.o
+obj-$(CONFIG_BCM7038_WDT) += bcm7038_wdt.o
 
 # AVR32 Architecture
 obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/bcm7038_wdt.c new file +237 -0

237 lines not on this page · raw message

Signature · 1 line
2.1.0