Skip to contentSkip to conversation

Add watchdog DT nodes and parse it to read PMU registers addresses

PATCH In review Leela Krishna Amudala 6 participants 9 messages Sep 27, 2013 3 messages not in the archive

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

v2 cover Add watchdog DT nodes and parse it to read PMU registers addresses

This patchset does the following things
- Fixes the watchdog DT node name to follow convention
- Adds watchdog DT node to Exynos5420 SoC
- parse the watchdog device node to read pmu wdt sys registers addresses and do mask/unmask enable/disable of WDT in probe and s2r scenarios.

This patch set is rebased on Kgene's for-next branch and tested on SMDK5420

Changes since V1:
- Added new compatible string for Exynos5 SoCs
- Introduced quirk mechanism to program PMU registers
- Addressed comments given by Tomasz Figa <[email protected]>

Leela Krishna Amudala (4):
ARM: dts: Fix the watchdog DT node name for Exynos5
ARM: dts: add watchdog device tree node for exynos5420
watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers
adresses
ARM: dts: exynos: add PMU registers addresses and mask bit to
watchdog node

 .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
 arch/arm/boot/dts/exynos5.dtsi                     |    6 +-
 arch/arm/boot/dts/exynos5250.dtsi                  |    4 +-
 arch/arm/boot/dts/exynos5420.dtsi                  |    7 ++
 drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
 5 files changed, 121 insertions(+), 14 deletions(-)
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org

#2 lore raw

PATCH v2 1/4 ARM: dts: Fix the watchdog DT node name for Exynos5

Fixes the watchdog DT node name for Exynos5 as per the DT node naming convention also update "status" property for Exynos5250 SoC.

---
 arch/arm/boot/dts/exynos5.dtsi    |    2 +-
 arch/arm/boot/dts/exynos5250.dtsi |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/exynos5.dtsi +1 -1
index 074739d..a8bf0c2 100644
@@ -102,7 +102,7 @@
 		status = "disabled";
 	};
 
