Add watchdog DT nodes and use syscon regmap interface to configure pmu registers
Subsystems (3)
v3 cover Add watchdog DT nodes and use syscon regmap interface to configure pmu registers
This patchset does the following things
- Adds watchdog DT nodes to Exynos5250 and 5420
- Uses syscon regmap interface to configure pmu registers to mask/unmask enable/disable of watchdog.
This patch set is rebased on Kgene's for-next branch and tested on SMDK5420
Changes since V2:
- used syscon regmap interface to configure pmu registers in WDT driver (suggested by Tomasz Figa <[email protected]>)
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 (2):
ARM: dts: add watchdog device nodes for Exynos5250 and Exynos5420
watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu
register
.../devicetree/bindings/watchdog/samsung-wdt.txt | 13 ++- arch/arm/boot/dts/exynos5.dtsi | 12 +-- arch/arm/boot/dts/exynos5250.dtsi | 7 +- arch/arm/boot/dts/exynos5420.dtsi | 10 ++ drivers/watchdog/s3c2410_wdt.c | 114 ++++++++++++++++++-- 5 files changed, 139 insertions(+), 17 deletions(-)
Signature · 1 line
1.7.10.4
PATCH RESEND v3 1/2 ARM: dts: add watchdog device nodes for Exynos5250 and Exynos5420
Adds watchdog device nodes to the DT device list for Exynos5250 and Exynos5420
--- arch/arm/boot/dts/exynos5.dtsi | 12 +++++------- arch/arm/boot/dts/exynos5250.dtsi | 7 ++++++- arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++ 3 files changed, 21 insertions(+), 8 deletions(-)
arch/arm/boot/dts/exynos5.dtsi +5 -7
@@ -81,13 +81,6 @@ status = "disabled"; }; - watchdog { - compatible = "samsung,s3c2410-wdt"; - reg = <0x101D0000 0x100>; - interrupts = <0 42 0>; - status = "disabled"; - }; - fimd@14400000 { compatible = "samsung,exynos5250-fimd"; interrupt-parent = <&combiner>;
@@ -106,4 +99,9 @@ #size-cells = <0>; status = "disabled"; }; + + pmu_sys_reg: pmusysreg { + compatible = "samsung,exynos5-pmureg", "syscon"; + reg = <0x10040000 0x5000>; + }; };
arch/arm/boot/dts/exynos5250.dtsi +6 -1
@@ -158,9 +158,14 @@ interrupts = <0 47 0>; }; - watchdog { + watchdog@101D0000 { + compatible = "samsung,s3c5250-wdt"; + reg = <0x101D0000 0x100>; + interrupts = <0 42 0>; clocks = <&clock 336>; clock-names = "watchdog"; + samsung,sysreg = <&pmu_sys_reg>; + status = "okay"; }; g2d@10850000 {
arch/arm/boot/dts/exynos5420.dtsi +10 -0
@@ -369,4 +369,14 @@ clock-names = "gscl"; samsung,power-domain = <&gsc_pd>; }; + + watchdog@101D0000 { + compatible = "samsung,s3c5420-wdt"; + reg = <0x101D0000 0x100>; + interrupts = <0 42 0>; + clocks = <&clock 316>; + clock-names = "watchdog"; + samsung,sysreg = <&pmu_sys_reg>; + status = "okay"; + }; };
Signature · 1 line
1.7.10.4
PATCH RESEND v3 2/2 watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register
In reply to Leela Krishna AmudalaThe syscon regmap interface is used to configure AUTOMATIC_WDT_RESET_DISABLE and MASK_WDT_RESET_REQUEST registers of PMU to mask/unmask enable/disable of watchdog in probe and s2r scenarios.
--- .../devicetree/bindings/watchdog/samsung-wdt.txt | 13 ++- drivers/watchdog/s3c2410_wdt.c | 114 ++++++++++++++++++-- 2 files changed, 118 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +12 -1
@@ -5,10 +5,21 @@ 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" or "samsung,s3c5420-wdt" - reg : base physical address of the controller and length of memory mapped region. - interrupts : interrupt number to the cpu. +- samsung,pmusysreg : reference node to pmu sysreg (required only in case of Exynos5250 and 5420) Optional properties: - timeout-sec : contains the watchdog timeout in seconds. + +watchdog@101D0000 { + compatible = "samsung,s3c5250-wdt"; + reg = <0x101D0000 0x100>; + interrupts = <0 42 0>; + clocks = <&clock 336>; + clock-names = "watchdog"; + samsung,sysreg = <&pmu_sys_reg>; + status = "okay"; +};
drivers/watchdog/s3c2410_wdt.c +106 -8
193 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Re: [RESEND] [PATCH V3 2/2] watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register
Quoted 17 lines · Leela Krishna Amudala
The syscon regmap interface is used to configure
AUTOMATIC_WDT_RESET_DISABLEandMASK_WDT_RESET_REQUESTregisters of PMU to mask/unmask enable/disable of watchdog in probe and s2r scenarios.Signed-off-by Leela Krishna Amudala <[email protected]>---
.../devicetree/bindings/watchdog/samsung-wdt.txt| 13 ++-drivers/watchdog/s3c2410_wdt.c| 114 ++++++++++++++++++--2 files changed, 118 insertions(+), 9 deletions(-)Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +0
-0@@ -5,10 +5,21 @@ after a preset amount of time during which the WDT reset event has notoccurred.
Quoted 7 lines
Required properties:
-- compatible : should be "samsung,s3c2410-wdt"
+- compatible : should be "samsung,s3c2410-wdt" or "samsung,s3c5250-wdt" or "samsung,s3c5420-wdt"
- reg : base physical address of the controller and length of memory mapped region.
- interrupts : interrupt number to the cpu.
+- samsung,pmusysreg : reference node to pmu sysreg (required only in case of Exynos5250 and 5420)
Rather than saying required only on Exynos5250 and 5420, how about saying required only in case of compatible being "samsung,s3c5250-wdt" or "samsung,s3c5420-wdt"
Quoted 13 lines
Optional properties:
- timeout-sec : contains the watchdog timeout in seconds.Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +10
-0+ +watchdog@101D0000 { + compatible = "samsung,s3c5250-wdt"; + reg = <0x101D0000 0x100>; + interrupts = <0 42 0>; + clocks = <&clock 336>; + clock-names = "watchdog"; + samsung,sysreg = <&pmu_sys_reg>; + status = "okay"; +};
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation