Skip to content

Commit

Permalink
MIPS: ingenic: DTS: Fix watchdog nodes
Browse files Browse the repository at this point in the history
The devicetree ABI was broken on purpose by commit 6d53214
("watchdog: jz4740: Use regmap provided by TCU driver"), and
commit 1d9c307 ("watchdog: jz4740: Use WDT clock provided
by TCU driver"). The commit message of the latter explains why the ABI
was broken.

However, the current devicetree files were not updated to the new ABI
described in Documentation/devicetree/bindings/timer/ingenic,tcu.txt,
so the watchdog driver would not probe.

Fix this problem by updating the watchdog nodes to comply with the new
ABI.

Fixes: 6d53214 ("watchdog: jz4740: Use regmap provided by TCU driver")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Zhou Yanjie <zhouyanjie@wanyeetech.com>
Cc: od@zcrc.me
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: <stable@vger.kernel.org> # v5.5+
  • Loading branch information
Paul Cercueil authored and Paul Burton committed Feb 19, 2020
1 parent eb41113 commit 11479e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
17 changes: 9 additions & 8 deletions arch/mips/boot/dts/ingenic/jz4740.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/clock/jz4740-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>

/ {
#address-cells = <1>;
Expand Down Expand Up @@ -45,14 +46,6 @@
#clock-cells = <1>;
};

watchdog: watchdog@10002000 {
compatible = "ingenic,jz4740-watchdog";
reg = <0x10002000 0x10>;

clocks = <&cgu JZ4740_CLK_RTC>;
clock-names = "rtc";
};

tcu: timer@10002000 {
compatible = "ingenic,jz4740-tcu", "simple-mfd";
reg = <0x10002000 0x1000>;
Expand All @@ -73,6 +66,14 @@

interrupt-parent = <&intc>;
interrupts = <23 22 21>;

watchdog: watchdog@0 {
compatible = "ingenic,jz4740-watchdog";
reg = <0x0 0xc>;

clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
};

rtc_dev: rtc@10003000 {
Expand Down
17 changes: 9 additions & 8 deletions arch/mips/boot/dts/ingenic/jz4780.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/clock/jz4780-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
#include <dt-bindings/dma/jz4780-dma.h>

/ {
Expand Down Expand Up @@ -67,6 +68,14 @@

interrupt-parent = <&intc>;
interrupts = <27 26 25>;

watchdog: watchdog@0 {
compatible = "ingenic,jz4780-watchdog";
reg = <0x0 0xc>;

clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
};

rtc_dev: rtc@10003000 {
Expand Down Expand Up @@ -348,14 +357,6 @@
status = "disabled";
};

watchdog: watchdog@10002000 {
compatible = "ingenic,jz4780-watchdog";
reg = <0x10002000 0x10>;

clocks = <&cgu JZ4780_CLK_RTCLK>;
clock-names = "rtc";
};

nemc: nemc@13410000 {
compatible = "ingenic,jz4780-nemc";
reg = <0x13410000 0x10000>;
Expand Down

0 comments on commit 11479e8

Please sign in to comment.