Skip to contentSkip to conversation

ARM64: Enable SP805 WDT support for FSL LS2080A

PATCH New Bhupesh Sharma 4 participants 7 messages Dec 28, 2015 – Apr 19, 2016

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

v4 cover ARM64: Enable SP805 WDT support for FSL LS2080A

Hi Arnd, Kevin, Olof

This is the v4 of patchset which adds the support for SP805 WDT on FSL LS2080A and also adds the missing documentation of SP805 WDT device-tree bindings.

Rebased against arm-soc/next/dt

Changes since v3:
(v3 can be viewed here: https://www.mail-archive.com/devicetree at vger.kernel.org/msg97249.html)
- Added Rob's Acked-by for patch 1/2.
- Sending to 'arm at kernel.org' list and also cc'ed Shawn Guo

Changes since v2:
(v2 can be viewed here: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/463141)
- Addressed Rob's comments regarding the second mandatory CLK source's (WDOGCLK) name in the bindings.

Changes since v1:
(v1 can be viewed here: http://www.spinics.net/lists/devicetree/msg102487.html)

- Addressed Rob and Mark's comments regarding the mandatory CLK sources
- Removed interrupt property from the bindings for now (as discussed
with Mark on IRC) till Will's patch proceeds further and enables handling the WDOG interrupts for each core connected to the same PPI line (http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/391616.html)

Bhupesh Sharma (2):
Documentation: DT: Add entry for ARM SP805-WDT dts/ls2080a: Update DTSI to add support of SP805 WDT

 .../devicetree/bindings/watchdog/sp805-wdt.txt     |   31 +++++++++++
 arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi     |   56 ++++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/sp805-wdt.txt
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 1/2 Documentation: DT: Add entry for ARM SP805-WDT

This patch adds a devicetree binding documentation for ARM's SP805 WatchDog Timer.

---
 .../devicetree/bindings/watchdog/sp805-wdt.txt     |   31 ++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/sp805-wdt.txt
Documentation/devicetree/bindings/watchdog/sp805-wdt.txt new file +31 -0
new file mode 100644
index 0000000..edc4f0e
@@ -0,0 +1,31 @@
+* ARM SP805 Watchdog Timer (WDT) Controller
+
+SP805 WDT is a ARM Primecell Peripheral and has a standard-id register that
+can be used to identify the peripheral type, vendor, and revision.
+This value can be used for driver matching.
+
+As SP805 WDT is a primecell IP, it follows the base bindings specified in
+'arm/primecell.txt'
+
+Required properties:
+- compatible : Should be "arm,sp805-wdt", "arm,primecell"
+- reg : Base address and size of the watchdog timer registers.
+- clocks : From common clock binding.
+           First clock is PCLK and the second is WDOGCLK.
+           WDOGCLK can be equal to or be a sub-multiple of the PCLK frequency.
+- clock-names : From common clock binding.
+                Shall be "apb_pclk" for first clock and "wdog_clk" for the
+                second one.
+
+Optional properties:
+- interrupts : Should specify WDT interrupt number.
+
+Examples:
+
+		cluster1_core0_watchdog: wdt at c000000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc000000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v4 2/2 dts/ls2080a: Update DTSI to add support of SP805 WDT

In reply to Bhupesh Sharma

This patch updates the LS2080a DTSI (DTS Include) file to add support for eight SP805 Watchdog units which can be used to reset the eight Cortex-A57 cores available on LS2080A.

---
 arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi |   56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi +56 -0
index e81cd48..7b0f411 100644
@@ -193,6 +193,62 @@
 			interrupts = <0 32 0x4>; /* Level high type */
 		};
 
+		cluster1_core0_watchdog: wdt at c000000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc000000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster1_core1_watchdog: wdt at c010000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc010000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster2_core0_watchdog: wdt at c100000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc100000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster2_core1_watchdog: wdt at c110000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc110000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster3_core0_watchdog: wdt at c200000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc200000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster3_core1_watchdog: wdt at c210000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc210000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster4_core0_watchdog: wdt at c300000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc300000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
+		cluster4_core1_watchdog: wdt at c310000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xc310000 0x0 0x1000>;
+			clocks = <&clockgen 4 3>, <&clockgen 4 3>;
+			clock-names = "apb_pclk", "wdog_clk";
+		};
+
 		fsl_mc: fsl-mc at 80c000000 {
 			compatible = "fsl,qoriq-mc";
 			reg = <0x00000008 0x0c000000 0 0x40>,	 /* MC portal base */
Signature · 1 line
1.7.9.5
#3 lore raw

v4 cover ARM64: Enable SP805 WDT support for FSL LS2080A

In reply to Bhupesh Sharma
Quoted 7 lines · On Monday 28 December 2015 15:31:22 Bhupesh Sharma wrote:

Hi Arnd, Kevin, Olof

This is the v4 of patchset which adds the support for SP805 WDT on FSL LS2080A and also adds the missing documentation of SP805 WDT device-tree bindings.

Rebased against arm-soc/next/dt

Applied all on next/dt64, thanks!

Arnd

#4 lore raw

v4 cover ARM64: Enable SP805 WDT support for FSL LS2080A

In reply to Bhupesh Sharma

Hi Bhupesh,

Quoted 17 lines · Bhupesh Sharma

Hi Arnd, Kevin, Olof

This is the v4 of patchset which adds the support for SP805 WDT on FSL LS2080A and also adds the missing documentation of SP805 WDT device-tree bindings.

Rebased against arm-soc/next/dt

Changes since v3:
(v3 can be viewed here: https://www.mail-archive.com/devicetree at vger.kernel.org/msg97249.html)
- Added Rob's Acked-by for patch 1/2.
- Sending to 'arm at kernel.org' list and also cc'ed Shawn Guo

Changes since v2:
(v2 can be viewed here: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/463141)
- Addressed Rob's comments regarding the second mandatory CLK source's (WDOGCLK) name in the bindings.

Quoted 8 lines

Changes since v1:
(v1 can be viewed here: http://www.spinics.net/lists/devicetree/msg102487.html)

- Addressed Rob and Mark's comments regarding the mandatory CLK sources
- Removed interrupt property from the bindings for now (as discussed
with Mark on IRC) till Will's patch proceeds further and enables handling the WDOG interrupts for each core connected to the same PPI line (http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/391616.html)

Will just pointed me to this series. I've recently posted a set of patches that should be able to deal with the quirkiness of your HW with regards to PPIs:

http://thread.gmane.org/gmane.linux.drivers.devicetree/163464

Could you please let me know if this works for you?

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#5 lore raw

v4 cover ARM64: Enable SP805 WDT support for FSL LS2080A

Hi Mark,

Sorry for the delayed reply. I was on holidays.

Quoted 44 lines

From: Marc Zyngier [mailto:marc.zyngier at arm.com]
Sent: Thursday, April 14, 2016 9:19 PM

Hi Bhupesh,

Quoted 3 lines · Bhupesh Sharma

Hi Arnd, Kevin, Olof

This is the v4 of patchset which adds the support for SP805 WDT on

FSL

Quoted 1 line

LS2080A and also adds the missing documentation of SP805 WDT device-

tree bindings.

Quoted 6 lines

Rebased against arm-soc/next/dt

Changes since v3:
(v3 can be viewed here:
https://www.mail-

archive.com/devicetree at vger.kernel.org/msg97249.html)

Quoted 7 lines

- Added Rob's Acked-by for patch 1/2.
- Sending to 'arm at kernel.org' list and also cc'ed Shawn Guo

Changes since v2:
(v2 can be viewed here:
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/463141)
- Addressed Rob's comments regarding the second mandatory CLK

source's

Quoted 11 lines

(WDOGCLK) name in the bindings.

Changes since v1:
(v1 can be viewed here:
http://www.spinics.net/lists/devicetree/msg102487.html)

- Addressed Rob and Mark's comments regarding the mandatory CLK sources
- Removed interrupt property from the bindings for now (as discussed with Mark on IRC) till Will's patch proceeds further and enables handling the WDOG interrupts for each core connected to the same

PPI

Quoted 2 lines

line
(http://lists.infradead.org/pipermail/linux-arm-kernel/2015-

December/3

Quoted 1 line

91616.html)

Quoted 8 lines

Will just pointed me to this series. I've recently posted a set of patches that should be able to deal with the quirkiness of your HW with regards to PPIs:

http://thread.gmane.org/gmane.linux.drivers.devicetree/163464

Could you please let me know if this works for you?

Sure. I will have a look at the patchset and get back asap.

Regards,
Bhupesh

#6 lore raw

v4 cover ARM64: Enable SP805 WDT support for FSL LS2080A

Quoted 52 lines · Bhupesh Sharma

Hi Mark,

Sorry for the delayed reply. I was on holidays.

Quoted 48 lines

From: Marc Zyngier [mailto:marc.zyngier at arm.com]
Sent: Thursday, April 14, 2016 9:19 PM

Hi Bhupesh,

Quoted 3 lines · Bhupesh Sharma

Hi Arnd, Kevin, Olof

This is the v4 of patchset which adds the support for SP805 WDT on

FSL

Quoted 1 line

LS2080A and also adds the missing documentation of SP805 WDT device-

tree bindings.

Quoted 6 lines

Rebased against arm-soc/next/dt

Changes since v3:
(v3 can be viewed here:
https://www.mail-

archive.com/devicetree at vger.kernel.org/msg97249.html)

Quoted 7 lines

- Added Rob's Acked-by for patch 1/2.
- Sending to 'arm at kernel.org' list and also cc'ed Shawn Guo

Changes since v2:
(v2 can be viewed here:
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/463141)
- Addressed Rob's comments regarding the second mandatory CLK

source's

Quoted 11 lines

(WDOGCLK) name in the bindings.

Changes since v1:
(v1 can be viewed here:
http://www.spinics.net/lists/devicetree/msg102487.html)

- Addressed Rob and Mark's comments regarding the mandatory CLK sources
- Removed interrupt property from the bindings for now (as discussed with Mark on IRC) till Will's patch proceeds further and enables handling the WDOG interrupts for each core connected to the same

PPI

Quoted 2 lines

line
(http://lists.infradead.org/pipermail/linux-arm-kernel/2015-

December/3

Quoted 1 line

91616.html)

Will just pointed me to this series. I've recently posted a set of patches that should be able to deal with the quirkiness of your HW with regards to PPIs:

Quoted 6 lines
Quoted 4 lines

http://thread.gmane.org/gmane.linux.drivers.devicetree/163464

Could you please let me know if this works for you?

Sure. I will have a look at the patchset and get back asap.

Thanks. It should be pretty easy to do (define all 8 affinities for your CPUs, and assign each one to the watchdog it corresponds to).

Of course, the watchdog driver itself is missing interrupt support, so you will have to hack that as well. If you have any issue with this stuff, please give me a shout.

Cheers,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...