Skip to contentSkip to conversation

MIPS: xburst: add JZ4780 SoC and MIPS Creator CI20 board support

PATCH Applied Antony Pavlov 2 participants 11 messages Sep 10, 2014 – Sep 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover MIPS: xburst: add JZ4780 SoC and MIPS Creator CI20 board support

The MIPS Creator CI20 board is a high performance, fully featured Linux and Android development platform.

The Creator CI20 is supplied free of charge to certain approved projects under Imagination's ecosystem.

Please see http://store.imgtec.com/product/mips-creator-ci20/ for details.

Barebox CI20-related changes are available on github:
https://github.com/frantony/barebox/tree/next.ci20.20140910

Antony Pavlov (9):
common.h: use special IOMEM() for MIPS
MIPS: dts: use physical addresses (as Linux does)
MIPS: xburst: add JZ4780 SoC support
MIPS: add (another) Ingenic vendor ID
MIPS: xburst: debug_ll: rework common code, add JZ4780 support
MIPS: dts: add jz4780.dtsi
MIPS: add MIPS Creator CI20 board support
MIPS: add img-ci20_defconfig
Documentation: add MIPS Creator CI20 board mini-howto

 Documentation/boards/mips/img-ci20.rst             | 42 ++++++++++++++++
 arch/mips/Kconfig                                  |  1 -
 arch/mips/Makefile                                 |  1 +
 arch/mips/boards/img-ci20/Makefile                 |  1 +
 arch/mips/boards/img-ci20/board.c                  | 27 +++++++++++
 .../img-ci20/include/board/board_pbl_start.h       | 43 +++++++++++++++++
 arch/mips/boards/img-ci20/include/board/debug_ll.h | 23 +++++++++
 arch/mips/configs/img-ci20_defconfig               | 42 ++++++++++++++++
 arch/mips/dts/ar9331.dtsi                          | 10 ++--
 arch/mips/dts/dlink-dir-320.dts                    |  4 +-
 arch/mips/dts/img-ci20.dts                         | 35 ++++++++++++++
 arch/mips/dts/jz4755.dtsi                          | 30 ++++++------
 arch/mips/dts/jz4780.dtsi                          | 56 ++++++++++++++++++++++
 arch/mips/dts/ls1b.dtsi                            | 16 +++----
 arch/mips/dts/qemu-malta.dts                       | 14 +++---
 arch/mips/include/asm/cpu.h                        |  1 +
 arch/mips/lib/cpu-probe.c                          |  1 +
 arch/mips/mach-xburst/Kconfig                      | 30 ++++++++++--
 .../mach-xburst/include/mach/debug_ll_jz4750d.h    |  6 +--
 .../mach-xburst/include/mach/debug_ll_jz4780.h     | 51 ++++++++++++++++++++
 arch/mips/mach-xburst/include/mach/jz4780.h        | 30 ++++++++++++
 include/common.h                                   |  6 +++
 22 files changed, 424 insertions(+), 46 deletions(-)
 create mode 100644 Documentation/boards/mips/img-ci20.rst
 create mode 100644 arch/mips/boards/img-ci20/Makefile
 create mode 100644 arch/mips/boards/img-ci20/board.c
 create mode 100644 arch/mips/boards/img-ci20/include/board/board_pbl_start.h
 create mode 100644 arch/mips/boards/img-ci20/include/board/debug_ll.h
 create mode 100644 arch/mips/configs/img-ci20_defconfig
 create mode 100644 arch/mips/dts/img-ci20.dts
 create mode 100644 arch/mips/dts/jz4780.dtsi
 create mode 100644 arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h
 create mode 100644 arch/mips/mach-xburst/include/mach/jz4780.h
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/9 common.h: use special IOMEM() for MIPS

---
 include/common.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/common.h +6 -0
index de63571..fca9798 100644
@@ -271,7 +271,13 @@ void barebox_set_model(const char *);
 const char *barebox_get_hostname(void);
 void barebox_set_hostname(const char *);
 
