summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2014-05-22 23:48:48 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-26 17:51:22 +0200
commitc269d8c9e577cf0f3cdd25c9e3dff30a759792fd (patch)
tree0ea41e00438e0de4d0fe3972e736c42bbc5cf078 /arch
parentdb5d6b78215037cb7940e21b63715a8007c2fa39 (diff)
downloadbarebox-c269d8c9e577cf0f3cdd25c9e3dff30a759792fd.tar.gz
barebox-c269d8c9e577cf0f3cdd25c9e3dff30a759792fd.tar.xz
ARM: uemd: add mb7707 board support
The MB 77.07 is a small (80x80 mm) single-board computer developed in Russia by the RC Module. It was developed as an educational board for К1879ХБ1Я SoC capabilities demonstration. See http://www.module.ru/en/catalog/micro/micro_pc/ for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/module-mb7707/Makefile2
-rw-r--r--arch/arm/boards/module-mb7707/board.c43
-rw-r--r--arch/arm/boards/module-mb7707/lowlevel.c34
-rw-r--r--arch/arm/dts/module-mb7707.dts24
-rw-r--r--arch/arm/mach-uemd/Kconfig9
6 files changed, 113 insertions, 0 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index ae01b29d76..91e0f30a73 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_HIGHBANK) += highbank/
obj-$(CONFIG_MACH_IMX21ADS) += freescale-mx21-ads/
obj-$(CONFIG_MACH_IMX233_OLINUXINO) += imx233-olinuxino/
obj-$(CONFIG_MACH_IMX27ADS) += freescale-mx27-ads/
+obj-$(CONFIG_MACH_MB7707) += module-mb7707/
obj-$(CONFIG_MACH_MIOA701) += mioa701/
obj-$(CONFIG_MACH_MMCCPU) += mmccpu/
obj-$(CONFIG_MACH_MX23EVK) += freescale-mx23-evk/
diff --git a/arch/arm/boards/module-mb7707/Makefile b/arch/arm/boards/module-mb7707/Makefile
new file mode 100644
index 0000000000..01c7a259e9
--- /dev/null
+++ b/arch/arm/boards/module-mb7707/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/module-mb7707/board.c b/arch/arm/boards/module-mb7707/board.c
new file mode 100644
index 0000000000..7ffad6e62a
--- /dev/null
+++ b/arch/arm/boards/module-mb7707/board.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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>
+#include <driver.h>
+#include <usb/ehci.h>
+#include <mach/hardware.h>
+
+static int hostname_init(void)
+{
+ barebox_set_hostname("mb7707");
+
+ return 0;
+}
+core_initcall(hostname_init);
+
+static struct ehci_platform_data ehci_pdata = {
+ .flags = 0,
+};
+
+static int mb7707_devices_init(void)
+{
+ add_usb_ehci_device(DEVICE_ID_DYNAMIC, UEMD_EHCI_BASE,
+ UEMD_EHCI_BASE + 0x10, &ehci_pdata);
+
+ return 0;
+}
+device_initcall(mb7707_devices_init);
diff --git a/arch/arm/boards/module-mb7707/lowlevel.c b/arch/arm/boards/module-mb7707/lowlevel.c
new file mode 100644
index 0000000000..5f5e1d7af1
--- /dev/null
+++ b/arch/arm/boards/module-mb7707/lowlevel.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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.
+ *
+ */
+
+#define __LOWLEVEL_INIT__
+
+#include <common.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <init.h>
+#include <sizes.h>
+
+#define MB7707_SRAM_BASE 0x40000000
+#define MB7707_SRAM_SIZE SZ_128M
+
+void __naked __bare_init barebox_arm_reset_vector(void)
+{
+ arm_cpu_lowlevel_init();
+
+ barebox_arm_entry(MB7707_SRAM_BASE, MB7707_SRAM_SIZE, 0);
+}
diff --git a/arch/arm/dts/module-mb7707.dts b/arch/arm/dts/module-mb7707.dts
new file mode 100644
index 0000000000..94a3373fc1
--- /dev/null
+++ b/arch/arm/dts/module-mb7707.dts
@@ -0,0 +1,24 @@
+/dts-v1/;
+
+#include "k1879hb1ya.dtsi"
+
+/ {
+ model = "Module MB 77.07";
+ compatible = "module,mb7707";
+
+ memory {
+ reg = <0x40000000 0x8000000>;
+ };
+};
+
+&clk_apb {
+ clock-frequency = <54000000>;
+};
+
+&serial0 {
+ status = "okay";
+};
+
+&timer0 {
+ status = "okay";
+};
diff --git a/arch/arm/mach-uemd/Kconfig b/arch/arm/mach-uemd/Kconfig
index f9cf859354..aedd7574ac 100644
--- a/arch/arm/mach-uemd/Kconfig
+++ b/arch/arm/mach-uemd/Kconfig
@@ -4,4 +4,13 @@ config ARCH_TEXT_BASE
hex
default 0x40800000
+choice
+ prompt "UEMD Board type"
+
+config MACH_MB7707
+ bool "MB7707"
+ select HAVE_DEFAULT_ENVIRONMENT_NEW
+
+endchoice
+
endif