summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-02-24 11:15:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-20 12:40:40 +0100
commit3da922bb1b8109f8e2d0851e039addddb3a5ecfa (patch)
tree1ca1651c5eeaecde0b6936a3956ce8a50d29b5f0 /arch/arm/boards
parent5967f594af3817876b331fe8af0f6bdc0c28d9ca (diff)
downloadbarebox-3da922bb1b8109f8e2d0851e039addddb3a5ecfa.tar.gz
barebox-3da922bb1b8109f8e2d0851e039addddb3a5ecfa.tar.xz
ARM: Add ELTEC HiPerCam board support
This adds support for the i.MX6 based Eltec HiPerCam board. This board comes with different i.MX6 flavours and different memory sizes. Currently supported is the i.MX6dl version with 256MB DDR3 RAM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards')
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/eltec-hipercam/Makefile2
-rw-r--r--arch/arm/boards/eltec-hipercam/board.c31
-rw-r--r--arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg105
-rw-r--r--arch/arm/boards/eltec-hipercam/lowlevel.c56
5 files changed, 195 insertions, 0 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index aee16656dd..548a84a630 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += eukrea_cpuimx25/
obj-$(CONFIG_MACH_EUKREA_CPUIMX27) += eukrea_cpuimx27/
obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += eukrea_cpuimx35/
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += eukrea_cpuimx51/
+obj-$(CONFIG_MACH_ELTEC_HIPERCAM) += eltec-hipercam/
obj-$(CONFIG_MACH_FREESCALE_MX25_3STACK) += freescale-mx25-3ds/
obj-$(CONFIG_MACH_FREESCALE_MX35_3STACK) += freescale-mx35-3ds/
obj-$(CONFIG_MACH_FREESCALE_MX51_PDK) += freescale-mx51-babbage/
diff --git a/arch/arm/boards/eltec-hipercam/Makefile b/arch/arm/boards/eltec-hipercam/Makefile
new file mode 100644
index 0000000000..092c31d6b2
--- /dev/null
+++ b/arch/arm/boards/eltec-hipercam/Makefile
@@ -0,0 +1,2 @@
+lwl-y += lowlevel.o
+obj-y += board.o
diff --git a/arch/arm/boards/eltec-hipercam/board.c b/arch/arm/boards/eltec-hipercam/board.c
new file mode 100644
index 0000000000..7486747eda
--- /dev/null
+++ b/arch/arm/boards/eltec-hipercam/board.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2015 Sascha Hauer <s.hauer@pengutronix.de>
+ *
+ * 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.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+#include <bbu.h>
+#include <mach/bbu.h>
+
+static int hipercam_init(void)
+{
+ if (!of_machine_is_compatible("eltec,hipercam-rev01"))
+ return 0;
+
+ imx6_bbu_internal_spi_i2c_register_handler("nor", "/dev/m25p0.barebox",
+ BBU_HANDLER_FLAG_DEFAULT);
+
+ return 0;
+}
+device_initcall(hipercam_init);
diff --git a/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg b/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
new file mode 100644
index 0000000000..455417e2b2
--- /dev/null
+++ b/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
@@ -0,0 +1,105 @@
+soc imx6
+loadaddr 0x10000000
+
+wm 32 0x020e04bc 0x00000030
+wm 32 0x020e04c0 0x00000030
+wm 32 0x020e04c4 0x00000030
+wm 32 0x020e04c8 0x00000030
+wm 32 0x020e04cc 0x00000030
+wm 32 0x020e04d0 0x00000030
+wm 32 0x020e04d4 0x00000030
+wm 32 0x020e04d8 0x00000030
+wm 32 0x020e0764 0x00000030
+wm 32 0x020e0770 0x00000030
+wm 32 0x020e0778 0x00000030
+wm 32 0x020e077c 0x00000030
+wm 32 0x020e0780 0x00000030
+wm 32 0x020e0784 0x00000030
+wm 32 0x020e078c 0x00000030
+wm 32 0x020e0748 0x00000030
+wm 32 0x020e074c 0x00000030
+wm 32 0x020e076c 0x00000030
+wm 32 0x020e0470 0x00020030
+wm 32 0x020e0474 0x00020030
+wm 32 0x020e0478 0x00020030
+wm 32 0x020e047c 0x00020030
+wm 32 0x020e0480 0x00020030
+wm 32 0x020e0484 0x00020030
+wm 32 0x020e0488 0x00020030
+wm 32 0x020e048c 0x00020030
+wm 32 0x020e0464 0x00020030
+wm 32 0x020e0490 0x00020030
+wm 32 0x020e04ac 0x00020030
+wm 32 0x020e04b0 0x00020030
+wm 32 0x020e0494 0x00020030
+wm 32 0x020e04a4 0x00003000
+wm 32 0x020e04a8 0x00003000
+wm 32 0x020e04b4 0x00003030
+wm 32 0x020e04b8 0x00003030
+wm 32 0x020e0750 0x00020000
+wm 32 0x020e0760 0x00020000
+wm 32 0x020e0754 0x00000000
+wm 32 0x020e04a0 0x00000000
+wm 32 0x020e0774 0x000c0000
+wm 32 0x021b081c 0x33333333
+wm 32 0x021b0820 0x33333333
+wm 32 0x021b0824 0x33333333
+wm 32 0x021b0828 0x33333333
+wm 32 0x021b481c 0x33333333
+wm 32 0x021b4820 0x33333333
+wm 32 0x021b4824 0x33333333
+wm 32 0x021b4828 0x33333333
+wm 32 0x021b0018 0x00081740
+wm 32 0x021b001c 0x00008000
+wm 32 0x021b0004 0x0002002d
+wm 32 0x021b000c 0x8c435323
+wm 32 0x021b0010 0xb66e8d63
+wm 32 0x021b0014 0x01ff00db
+wm 32 0x021b002c 0x000026d2
+wm 32 0x021b0030 0x00431023
+wm 32 0x021b0008 0x00333030
+wm 32 0x021b0004 0x0002556d
+wm 32 0x021b0040 0x00000027
+wm 32 0x021b0000 0xc4190000
+wm 32 0x021b001c 0x04008032
+wm 32 0x021b001c 0x0400803a
+wm 32 0x021b001c 0x00008033
+wm 32 0x021b001c 0x0000803b
+wm 32 0x021b001c 0x00048031
+wm 32 0x021b001c 0x00048039
+wm 32 0x021b001c 0x13208030
+wm 32 0x021b001c 0x13208038
+wm 32 0x021b001c 0x04008040
+wm 32 0x021b001c 0x04008048
+wm 32 0x021b0800 0xa1390003
+wm 32 0x021b4800 0xa1390003
+wm 32 0x021b0020 0x00005800
+wm 32 0x021b0818 0x00022227
+wm 32 0x021b4818 0x00022227
+wm 32 0x021b083c 0x42350231
+wm 32 0x021b483c 0x42350231
+wm 32 0x021b0840 0x021a0218
+wm 32 0x021b4840 0x021a0218
+wm 32 0x021b0848 0x4b4b4e49
+wm 32 0x021b4848 0x4b4b4e49
+wm 32 0x021b0850 0x3f3f3035
+wm 32 0x021b4850 0x3f3f3035
+wm 32 0x021b080c 0x0040003c
+wm 32 0x021b0810 0x0032003e
+wm 32 0x021b480c 0x0040003c
+wm 32 0x021b4810 0x0032003e
+wm 32 0x021b08b8 0x00000800
+wm 32 0x021b48b8 0x00000800
+wm 32 0x021b001c 0x00000000
+wm 32 0x021b0404 0x00011006
+wm 32 0x020c4068 0x00c03f3f
+wm 32 0x020c406c 0x0030fc03
+wm 32 0x020c4070 0x0fffc000
+wm 32 0x020c4074 0x3ff00000
+wm 32 0x020c4078 0x00fff300
+wm 32 0x020c407c 0x0f0000c3
+wm 32 0x020c4080 0x000003ff
+wm 32 0x020e0010 0xf00000cf
+wm 32 0x020e0018 0x007f007f
+wm 32 0x020e001c 0x007f007f
+wm 32 0x020c4060 0x000000fb
diff --git a/arch/arm/boards/eltec-hipercam/lowlevel.c b/arch/arm/boards/eltec-hipercam/lowlevel.c
new file mode 100644
index 0000000000..8f11f6796f
--- /dev/null
+++ b/arch/arm/boards/eltec-hipercam/lowlevel.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 Sascha Hauer <s.hauer@pengutronix.de>
+ *
+ * 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.
+ *
+ */
+#include <common.h>
+#include <linux/sizes.h>
+#include <io.h>
+#include <debug_ll.h>
+#include <asm/sections.h>
+#include <asm/mmu.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+#include <mach/generic.h>
+
+static void setup_uart(void)
+{
+ void __iomem *uart_base = (void *)0x02020000;
+
+ writel(0x1, 0x020e0330);
+ writel(0x00000000, uart_base + 0x80);
+ writel(0x00004027, uart_base + 0x84);
+ writel(0x00000704, uart_base + 0x88);
+ writel(0x00000a81, uart_base + 0x90);
+ writel(0x0000002b, uart_base + 0x9c);
+ writel(0x00013880, uart_base + 0xb0);
+ writel(0x0000047f, uart_base + 0xa4);
+ writel(0x0000c34f, uart_base + 0xa8);
+ writel(0x00000001, uart_base + 0x80);
+ putc_ll('>');
+}
+
+extern char __dtb_imx6dl_eltec_hipercam_start[];
+
+ENTRY_FUNCTION(start_imx6dl_eltec_hipercam, r0, r1, r2)
+{
+ void *fdt;
+
+ imx6_cpu_lowlevel_init();
+
+ arm_setup_stack(0x00940000 - 8);
+ setup_uart();
+
+ fdt = __dtb_imx6dl_eltec_hipercam_start - get_runtime_offset();
+
+ barebox_arm_entry(0x10000000, SZ_256M, fdt);
+}