{arm|arm64}: berlin: add watchdog support
Subsystems (2)
cover {arm|arm64}: berlin: add watchdog support
In Marvell berlin SoCs, there are watchdogs which are compatible with the snps,dw-wdt driver. This series try to add watchdog support for them.
Jisheng Zhang (8):
arm: dts: berlin2q: add watchdog nodes
arm: dts: berlin2cd: add watchdog nodes
arm: dts: berlin2: add watchdog nodes
arm64: dts: berlin4ct: add watchdog nodes
arm: dts: berlin: enable wdt0 on Sony NSZ-GS7
ARM: dts: berlin: enable wdt0 on the Google Chromecast
arm: dts: berlin: enable wdt0 on the Marvell BG2Q DMP
arm64: dts: berlin: enable wdt0 on the Marvell BG4CT STB board
arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts | 2 ++ arch/arm/boot/dts/berlin2.dtsi | 24 +++++++++++++++++++++++ arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 2 ++ arch/arm/boot/dts/berlin2cd.dtsi | 24 +++++++++++++++++++++++ arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 4 ++++ arch/arm/boot/dts/berlin2q.dtsi | 24 +++++++++++++++++++++++ arch/arm64/boot/dts/marvell/berlin4ct-stb.dts | 4 ++++ arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 24 +++++++++++++++++++++++ 8 files changed, 108 insertions(+)
Signature · 1 line
2.6.1
PATCH RESEND 1/8 arm: dts: berlin2q: add watchdog nodes
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
--- arch/arm/boot/dts/berlin2q.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/berlin2q.dtsi +24 -0
@@ -483,6 +483,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>; + wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled"; + }; + + wdt1: watchdog at 2000 { + compatible = "snps,dw-wdt"; + reg = <0x2000 0x100>; + clocks = <&refclk>; + interrupts = <1>; + status = "disabled"; + }; + + wdt2: watchdog at 3000 { + compatible = "snps,dw-wdt"; + reg = <0x3000 0x100>; + clocks = <&refclk>; + interrupts = <2>; + status = "disabled"; + }; + sm_gpio1: gpio at 5000 { compatible = "snps,dw-apb-gpio"; reg = <0x5000 0x400>;
Signature · 1 line
2.6.1
Sebastian Hesselbarth
maintainerRe: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 14 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm/boot/dts/berlin2q.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)arch/arm/boot/dts/berlin2q.dtsi +0
-0
arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 9 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0@@ -483,6 +483,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>; + wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";
Jisheng,
as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
I have applied patches 1-4 with the status property removed. This also renders patches 5-8 useless.
So, for now tentatively
Appled to berlin/dt and berlin64/dt respectivly
with status property removed.
Sebastian
Re: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 27 lines · On Thu, 19 Nov 2015 21:47:05 +0100 Sebastian Hesselbarth wrote:
Quoted 14 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm/boot/dts/berlin2q.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)arch/arm/boot/dts/berlin2q.dtsi +0
-0arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 9 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0@@ -483,6 +483,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>; + wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";Jisheng,
Quoted 3 lines
as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
there are two issues here:
1. the dw-wdt can't support multiple variants now. I have rewrite the driver with watchdog core supplied framework, but the patch isn't sent out and may be need time to clean up and review.
2. not all dw-wdt devices are available and functional. This depends on board design and configuration.
So IMHO status=disabled and patch5-8 is necessary, what do you think?
Thanks a lot for review,
Jisheng
Quoted 12 lines
I have applied patches 1-4 with the status property removed. This also renders patches 5-8 useless.
So, for now tentatively
Appled to berlin/dt and berlin64/dt respectivly
with status property removed.
Sebastian
Sebastian Hesselbarth
maintainerRe: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 31 lines · Jisheng Zhang
Quoted 18 lines · On Thu, 19 Nov 2015 21:47:05 +0100 Sebastian Hesselbarth wrote:
Quoted 17 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm/boot/dts/berlin2q.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)arch/arm/boot/dts/berlin2q.dtsi +0
-0@@ -483,6 +483,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>;Quoted 10 lines
arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 6 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0+ wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
Quoted 5 lines
there are two issues here:
1. the dw-wdt can't support multiple variants now. I have rewrite the driver with watchdog core supplied framework, but the patch isn't sent out and may be need time to clean up and review.
Ok.
Quoted 2 lines
2. not all dw-wdt devices are available and functional. This depends on board design and configuration.
I understand that "board design and configuration" may hinder the wdt to issue a hard reset. But all others are able to issue a soft reset or just an interrupt, right?
So, I still don't see why we should disable wdt nodes by default except for the driver issue above.
Quoted 1 line
So IMHO status=disabled and patch5-8 is necessary, what do you think?
No. I'd agree to enable wdt0 by default and leave wdt[1,2] disabled because of the driver issue. Patches 5-8 only enable wdt0 anyway.
As soon as the driver issue is resolved, we enable all wdt nodes unconditionally.
Sebastian
Quoted 12 lines
Quoted 11 lines
I have applied patches 1-4 with the status property removed. This also renders patches 5-8 useless.
So, for now tentatively
Appled to berlin/dt and berlin64/dt respectivly
with status property removed.
Sebastian
Re: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 47 lines · On Fri, 20 Nov 2015 21:19:46 +0100 Sebastian Hesselbarth wrote:
Quoted 31 lines · Jisheng Zhang
Quoted 18 lines · On Thu, 19 Nov 2015 21:47:05 +0100 Sebastian Hesselbarth wrote:
Quoted 17 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm/boot/dts/berlin2q.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)arch/arm/boot/dts/berlin2q.dtsi +0
-0@@ -483,6 +483,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>;Quoted 10 lines
arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 6 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0+ wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
Quoted 5 lines
there are two issues here:
1. the dw-wdt can't support multiple variants now. I have rewrite the driver with watchdog core supplied framework, but the patch isn't sent out and may be need time to clean up and review.
Ok.
Quoted 2 lines
2. not all dw-wdt devices are available and functional. This depends on board design and configuration.
I understand that "board design and configuration" may hinder the wdt to issue a hard reset. But all others are able to issue a soft reset or just an interrupt, right?
Quoted 7 lines
So, I still don't see why we should disable wdt nodes by default except for the driver issue above.
Quoted 1 line
So IMHO status=disabled and patch5-8 is necessary, what do you think?
No. I'd agree to enable wdt0 by default and leave wdt[1,2] disabled because of the driver issue. Patches 5-8 only enable wdt0 anyway.
That's fine.
Quoted 3 lines
As soon as the driver issue is resolved, we enable all wdt nodes unconditionally.
I will submit patch for the wdt driver and hope it will be merged in v4.5.
Thanks,
Jisheng
Quoted 16 lines
Sebastian
Quoted 12 lines
Quoted 11 lines
I have applied patches 1-4 with the status property removed. This also renders patches 5-8 useless.
So, for now tentatively
Appled to berlin/dt and berlin64/dt respectivly
with status property removed.
Sebastian
Sebastian Hesselbarth
maintainerRe: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 12 lines · Jisheng Zhang
Quoted 10 lines · On Fri, 20 Nov 2015 21:19:46 +0100 Sebastian Hesselbarth wrote:
Quoted 9 lines · Jisheng Zhang
Quoted 7 lines · On Thu, 19 Nov 2015 21:47:05 +0100 Sebastian Hesselbarth wrote:
Quoted 6 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>---
[...]
Quoted 29 lines
Quoted 29 lines
Quoted 11 lines
Quoted 10 lines
arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 6 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0+ wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
Quoted 5 lines
there are two issues here:
1. the dw-wdt can't support multiple variants now. I have rewrite the driver with watchdog core supplied framework, but the patch isn't sent out and may be need time to clean up and review.
Ok.
Quoted 2 lines
2. not all dw-wdt devices are available and functional. This depends on board design and configuration.
I understand that "board design and configuration" may hinder the wdt to issue a hard reset. But all others are able to issue a soft reset or just an interrupt, right?
So, I still don't see why we should disable wdt nodes by default except for the driver issue above.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
So IMHO status=disabled and patch5-8 is necessary, what do you think?
No. I'd agree to enable wdt0 by default and leave wdt[1,2] disabled because of the driver issue. Patches 5-8 only enable wdt0 anyway.
That's fine.
Jisheng,
I amended your SoC dtsi watchdog patches accordingly. wdt0 is now always enabled, while the others are disabled.
So, with the changes Patches 1-4 applied to berlin/dt and berlin64/dt respectively. Patches 5-8 dropped.
Quoted 5 lines
Quoted 2 lines
As soon as the driver issue is resolved, we enable all wdt nodes unconditionally.
I will submit patch for the wdt driver and hope it will be merged in v4.5.
Ok. Feel free to add a patch that removes the status disabled properties again if berlin[64]/dt has already hit mainline in the meantime.
If not, keep me posted on the DW wdt patch outcome.
Thanks,
Sebastian
Re: [PATCH RESEND 1/8] arm: dts: berlin2q: add watchdog nodes
Quoted 58 lines · On Sat, 28 Nov 2015 12:36:16 +0100 Sebastian Hesselbarth wrote:
Quoted 12 lines · Jisheng Zhang
Quoted 10 lines · On Fri, 20 Nov 2015 21:19:46 +0100 Sebastian Hesselbarth wrote:
Quoted 9 lines · Jisheng Zhang
Quoted 7 lines · On Thu, 19 Nov 2015 21:47:05 +0100 Sebastian Hesselbarth wrote:
Quoted 6 lines · Jisheng Zhang
The Marvell Berlin BG2Q has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
Signed-off-by Jisheng Zhang <[email protected]>---
[...]
Quoted 29 lines
Quoted 29 lines
Quoted 11 lines
Quoted 10 lines
arch/arm/boot/dts/berlin2q.dtsi line 491
Quoted 6 lines
arch/arm/boot/dts/berlin2q.dtsi +6
-0+ wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled";as the watchdogs are internal and cannot be clock gated at all, how about we remove the status = "disabled" and make them always available?
Quoted 5 lines
there are two issues here:
1. the dw-wdt can't support multiple variants now. I have rewrite the driver with watchdog core supplied framework, but the patch isn't sent out and may be need time to clean up and review.
Ok.
Quoted 2 lines
2. not all dw-wdt devices are available and functional. This depends on board design and configuration.
I understand that "board design and configuration" may hinder the wdt to issue a hard reset. But all others are able to issue a soft reset or just an interrupt, right?
So, I still don't see why we should disable wdt nodes by default except for the driver issue above.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
So IMHO status=disabled and patch5-8 is necessary, what do you think?
No. I'd agree to enable wdt0 by default and leave wdt[1,2] disabled because of the driver issue. Patches 5-8 only enable wdt0 anyway.
That's fine.
Jisheng,
I amended your SoC dtsi watchdog patches accordingly. wdt0 is now always enabled, while the others are disabled.
So, with the changes Patches 1-4 applied to berlin/dt and berlin64/dt respectively. Patches 5-8 dropped.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
As soon as the driver issue is resolved, we enable all wdt nodes unconditionally.
I will submit patch for the wdt driver and hope it will be merged in v4.5.
Ok. Feel free to add a patch that removes the status disabled properties again if berlin[64]/dt has already hit mainline in the meantime.
Got it. No problems.
Quoted 2 lines
If not, keep me posted on the DW wdt patch outcome.
Will do. These days, I'm focusing on clk patches and some trivial dw-apb-timer performance improvement patches. I will loop you in the mail when send out dw wdt driver rewrite patch.
Thanks a lot,
Jisheng
PATCH RESEND 2/8 arm: dts: berlin2cd: add watchdog nodes
In reply to Jisheng ZhangThe Marvell Berlin BG2CD has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
NOTE: although BG2CD doesn't have a HW sysmgr, but the sysmgr domain exists.
--- arch/arm/boot/dts/berlin2cd.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/berlin2cd.dtsi +24 -0
@@ -376,6 +376,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>; + wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled"; + }; + + wdt1: watchdog at 2000 { + compatible = "snps,dw-wdt"; + reg = <0x2000 0x100>; + clocks = <&refclk>; + interrupts = <1>; + status = "disabled"; + }; + + wdt2: watchdog at 3000 { + compatible = "snps,dw-wdt"; + reg = <0x3000 0x100>; + clocks = <&refclk>; + interrupts = <2>; + status = "disabled"; + }; + sm_gpio1: gpio at 5000 { compatible = "snps,dw-apb-gpio"; reg = <0x5000 0x400>;
Signature · 1 line
2.6.1
PATCH RESEND 3/8 arm: dts: berlin2: add watchdog nodes
In reply to Jisheng ZhangThe Marvell Berlin BG2 has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
--- arch/arm/boot/dts/berlin2.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/berlin2.dtsi +24 -0
@@ -412,6 +412,30 @@ ranges = <0 0xfc0000 0x10000>; interrupt-parent = <&sic>; + wdt0: watchdog at 1000 { + compatible = "snps,dw-wdt"; + reg = <0x1000 0x100>; + clocks = <&refclk>; + interrupts = <0>; + status = "disabled"; + }; + + wdt1: watchdog at 2000 { + compatible = "snps,dw-wdt"; + reg = <0x2000 0x100>; + clocks = <&refclk>; + interrupts = <1>; + status = "disabled"; + }; + + wdt2: watchdog at 3000 { + compatible = "snps,dw-wdt"; + reg = <0x3000 0x100>; + clocks = <&refclk>; + interrupts = <2>; + status = "disabled"; + }; + sm_gpio1: gpio at 5000 { compatible = "snps,dw-apb-gpio"; reg = <0x5000 0x400>;
Signature · 1 line
2.6.1
PATCH RESEND 4/8 arm64: dts: berlin4ct: add watchdog nodes
In reply to Jisheng ZhangThe Marvell Berlin BG4CT has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes.
--- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/marvell/berlin4ct.dtsi +24 -0
@@ -241,6 +241,30 @@ interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; }; + wdt0: watchdog at 3000 { + compatible = "snps,dw-wdt"; + reg = <0x3000 0x100>; + clocks = <&osc>; + interrupts = <0>; + status = "disabled"; + }; + + wdt1: watchdog at 4000 { + compatible = "snps,dw-wdt"; + reg = <0x4000 0x100>; + clocks = <&osc>; + interrupts = <1>; + status = "disabled"; + }; + + wdt2: watchdog at 5000 { + compatible = "snps,dw-wdt"; + reg = <0x5000 0x100>; + clocks = <&osc>; + interrupts = <2>; + status = "disabled"; + }; + sm_gpio0: gpio at 8000 { compatible = "snps,dw-apb-gpio"; reg = <0x8000 0x400>;
Signature · 1 line
2.6.1
PATCH RESEND 5/8 arm: dts: berlin: enable wdt0 on Sony NSZ-GS7
In reply to Jisheng ZhangEnable wdt0 on Marvell Berlin BG2 based Sony NSZ-GS7 to make use of the watchdog functionality.
--- arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts +2 -0
@@ -71,3 +71,5 @@ }; &uart0 { status = "okay"; }; + +&wdt0 { status = "okay"; };
Signature · 1 line
2.6.1
PATCH RESEND 6/8 ARM: dts: berlin: enable wdt0 on the Google Chromecast
In reply to Jisheng ZhangEnable wdt0 on the Google Chromecast to make use of the watchdog functionality.
--- arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/berlin2cd-google-chromecast.dts +2 -0
@@ -85,3 +85,5 @@ &usb_phy1 { status = "okay"; }; &usb1 { status = "okay"; }; + +&wdt0 { status = "okay"; };
Signature · 1 line
2.6.1
PATCH RESEND 7/8 arm: dts: berlin: enable wdt0 on the Marvell BG2Q DMP
In reply to Jisheng ZhangEnable wdt0 on the Marvell BG2Q DMP board to make use of the watchdog functionality.
--- arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/berlin2q-marvell-dmp.dts +4 -0
@@ -139,3 +139,7 @@ &sata_phy { status = "okay"; }; + +&wdt0 { + status = "okay"; +};
Signature · 1 line
2.6.1
PATCH RESEND 8/8 arm64: dts: berlin: enable wdt0 on the Marvell BG4CT STB board
In reply to Jisheng ZhangEnable wdt0 on the Marvell BG4CT STB board to make use of the watchdog functionality.
--- arch/arm64/boot/dts/marvell/berlin4ct-stb.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/marvell/berlin4ct-stb.dts +4 -0
@@ -64,3 +64,7 @@ &uart0 { status = "okay"; }; + +&wdt0 { + status = "okay"; +};
Signature · 1 line
2.6.1