+#if defined(CONFIG_MIPS)
+#include <asm/addrspace.h>
+
+#define IOMEM(addr)	((void __force __iomem *)CKSEG1ADDR(addr))
+#else
 #define IOMEM(addr)	((void __force __iomem *)(addr))
+#endif
 
 #define DIV_ROUND_UP(n,d)	(((n) + (d) - 1) / (d))
 
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/9 MIPS: dts: use physical addresses (as Linux does)

In reply to Antony Pavlov

With IOMEM() adapted for MIPS we can use physical addresses in device tree reg property.

---
 arch/mips/dts/ar9331.dtsi       | 10 +++++-----
 arch/mips/dts/dlink-dir-320.dts |  4 ++--
 arch/mips/dts/jz4755.dtsi       | 30 +++++++++++++++---------------
 arch/mips/dts/ls1b.dtsi         | 16 ++++++++--------
 arch/mips/dts/qemu-malta.dts    | 14 +++++++-------
 5 files changed, 37 insertions(+), 37 deletions(-)
arch/mips/dts/ar9331.dtsi +5 -5
index 8280588..8e7afcd 100644
@@ -10,24 +10,24 @@
 		device_type = "soc";
 		ranges;
 
-		serial0: serial@b8020000 {
+		serial0: serial@18020000 {
 			compatible = "qca,ar9330-uart";
-			reg = <0xb8020000 0x14>;
+			reg = <0x18020000 0x14>;
 			clocks = <&ar9331_clk AR933X_CLK_UART>;
 			status = "disabled";
 		};
 
 		ar9331_clk: clock {
 			compatible = "qca,ar933x-clk";
-			reg = <0xb8050000 0x48>;
+			reg = <0x18050000 0x48>;
 			#clock-cells = <1>;
 		};
 
-		spi: spi@bf000000{
+		spi: spi@1f000000{
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "qca,ath79-spi";
-			reg = <0xbf000000 0x01000000>;
+			reg = <0x1f000000 0x01000000>;
 			status = "disabled";
 		};
 	};
arch/mips/dts/dlink-dir-320.dts +2 -2
index bad41d9..b961c9d 100644
@@ -17,9 +17,9 @@
 		device_type = "soc";
 		ranges;
 
-		serial0: serial@b8000300 {
+		serial0: serial@18000300 {
 			compatible = "ns16550a";
-			reg = <0xb8000300 0x08>;
+			reg = <0x18000300 0x08>;
 			reg-shift = <0>;
 			clock-frequency = <25804800>;
 			status = "disabled";
arch/mips/dts/jz4755.dtsi +15 -15
index b83d884..137156d 100644
@@ -8,35 +8,35 @@
 		#size-cells = <1>;
 		ranges;
 
-		wdt: wdt@b0002000 {
+		wdt: wdt@10002000 {
 			compatible = "ingenic,jz4740-wdt";
-			reg = <0xb0002000 0x10>;
+			reg = <0x10002000 0x10>;
 		};
 
 		rtc: rtc@10003000 {
 			compatible = "ingenic,jz4740-rtc";
-			reg = <0xb0003000 0x38>;
+			reg = <0x10003000 0x38>;
 		};
 
-		serial0: serial@b0030000 {
+		serial0: serial@10030000 {
 			compatible = "ingenic,jz4740-uart";
-			reg = <0xb0030000 0x20>;
+			reg = <0x10030000 0x20>;
 			reg-shift = <2>;
 			clock-frequency = <12000000>;
 			status = "disabled";
 		};
 
-		serial1: serial@b0031000 {
+		serial1: serial@10031000 {
 			compatible = "ingenic,jz4740-uart";
-			reg = <0xb0031000 0x20>;
+			reg = <0x10031000 0x20>;
 			reg-shift = <2>;
 			clock-frequency = <12000000>;
 			status = "disabled";
 		};
 
-		serial2: serial@b0032000 {
+		serial2: serial@10032000 {
 			compatible = "ingenic,jz4740-uart";
-			reg = <0xb0032000 0x20>;
+			reg = <0x10032000 0x20>;
 			reg-shift = <2>;
 			clock-frequency = <12000000>;
 			status = "disabled";
@@ -45,42 +45,42 @@
 		gpio0: gpio@10010000 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010000 0x100>;
+			reg = <0x10010000 0x100>;
 			#gpio-cells = <2>;
 		};
 
 		gpio1: gpio@10010100 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010100 0x100>;
+			reg = <0x10010100 0x100>;
 			#gpio-cells = <2>;
 		};
 
 		gpio2: gpio@10010200 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010200 0x100>;
+			reg = <0x10010200 0x100>;
 			#gpio-cells = <2>;
 		};
 
 		gpio3: gpio@10010300 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010300 0x100>;
+			reg = <0x10010300 0x100>;
 			#gpio-cells = <2>;
 		};
 
 		gpio4: gpio@10010400 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010400 0x100>;
+			reg = <0x10010400 0x100>;
 			#gpio-cells = <2>;
 		};
 
 		gpio5: gpio@10010500 {
 			compatible = "ingenic,jz4740-gpio";
 			gpio-controller;
-			reg = <0xb0010500 0x100>;
+			reg = <0x10010500 0x100>;
 			#gpio-cells = <2>;
 		};
 	};
arch/mips/dts/ls1b.dtsi +8 -8
index f4ff8b6..af7119f 100644
@@ -8,33 +8,33 @@
 		device_type = "soc";
 		ranges;
 
-		serial0: serial@bfe40000 {
+		serial0: serial@1fe40000 {
 			compatible = "ns16550a";
-			reg = <0xbfe40000 0x8>;
+			reg = <0x1fe40000 0x8>;
 			reg-shift = <0>;
 			clock-frequency = <83000000>;
 			status = "disabled";
 		};
 
-		serial1: serial@bfe44000 {
+		serial1: serial@1fe44000 {
 			compatible = "ns16550a";
-			reg = <0xbfe44000 0x8>;
+			reg = <0x1fe44000 0x8>;
 			reg-shift = <0>;
 			clock-frequency = <83000000>;
 			status = "disabled";
 		};
 
-		serial2: serial@bfe48000 {
+		serial2: serial@1fe48000 {
 			compatible = "ns16550a";
-			reg = <0xbfe48000 0x8>;
+			reg = <0x1fe48000 0x8>;
 			reg-shift = <0>;
 			clock-frequency = <83000000>;
 			status = "disabled";
 		};
 
-		serial3: serial@bfe4c000 {
+		serial3: serial@1fe4c000 {
 			compatible = "ns16550a";
-			reg = <0xbfe4c000 0x8>;
+			reg = <0x1fe4c000 0x8>;
 			reg-shift = <0>;
 			clock-frequency = <83000000>;
 			status = "disabled";
arch/mips/dts/qemu-malta.dts +7 -7
index cc1c960..9b0c594 100644
@@ -17,9 +17,9 @@
 		reg = <0x00000000 0x10000000>;
 	};
 
-	uart0: serial@b80003f8 {
+	uart0: serial@180003f8 {
 		compatible = "ns16550a";
-		reg = <0xb80003f8 0x08>;
+		reg = <0x180003f8 0x08>;
 		reg-shift = <0>;
 		/* no matter for emulated port */
 		clock-frequency = <1843200>;
@@ -28,7 +28,7 @@
 	gpio: gpio@1f000b00 {
 		compatible = "mti,malta-fpga-i2c-gpio";
 		gpio-controller;
-		reg = <0xbf000b00 0x20>;
+		reg = <0x1f000b00 0x20>;
 		#gpio-cells = <2>;
 	};
 
@@ -44,19 +44,19 @@
 		status = "disabled";
 	};
 
-	uart2: serial@bf000900 {
+	uart2: serial@1f000900 {
 		compatible = "ns16550a";
-		reg = <0xbf000900 0x40>;
+		reg = <0x1f000900 0x40>;
 		reg-shift = <3>;
 		/* no matter for emulated port */
 		clock-frequency = <1843200>;
 	};
 
-	nor0: flash@be000000 {
+	nor0: flash@1e000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "cfi-flash";
-		reg = <0xbe000000 0x00400000>;
+		reg = <0x1e000000 0x00400000>;
 
 		partition@0 {
 			label = "barebox";
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/9 MIPS: xburst: add JZ4780 SoC support

In reply to Antony Pavlov

Old Ingenic SoCs (JZ4755, JZ4740) use MIPS32r1 ISA CPU cores than latest ones (JZ4770, JZ4780) use MIPS32r2.

---
 arch/mips/Kconfig             | 1 -
 arch/mips/mach-xburst/Kconfig | 7 +++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/mips/Kconfig +0 -1
index bc68c67..40d5d83 100644
@@ -82,7 +82,6 @@ config MACH_MIPS_LOONGSON
 
 config MACH_MIPS_XBURST
 	bool "Ingenic XBurst-based boards"
-	select SYS_HAS_CPU_MIPS32_R1
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select DRIVER_SERIAL_NS16550
arch/mips/mach-xburst/Kconfig +7 -0
index f7b8470..4d57015 100644
@@ -6,6 +6,13 @@ config ARCH_TEXT_BASE
 
 config CPU_JZ4755
 	bool
+	select SYS_HAS_CPU_MIPS32_R1
+	select WATCHDOG
+	select WATCHDOG_JZ4740
+
+config CPU_JZ4780
+	bool
+	select SYS_HAS_CPU_MIPS32_R2
 	select WATCHDOG
 	select WATCHDOG_JZ4740
 
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 4/9 MIPS: add (another) Ingenic vendor ID

In reply to Antony Pavlov

The latest Ingenic CPUs (e.g. JZ4780) use new vendor ID.

Based on commit from https://github.com/MIPS/CI20_linux/tree/ci20-v3.16

commit 00b672aa52f299f1d67ab18274c3f5e5d5a15767
Author: Paul Burton <[email protected]>
Date: Mon Jul 8 12:14:28 2013 +0100

MIPS: add (another) Ingenic vendor ID

Ingenic have switched to a new vendor ID for the Xburst core used in their current SoCs such as the jz4780. Add this vendor ID and handle it in addition to their former vendor ID.

---
 arch/mips/include/asm/cpu.h | 1 +
 arch/mips/lib/cpu-probe.c   | 1 +
 2 files changed, 2 insertions(+)
arch/mips/include/asm/cpu.h +1 -0
index dcc2a27..572cabb 100644
@@ -27,6 +27,7 @@
 #define PRID_COMP_MIPS		0x010000
 #define PRID_COMP_BROADCOM	0x020000
 #define PRID_COMP_INGENIC	0xd00000
+#define PRID_COMP_INGENIC2	0xe10000
 
 /*
  * Assigned Processor ID (implementation) values for bits 15:8 of the PRId
arch/mips/lib/cpu-probe.c +1 -0
index 8235a54..4622bcd 100644
@@ -158,6 +158,7 @@ void cpu_probe(void)
 		cpu_probe_broadcom(c);
 		break;
 	case PRID_COMP_INGENIC:
+	case PRID_COMP_INGENIC2:
 		cpu_probe_ingenic(c);
 		break;
 	}
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 5/9 MIPS: xburst: debug_ll: rework common code, add JZ4780 support

In reply to Antony Pavlov
---
 arch/mips/mach-xburst/Kconfig                      | 19 +++++---
 .../mach-xburst/include/mach/debug_ll_jz4750d.h    |  6 +--
 .../mach-xburst/include/mach/debug_ll_jz4780.h     | 51 ++++++++++++++++++++++
 arch/mips/mach-xburst/include/mach/jz4780.h        | 30 +++++++++++++
 4 files changed, 98 insertions(+), 8 deletions(-)
arch/mips/mach-xburst/Kconfig +14 -5
index 4d57015..e3db61e 100644
@@ -27,21 +27,30 @@ config BOARD_RZX50
 endchoice
 
 if DEBUG_LL
-if CPU_JZ4755
 choice
 	prompt "DEBUG_LL port"
 
-config JZ4750D_DEBUG_LL_UART0
+config JZ47XX_DEBUG_LL_UART0
+	depends on CPU_JZ4755 || CPU_JZ4780
 	bool "UART0"
 
-config JZ4750D_DEBUG_LL_UART1
+config JZ47XX_DEBUG_LL_UART1
+	depends on CPU_JZ4755 || CPU_JZ4780
 	bool "UART1"
 
-config JZ4750D_DEBUG_LL_UART2
+config JZ47XX_DEBUG_LL_UART2
+	depends on CPU_JZ4755 || CPU_JZ4780
 	bool "UART2"
 
+config JZ47XX_DEBUG_LL_UART3
+	depends on CPU_JZ4780
+	bool "UART3"
+
+config JZ47XX_DEBUG_LL_UART4
+	depends on CPU_JZ4780
+	bool "UART4"
+
 endchoice
-endif # CPU_JZ4755
 endif # DEBUG_LL
 
 endif
arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h +3 -3
index 2a55dea..6d18366 100644
@@ -20,15 +20,15 @@
 
 #include <mach/jz4750d_regs.h>
 
-#ifdef CONFIG_JZ4750D_DEBUG_LL_UART0
+#ifdef CONFIG_JZ47XX_DEBUG_LL_UART0
 #define DEBUG_LL_UART_ADDR	UART0_BASE
 #endif
 
-#ifdef CONFIG_JZ4750D_DEBUG_LL_UART1
+#ifdef CONFIG_JZ47XX_DEBUG_LL_UART1
 #define DEBUG_LL_UART_ADDR	UART1_BASE
 #endif
 
-#ifdef CONFIG_JZ4750D_DEBUG_LL_UART2
+#ifdef CONFIG_JZ47XX_DEBUG_LL_UART2
 #define DEBUG_LL_UART_ADDR	UART2_BASE
 #endif
 
arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h new file +51 -0

51 lines not on this page · raw message

arch/mips/mach-xburst/include/mach/jz4780.h new file +30 -0
new file mode 100644
index 0000000..4503a93
@@ -0,0 +1,30 @@
+/*
+ * JZ4780 SoC definitions
+ *
+ * Copyright (c) 2013 Imagination Technologies
+ * Author: Paul Burton <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MIPS_ASM_MACH_JZ4780_JZ4780_H__
+#define __MIPS_ASM_MACH_JZ4780_JZ4780_H__
+
+/* APB bus devices */
+#define JZ4780_UART0_BASE	0xb0030000
+#define JZ4780_UART1_BASE	0xb0031000
+#define JZ4780_UART2_BASE	0xb0032000
+#define JZ4780_UART3_BASE	0xb0033000
+#define JZ4780_UART4_BASE	0xb0034000
+#define JZ4780_UARTn_BASE(n)	(JZ4780_UART0_BASE + (n * 0x1000))
+
+#endif /* __MIPS_ASM_MACH_JZ4780_JZ4780_H__ */
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 6/9 MIPS: dts: add jz4780.dtsi

In reply to Antony Pavlov

Based on file from https://github.com/MIPS/CI20_linux/tree/ci20-v3.16

---
 arch/mips/dts/jz4780.dtsi | 56 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/mips/dts/jz4780.dtsi new file +56 -0
new file mode 100644
index 0000000..9f0de5d
@@ -0,0 +1,56 @@
+#include "skeleton.dtsi"
+
+/ {
+	soc {
+		model = "Ingenic JZ4780";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		ranges = <>;
+
+		wdt: wdt@10002000 {
+			compatible = "ingenic,jz4740-wdt";
+			reg = <0x10002000 0x10>;
+		};
+
+		uart0: serial@10030000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0x10030000 0x100>;
+			reg-shift = <2>;
+			clock-frequency = <48000000>;
+			status = "disabled";
+		};
+
+		uart1: serial@10031000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0x10031000 0x100>;
+			reg-shift = <2>;
+			clock-frequency = <48000000>;
+			status = "disabled";
+		};
+
+		uart2: serial@10032000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0x10032000 0x100>;
+			reg-shift = <2>;
+			clock-frequency = <48000000>;
+			status = "disabled";
+		};
+
+		uart3: serial@10033000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0x10033000 0x100>;
+			reg-shift = <2>;
+			clock-frequency = <48000000>;
+			status = "disabled";
+		};
+
+		uart4: serial@10034000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0x10034000 0x100>;
+			reg-shift = <2>;
+			clock-frequency = <48000000>;
+			status = "disabled";
+		};
+	};
+};
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

PATCH 7/9 MIPS: add MIPS Creator CI20 board support

In reply to Antony Pavlov
---
 arch/mips/Makefile                                 |  1 +
 arch/mips/boards/img-ci20/Makefile                 |  1 +
 arch/mips/boards/img-ci20/board.c                  | 27 ++++++++++++++
 .../img-ci20/include/board/board_pbl_start.h       | 43 ++++++++++++++++++++++
 arch/mips/boards/img-ci20/include/board/debug_ll.h | 23 ++++++++++++
 arch/mips/dts/img-ci20.dts                         | 35 ++++++++++++++++++
 arch/mips/mach-xburst/Kconfig                      |  4 ++
 7 files changed, 134 insertions(+)
arch/mips/Makefile +1 -0
index a3cf112..f3f4f67 100644
@@ -89,6 +89,7 @@ board-$(CONFIG_BOARD_LOONGSON_TECH_LS1B)	:= loongson-ls1b
 
 machine-$(CONFIG_MACH_MIPS_XBURST)	:= xburst
 board-$(CONFIG_BOARD_RZX50)	:= ritmix-rzx50
+board-$(CONFIG_BOARD_CI20)	:= img-ci20
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
 
arch/mips/boards/img-ci20/Makefile new file +1 -0
new file mode 100644
index 0000000..dcfc293
@@ -0,0 +1 @@
+obj-y += board.o
arch/mips/boards/img-ci20/board.c new file +27 -0
new file mode 100644
index 0000000..515ebae
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+
+static int ci20_hostname_init(void)
+{
+	barebox_set_hostname("ci20");
+
+	return 0;
+}
+console_initcall(ci20_hostname_init);
arch/mips/boards/img-ci20/include/board/board_pbl_start.h new file +43 -0

43 lines not on this page · raw message

arch/mips/boards/img-ci20/include/board/debug_ll.h new file +23 -0
new file mode 100644
index 0000000..72612cf
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __INCLUDE_CI20_BOARD_DEBUG_LL_H__
+#define __INCLUDE_CI20_BOARD_DEBUG_LL_H__
+
+#include <mach/debug_ll_jz4780.h>
+
+#endif  /* __INCLUDE_CI20_BOARD_DEBUG_LL_H__ */
arch/mips/dts/img-ci20.dts new file +35 -0
new file mode 100644
index 0000000..f2022dd
@@ -0,0 +1,35 @@
+/*
+ * CI20 device tree
+ *
+ * Copyright (c) 2013 Imagination Technologies
+ * Author: Paul Burton <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "jz4780.dtsi"
+
+/ {
+	model = "MIPS Creator CI20";
+	compatible = "img,ci20";
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x10000000>;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
arch/mips/mach-xburst/Kconfig +4 -0
index e3db61e..f4a64c6 100644
@@ -24,6 +24,10 @@ config BOARD_RZX50
 	select HAS_POWEROFF
 	select CPU_JZ4755
 
+config BOARD_CI20
+	bool "Imagination Creator CI20"
+	select CPU_JZ4780
+
 endchoice
 
 if DEBUG_LL
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 8/9 MIPS: add img-ci20_defconfig

In reply to Antony Pavlov
---
 arch/mips/configs/img-ci20_defconfig | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
arch/mips/configs/img-ci20_defconfig new file +42 -0
new file mode 100644
index 0000000..56235c4
@@ -0,0 +1,42 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="img-ci20"
+CONFIG_MACH_MIPS_XBURST=y
+CONFIG_BOARD_CI20=y
+CONFIG_PBL_IMAGE=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+# CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_POLLER=y
+CONFIG_DEBUG_LL=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_LOADY=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_SAVES=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_GETOPT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OFTREE=y
+CONFIG_OFDEVICE=y
+# CONFIG_SPI is not set
+CONFIG_CLOCKSOURCE_DUMMY=y
+CONFIG_CLOCKSOURCE_DUMMY_RATE=3500
+CONFIG_SHA1=y
+CONFIG_SHA224=y
+CONFIG_SHA256=y
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH 9/9 Documentation: add MIPS Creator CI20 board mini-howto

In reply to Antony Pavlov
---
 Documentation/boards/mips/img-ci20.rst | 42 ++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
Documentation/boards/mips/img-ci20.rst new file +42 -0
new file mode 100644
index 0000000..8f5cd80
@@ -0,0 +1,42 @@
+MIPS Creator CI20
+=================
+
+The MIPS Creator CI20 board is a high performance, fully featured
+Linux and Android development platform.
+
+Major hardware features include:
+
+  * Ingenic JZ4780 SoC (dual 1.2GHz MIPS32 processor);
+  * 1 GiB DDR3 memory;
+  * 8 GiB NAND Flash;
+  * 2 x UART;
+  * Davicom dm9000 10/100 Ethernet controller;
+  * 2 x USB (host and OTG);
+  * HDMI output;
+  * 14-pin ETAG connector;
+  * GPIO, SPI, I2C, ADC, expansion headers.
+
+
+The board uses U-Boot 2013.10 as bootloader.
+
+
+Running barebox
+---------------
+
+  1. Boot the board with UART0 serial console. Stop the auto boot during U-boot.
+
+  2. Upload ``zbarebox.bin`` via Ymodem to the board and then run:
+
+.. code-block:: none
+
+    ci20# loady 0xa8000000
+    ...
+    ci20# go 0xa8000000
+..
+
+
+Links
+-----
+
+  * http://store.imgtec.com/product/mips-creator-ci20
+  * http://elinux.org/MIPS_Creator_CI20
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#10 lore raw
In reply to Antony Pavlov
Quoted 12 lines · Antony Pavlov

The MIPS Creator CI20 board is a high performance, fully featured Linux and Android development platform.

The Creator CI20 is supplied free of charge to certain approved projects under Imagination's ecosystem.

Please see http://store.imgtec.com/product/mips-creator-ci20/ for details.

Barebox CI20-related changes are available on github:
https://github.com/frantony/barebox/tree/next.ci20.20140910

Quoted 10 lines

Antony Pavlov (9):
common.h: use special IOMEM() for MIPS
MIPS: dts: use physical addresses (as Linux does)
MIPS: xburst: add JZ4780 SoC support
MIPS: add (another) Ingenic vendor ID
MIPS: xburst: debug_ll: rework common code, add JZ4780 support
MIPS: dts: add jz4780.dtsi
MIPS: add MIPS Creator CI20 board support
MIPS: add img-ci20_defconfig
Documentation: add MIPS Creator CI20 board mini-howto

Applied all, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox