Skip to content

Commit

Permalink
MIPS: ingenic: DTS: Add nodes for the watchdog/PWM/OST
Browse files Browse the repository at this point in the history
Add the TCU nodes to the JZ4780, JZ4770 and JZ4740 devicetree files.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Paul Cercueil authored and Thomas Bogendoerfer committed Apr 29, 2020
1 parent cf2e6b8 commit bf40bf5
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/mips/boot/dts/ingenic/jz4740.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};

pwm: pwm@40 {
compatible = "ingenic,jz4740-pwm";
reg = <0x40 0x80>;

#pwm-cells = <3>;

clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};
};

rtc_dev: rtc@10003000 {
Expand Down
34 changes: 34 additions & 0 deletions arch/mips/boot/dts/ingenic/jz4770.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0

#include <dt-bindings/clock/jz4770-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>

/ {
#address-cells = <1>;
Expand Down Expand Up @@ -65,6 +66,39 @@

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

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

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

pwm: pwm@40 {
compatible = "ingenic,jz4770-pwm", "ingenic,jz4740-pwm";
reg = <0x40 0x80>;

#pwm-cells = <3>;

clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};

ost: timer@e0 {
compatible = "ingenic,jz4770-ost";
reg = <0xe0 0x20>;

clocks = <&tcu TCU_CLK_OST>;
clock-names = "ost";

interrupts = <15>;
};
};

pinctrl: pin-controller@10010000 {
Expand Down
24 changes: 24 additions & 0 deletions arch/mips/boot/dts/ingenic/jz4780.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,30 @@
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};

pwm: pwm@40 {
compatible = "ingenic,jz4780-pwm", "ingenic,jz4740-pwm";
reg = <0x40 0x80>;

#pwm-cells = <3>;

clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};

ost: timer@e0 {
compatible = "ingenic,jz4780-ost", "ingenic,jz4770-ost";
reg = <0xe0 0x20>;

clocks = <&tcu TCU_CLK_OST>;
clock-names = "ost";

interrupts = <15>;
};
};

rtc_dev: rtc@10003000 {
Expand Down

0 comments on commit bf40bf5

Please sign in to comment.