Thread (38 messages) 38 messages, 5 authors, 2017-10-12
STALE3194d

[PATCH 11/11] ARM: dts: Add PCLK to the Aspeed watchdogs

From: Andrew Jeffery <hidden>
Date: 2017-10-11 03:48:06
Also in: linux-watchdog

On Sat, 2017-08-12 at 20:43 +0200, Linus Walleij wrote:
This adds the PCLK clock to the Aspeed watchdog blocks.
I am not directly familiar with the Aspeed clocking, but
since the IP is derived from Faraday FTWDT010 it probably
has the ability to run the watchdog on the PCLK if
desired
This is true for the AST2400, but not the AST2500 where the only option
is EXTCLK (1MHz).
quoted hunk ↗ jump to hunk
 so to obtain the frequency from it, it needs to
be present in the device tree, and for completeness the
PCLK should also be referenced and enabled anyways.

Take this opportunity to add the "faraday,ftwdt010"
compatible as fallback to the watchdog IP blocks.
quoted
Signed-off-by: Linus Walleij <redacted>
---
?arch/arm/boot/dts/aspeed-g4.dtsi |??7 +++++--
?arch/arm/boot/dts/aspeed-g5.dtsi | 12 +++++++++---
?2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index 8a04c7e2d818..23b100383c15 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -895,16 +895,19 @@
quoted
?			};
?
quoted
quoted
?			wdt1: wdt at 1e785000 {
-				compatible = "aspeed,ast2400-wdt";
+				compatible = "aspeed,ast2400-wdt", "faraday,ftwdt010";
?				reg = <0x1e785000 0x1c>;
?				interrupts = <27>;
+				clocks = <&clk_apb>;
+				clock-names = "PCLK";
?			};
?
quoted
quoted
?			wdt2: wdt at 1e785020 {
-				compatible = "aspeed,ast2400-wdt";
+				compatible = "aspeed,ast2400-wdt", "faraday,ftwdt010";
?				reg = <0x1e785020 0x1c>;
?				interrupts = <27>;
?				clocks = <&clk_apb>;
+				clock-names = "PCLK";
?				status = "disabled";
?			};
?
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 9cffe347b828..2322d72cd8a9 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -1003,21 +1003,27 @@
?
?
quoted
quoted
?			wdt1: wdt at 1e785000 {
-				compatible = "aspeed,ast2500-wdt";
+				compatible = "aspeed,ast2500-wdt", "faraday,ftwdt010";
?				reg = <0x1e785000 0x20>;
?				interrupts = <27>;
+				clocks = <&clk_apb>;
+				clock-names = "PCLK";
Given the comment above, shouldn't we be doing something like the
following instead for each of the watchdogs?

+				faraday,use-extclk;
+				clock-names = "EXTCLK";

Andrew
?			};
?
quoted
quoted
?			wdt2: wdt at 1e785020 {
-				compatible = "aspeed,ast2500-wdt";
+				compatible = "aspeed,ast2500-wdt", "faraday,ftwdt010";
?				reg = <0x1e785020 0x20>;
?				interrupts = <27>;
+				clocks = <&clk_apb>;
+				clock-names = "PCLK";
?				status = "disabled";
?			};
?
quoted
quoted
?			wdt3: wdt at 1e785040 {
-				compatible = "aspeed,ast2500-wdt";
+				compatible = "aspeed,ast2500-wdt", "faraday,ftwdt010";
?				reg = <0x1e785040 0x20>;
+				clocks = <&clk_apb>;
+				clock-names = "PCLK";
?				status = "disabled";
?			};
?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171011/7cd46879/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help