-	watchdog {
+	watchdog@101D0000 {
 		compatible = "samsung,s3c2410-wdt";
 		reg = <0x101D0000 0x100>;
 		interrupts = <0 42 0>;
arch/arm/boot/dts/exynos5250.dtsi +2 -1
index 7d7cc77..6bb42cf 100644
@@ -158,9 +158,10 @@
 		interrupts = <0 47 0>;
 	};
 
-	watchdog {
+	watchdog@101D0000 {
 		clocks = <&clock 336>;
 		clock-names = "watchdog";
+		status = "okay";
 	};
 
 	g2d@10850000 {
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1380276986-24131-2-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org

Reviewed-by
#4 lore raw

Re: [PATCH V2 1/4] ARM: dts: Fix the watchdog DT node name for Exynos5

Leela Krishna,

Quoted 8 lines · Leela Krishna Amudala

Fixes the watchdog DT node name for Exynos5 as per the DT node naming convention also update "status" property for Exynos5250 SoC.

---
 arch/arm/boot/dts/exynos5.dtsi    |    2 +-
 arch/arm/boot/dts/exynos5250.dtsi |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

--
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

#5 lore raw

PATCH v2 4/4 ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node

In reply to a message not in the archive

This patch adds support for specifying the pmu registers and masking bit for watchdog to enable/disable and mask/unmask the watchdog reset request.

---
 arch/arm/boot/dts/exynos5.dtsi    |    4 ++--
 arch/arm/boot/dts/exynos5250.dtsi |    1 +
 arch/arm/boot/dts/exynos5420.dtsi |    1 +
 3 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/exynos5.dtsi +2 -2
index a8bf0c2..764c290 100644
@@ -103,8 +103,8 @@
 	};
 
 	watchdog@101D0000 {
-		compatible = "samsung,s3c2410-wdt";
-		reg = <0x101D0000 0x100>;
+		compatible = "samsung,s3c5250-wdt";
+		reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;
 		interrupts = <0 42 0>;
 		status = "disabled";
 	};
arch/arm/boot/dts/exynos5250.dtsi +1 -0
index 6bb42cf..8bf28a7a 100644
@@ -161,6 +161,7 @@
 	watchdog@101D0000 {
 		clocks = <&clock 336>;
 		clock-names = "watchdog";
+		reset-mask-bit = <20>;
 		status = "okay";
 	};
 
arch/arm/boot/dts/exynos5420.dtsi +1 -0
index 9fadc23..29235ea 100644
@@ -189,6 +189,7 @@
 	watchdog@101D0000 {
 		clocks = <&clock 316>;
 		clock-names = "watchdog";
+		reset-mask-bit = <0>;
 		status = "okay";
 	};
 
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node

Hi Leela,

arch/arm/boot/dts/exynos5.dtsi line 107

Quoted 5 lines · Leela Krishna Amudala
        watchdog@101D0000 {
arch/arm/boot/dts/exynos5.dtsi +2 -2
-               compatible = "samsung,s3c2410-wdt";
-               reg = <0x101D0000 0x100>;
+               compatible = "samsung,s3c5250-wdt";
+               reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;

nit: Please maintain consistency with the hex number case.

Signature · 2 lines
With warm regards,
Sachin
#7 lore raw

PATCH v2 2/4 ARM: dts: add watchdog device tree node for exynos5420

In reply to Leela Krishna Amudala

Add watchdog device tree node for exynos5420

---
 arch/arm/boot/dts/exynos5420.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/exynos5420.dtsi +6 -0
index d537cd7..9fadc23 100644
@@ -186,6 +186,12 @@
 		status = "okay";
 	};
 
+	watchdog@101D0000 {
+		clocks = <&clock 316>;
+		clock-names = "watchdog";
+		status = "okay";
+	};
+
 	serial@12C00000 {
 		clocks = <&clock 257>, <&clock 128>;
 		clock-names = "uart", "clk_uart_baud0";
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH v2 3/4 watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses

In reply to Leela Krishna Amudala

This patch parses the watchdog node to read pmu wdt sys registers addresses and do mask/unmask enable/disable of WDT in probe and s2r scenarios.

---
 .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
 drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
 2 files changed, 108 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +22 -2
index 2aa486c..f78b802 100644
@@ -5,10 +5,30 @@ after a preset amount of time during which the WDT reset event has not
 occurred.
 
 Required properties:
-- compatible : should be "samsung,s3c2410-wdt"
+- compatible : should be "samsung,s3c2410-wdt" or "samsung,s3c5250-wdt"
 - reg : base physical address of the controller and length of memory mapped
-	region.
+	region and additional (addresses and length of memory mapped regions
+	of) PMU registers for masking/unmasking WDT only in case of Exynos5250 and 5420.
 - interrupts : interrupt number to the cpu.
+- reset-mask-bit: bit number in the PMU registers to program mask/unmask WDT (required only
+	in case	of Exynos5250 and 5420).
 
 Optional properties:
 - timeout-sec : contains the watchdog timeout in seconds.
+
+Examples:
+
+watchdog {
+	compatible = "samsung,s3c2410-wdt";
+	reg = <0x101D0000 0x100>;
+	interrupts = <0 42 0>;
+	status = "disabled";
+};
+
+watchdog {
+        compatible = "samsung,s3c5250-wdt";
+        reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;
+        interrupts = <0 42 0>;
+        status = "disabled";
+        reset-mask-bit = <0>;
+};
drivers/watchdog/s3c2410_wdt.c +86 -8

167 lines not on this page · raw message

Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1380276986-24131-4-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org

#11 lore raw

Re: [PATCH V2 3/4] watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses

Quoted 14 lines · Leela Krishna Amudala

This patch parses the watchdog node to read pmu wdt sys registers addresses and do mask/unmask enable/disable of WDT in probe and s2r scenarios.

---
 .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
 drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
 2 files changed, 108 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +0 -0
index 2aa486c..f78b802 100644

Documentation/devicetree/bindings/watchdog/samsung-wdt.txt after a preset amount of time during which the WDT reset event has not · line 8

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +1 -1
@@ -5,10 +5,30 @@ after a preset amount of time during which the WDT reset event has not
 occurred.
 
 Required properties:
-- compatible : should be "samsung,s3c2410-wdt"
+- compatible : should be "samsung,s3c2410-wdt" or "samsung,s3c5250-wdt"

It would also be helpful to mention the SoCs along with the compatibles strings.

Quoted 4 lines
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +2 -1
 - reg : base physical address of the controller and length of memory mapped
-       region.
+       region and additional (addresses and length of memory mapped regions
+       of) PMU registers for masking/unmasking WDT only in case of Exynos5250 and 5420.

Documentation/devicetree/bindings/watchdog/samsung-wdt.txt after a preset amount of time during which the WDT reset event has not · line 21

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +6 -0
 - interrupts : interrupt number to the cpu.
+- reset-mask-bit: bit number in the PMU registers to program mask/unmask WDT (required only
+       in case of Exynos5250 and 5420).
 
 Optional properties:
 - timeout-sec : contains the watchdog timeout in seconds.
+
+Examples:
+
+watchdog {

watchdog@101D0000

Documentation/devicetree/bindings/watchdog/samsung-wdt.txt after a preset amount of time during which the WDT reset event has not · line 28

Quoted 7 lines
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +7 -0
+       compatible = "samsung,s3c2410-wdt";
+       reg = <0x101D0000 0x100>;
+       interrupts = <0 42 0>;
+       status = "disabled";
+};
+
+watchdog {

ditto

Quoted 2 lines
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +2 -0
+        compatible = "samsung,s3c5250-wdt";
+        reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;
Signature · 6 lines
With warm regards,
Sachin
--
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