From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, ralf@linux-mips.org,
mturquette@baylibre.com, sboyd@codeaurora.org,
devicetree@vger.kernel.org, linux-mips@linux-mips.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
paul@crapouillou.net, malat@debian.org, dom.peklo@gmail.com
Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Subject: [RFC 3/4] MIPS: Ingenic: Initial X1000 SoC support
Date: Wed, 27 Sep 2017 20:45:26 +0530 [thread overview]
Message-ID: <20170927151527.25570-4-prasannatsmkumar@gmail.com> (raw)
In-Reply-To: <20170927151527.25570-1-prasannatsmkumar@gmail.com>
Add initial Ingenic X1000 SoC support. Provide minimum necessary
information to boot kernel to an initramfs userspace.
Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
---
arch/mips/boot/dts/ingenic/x1000.dtsi | 93 +++++++++++++++++++++++++++++++++++
arch/mips/jz4740/Kconfig | 6 +++
arch/mips/jz4740/time.c | 2 +-
3 files changed, 100 insertions(+), 1 deletion(-)
create mode 100644 arch/mips/boot/dts/ingenic/x1000.dtsi
diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
new file mode 100644
index 0000000..abbb9ec
--- /dev/null
+++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2016 PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <dt-bindings/clock/x1000-cgu.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ingenic,x1000";
+
+ cpuintc: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ intc: interrupt-controller@10001000 {
+ compatible = "ingenic,x1000-intc", "ingenic,jz4780-intc";
+ reg = <0x10001000 0x50>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ ext: ext {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ rtc: rtc {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
+ cgu: jz4780-cgu@10000000 {
+ compatible = "ingenic,x1000-cgu";
+ reg = <0x10000000 0x100>;
+
+ clocks = <&ext>, <&rtc>;
+ clock-names = "ext", "rtc";
+
+ #clock-cells = <1>;
+ };
+
+ uart0: serial@10030000 {
+ compatible = "ingenic,x1000-uart", "ingenic,jz4780-uart";
+ reg = <0x10030000 0x100>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <51>;
+
+ clocks = <&ext>, <&cgu X1000_CLK_UART0>;
+ clock-names = "baud", "module";
+
+ status = "disabled";
+ };
+
+ uart1: serial@10031000 {
+ compatible = "ingenic,x1000-uart", "ingenic,jz4780-uart";
+ reg = <0x10031000 0x100>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <50>;
+
+ clocks = <&ext>, <&cgu X1000_CLK_UART1>;
+ clock-names = "baud", "module";
+
+ status = "disabled";
+ };
+
+ uart2: serial@10032000 {
+ compatible = "ingenic,x1000-uart", "ingenic,jz4780-uart";
+ reg = <0x10032000 0x100>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <49>;
+
+ clocks = <&ext>, <&cgu X1000_CLK_UART2>;
+ clock-names = "baud", "module";
+
+ status = "disabled";
+ };
+};
diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig
index 36f8201..338bc3f 100644
--- a/arch/mips/jz4740/Kconfig
+++ b/arch/mips/jz4740/Kconfig
@@ -22,3 +22,9 @@ config MACH_JZ4780
select MIPS_CPU_SCACHE
select SYS_HAS_CPU_MIPS32_R2
select SYS_SUPPORTS_HIGHMEM
+
+config MACH_X1000
+ bool
+ select MIPS_CPU_SCACHE
+ select SYS_HAS_CPU_MIPS32_R2
+ select SYS_HAS_EARLY_PRINTK
diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c
index bb1ad51..e28c734 100644
--- a/arch/mips/jz4740/time.c
+++ b/arch/mips/jz4740/time.c
@@ -113,7 +113,7 @@ static struct clock_event_device jz4740_clockevent = {
#ifdef CONFIG_MACH_JZ4740
.irq = JZ4740_IRQ_TCU0,
#endif
-#ifdef CONFIG_MACH_JZ4780
+#if defined CONFIG_MACH_JZ4780 || defined CONFIG_MACH_X1000
.irq = JZ4780_IRQ_TCU2,
#endif
};
--
2.10.0
next prev parent reply other threads:[~2017-09-27 15:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 15:15 [RFC 0/4] Add Ingenic X1000 SoC Support PrasannaKumar Muralidharan
2017-09-27 15:15 ` [RFC 1/4] dt-bindings: Add Ingenic X1000 SoC clock define PrasannaKumar Muralidharan
2017-09-27 15:15 ` [RFC 2/4] clk: Add Ingenic X1000 CGU driver PrasannaKumar Muralidharan
2017-10-25 9:23 ` Stephen Boyd
2017-09-27 15:15 ` PrasannaKumar Muralidharan [this message]
2018-03-06 0:08 ` [RFC 3/4] MIPS: Ingenic: Initial X1000 SoC support James Hogan
2018-03-07 13:44 ` PrasannaKumar Muralidharan
2018-03-07 14:19 ` Jiaxun Yang
2018-03-07 15:21 ` PrasannaKumar Muralidharan
2018-03-07 14:35 ` James Hogan
2018-03-07 15:05 ` PrasannaKumar Muralidharan
2018-03-07 15:10 ` James Hogan
2018-03-07 15:22 ` PrasannaKumar Muralidharan
2018-03-07 15:52 ` Jiaxun Yang
2018-03-07 16:25 ` PrasannaKumar Muralidharan
2018-03-07 18:13 ` Mathieu Malaterre
2018-03-10 19:05 ` Jiaxun Yang
2017-09-27 15:15 ` [RFC 4/4] MIPS: Ingenic: Add Halley2 development board support PrasannaKumar Muralidharan
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=20170927151527.25570-4-prasannatsmkumar@gmail.com \
--to=prasannatsmkumar@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dom.peklo@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=malat@debian.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=paul@crapouillou.net \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
/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