Add DTS nodes for the JZ4780, JZ4770 and JZ4740 devicetree files.

Signed-off-by: Paul Cercueil <p...@crapouillou.net>
Tested-by: Mathieu Malaterre <ma...@debian.org>
Tested-by: Artur Rojek <cont...@artur-rojek.eu>
---

Notes:
    v5: New patch
    
    v6: Fix register lengths in watchdog/pwm nodes
    
    v7: No change
    
    v8: - Fix wrong start address for PWM node
        - Add system timer and clocksource sub-nodes
    
    v9: Drop timer and clocksource sub-nodes
    
    v10-v11: No change
    
    v12: Drop PWM/watchdog/OST sub-nodes, for now.
    
    v13-v14: No change
    
    v15: Add "simple-mfd" compatible string

 arch/mips/boot/dts/ingenic/jz4740.dtsi | 22 ++++++++++++++++++++++
 arch/mips/boot/dts/ingenic/jz4770.dtsi | 21 +++++++++++++++++++++
 arch/mips/boot/dts/ingenic/jz4780.dtsi | 23 +++++++++++++++++++++++
 3 files changed, 66 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4740.dtsi 
b/arch/mips/boot/dts/ingenic/jz4740.dtsi
index 3ffaf63f22dd..058800bfc875 100644
--- a/arch/mips/boot/dts/ingenic/jz4740.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4740.dtsi
@@ -53,6 +53,28 @@
                clock-names = "rtc";
        };
 
+       tcu: timer@10002000 {
+               compatible = "ingenic,jz4740-tcu", "simple-mfd";
+               reg = <0x10002000 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x10002000 0x1000>;
+
+               #clock-cells = <1>;
+
+               clocks = <&cgu JZ4740_CLK_RTC
+                         &cgu JZ4740_CLK_EXT
+                         &cgu JZ4740_CLK_PCLK
+                         &cgu JZ4740_CLK_TCU>;
+               clock-names = "rtc", "ext", "pclk", "tcu";
+
+               interrupt-controller;
+               #interrupt-cells = <1>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <23 22 21>;
+       };
+
        rtc_dev: rtc@10003000 {
                compatible = "ingenic,jz4740-rtc";
                reg = <0x10003000 0x40>;
diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi 
b/arch/mips/boot/dts/ingenic/jz4770.dtsi
index 49ede6c14ff3..0bfb9edff3d0 100644
--- a/arch/mips/boot/dts/ingenic/jz4770.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi
@@ -46,6 +46,27 @@
                #clock-cells = <1>;
        };
 
+       tcu: timer@10002000 {
+               compatible = "ingenic,jz4770-tcu", "simple-mfd";
+               reg = <0x10002000 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x10002000 0x1000>;
+
+               #clock-cells = <1>;
+
+               clocks = <&cgu JZ4770_CLK_RTC
+                         &cgu JZ4770_CLK_EXT
+                         &cgu JZ4770_CLK_PCLK>;
+               clock-names = "rtc", "ext", "pclk";
+
+               interrupt-controller;
+               #interrupt-cells = <1>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <27 26 25>;
+       };
+
        pinctrl: pin-controller@10010000 {
                compatible = "ingenic,jz4770-pinctrl";
                reg = <0x10010000 0x600>;
diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index b03cdec56de9..c54bd7cfec55 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -46,6 +46,29 @@
                #clock-cells = <1>;
        };
 
+       tcu: timer@10002000 {
+               compatible = "ingenic,jz4780-tcu",
+                            "ingenic,jz4770-tcu",
+                            "simple-mfd";
+               reg = <0x10002000 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x10002000 0x1000>;
+
+               #clock-cells = <1>;
+
+               clocks = <&cgu JZ4780_CLK_RTCLK
+                         &cgu JZ4780_CLK_EXCLK
+                         &cgu JZ4780_CLK_PCLK>;
+               clock-names = "rtc", "ext", "pclk";
+
+               interrupt-controller;
+               #interrupt-cells = <1>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <27 26 25>;
+       };
+
        rtc_dev: rtc@10003000 {
                compatible = "ingenic,jz4780-rtc";
                reg = <0x10003000 0x4c>;
-- 
2.21.0.593.g511ec345e18

Reply via email to