linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Rob Herring <robh+dt@kernel.org>
Cc: od@zcrc.me, 周琰杰 <zhouyanjie@wanyeetech.com>,
	devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Paul Cercueil" <paul@crapouillou.net>
Subject: [PATCH 08/13] MIPS: ingenic: DTS: Add nodes for the watchdog/PWM/OST
Date: Mon, 13 Apr 2020 17:26:28 +0200	[thread overview]
Message-ID: <20200413152633.198301-8-paul@crapouillou.net> (raw)
In-Reply-To: <20200413152633.198301-1-paul@crapouillou.net>

Add the TCU nodes to the JZ4780, JZ4770 and JZ4740 devicetree files.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/boot/dts/ingenic/jz4740.dtsi | 14 +++++++++++
 arch/mips/boot/dts/ingenic/jz4770.dtsi | 34 ++++++++++++++++++++++++++
 arch/mips/boot/dts/ingenic/jz4780.dtsi | 24 ++++++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4740.dtsi b/arch/mips/boot/dts/ingenic/jz4740.dtsi
index b56671157bbd..1520585c235c 100644
--- a/arch/mips/boot/dts/ingenic/jz4740.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4740.dtsi
@@ -74,6 +74,20 @@ watchdog: watchdog@0 {
 			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 {
diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi b/arch/mips/boot/dts/ingenic/jz4770.dtsi
index 9a25a6f7a48d..3024c360c3ca 100644
--- a/arch/mips/boot/dts/ingenic/jz4770.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi
@@ -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>;
@@ -65,6 +66,39 @@ tcu: timer@10002000 {
 
 		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 {
diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index 51ea764101aa..0f26beb7d85b 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -76,6 +76,30 @@ watchdog: watchdog@0 {
 			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 {
-- 
2.25.1


  parent reply	other threads:[~2020-04-13 15:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 15:26 [PATCH 01/13] dt-bindings: timer: Convert ingenic,tcu.txt to YAML Paul Cercueil
2020-04-13 15:26 ` [PATCH 02/13] dt-bindings: mmc: Convert jz4740-mmc doc " Paul Cercueil
2020-04-20 20:48   ` Rob Herring
2020-04-13 15:26 ` [PATCH 03/13] dt-bindings: dma: Convert jz4740-dma " Paul Cercueil
2020-04-20 20:49   ` Rob Herring
2020-04-13 15:26 ` [PATCH 04/13] dt-bindings: usb: ingenic,musb: Add usb-role-switch property Paul Cercueil
2020-04-20 20:49   ` Rob Herring
2020-04-13 15:26 ` [PATCH 05/13] dt-bindings: MIPS: Require SoC compatible string after board string Paul Cercueil
2020-04-20 20:50   ` Rob Herring
2020-04-13 15:26 ` [PATCH 06/13] MIPS: ingenic: DTS: Fix invalid value in #dma-cells Paul Cercueil
2020-04-13 15:26 ` [PATCH 07/13] MIPS: ingenic: DTS: Respect cell count of common properties Paul Cercueil
2020-04-29 21:04   ` Thomas Bogendoerfer
2020-04-30 12:17     ` Paul Cercueil
2020-04-13 15:26 ` Paul Cercueil [this message]
2020-04-29 21:04   ` [PATCH 08/13] MIPS: ingenic: DTS: Add nodes for the watchdog/PWM/OST Thomas Bogendoerfer
2020-04-13 15:26 ` [PATCH 09/13] MIPS: ingenic: DTS: Update JZ4770 support Paul Cercueil
2020-04-29 21:05   ` Thomas Bogendoerfer
2020-04-13 15:26 ` [PATCH 10/13] MIPS: ingenic: DTS: Update GCW0 support Paul Cercueil
2020-04-29 21:05   ` Thomas Bogendoerfer
2020-04-13 15:26 ` [PATCH 11/13] MIPS: ingenic: CI20: enable OST, PWM drivers in defconfig Paul Cercueil
2020-04-29 21:05   ` Thomas Bogendoerfer
2020-04-13 15:26 ` [PATCH 12/13] MIPS: ingenic: GCW0: Update defconfig Paul Cercueil
2020-04-29 21:06   ` Thomas Bogendoerfer
2020-04-13 15:26 ` [PATCH 13/13] MIPS: ingenic: Drop obsolete code, merge the rest in setup.c Paul Cercueil
2020-04-29 21:06   ` Thomas Bogendoerfer
2020-04-20 20:47 ` [PATCH 01/13] dt-bindings: timer: Convert ingenic,tcu.txt to YAML Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200413152633.198301-8-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).