summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r--target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig5
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c42
4 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h
index 89b437398..2d5a08f38 100644
--- a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h
+++ b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h
@@ -23,6 +23,7 @@ enum ramips_mach_type {
/* RT3050 based machines */
RAMIPS_MACH_3G_6200N, /* Edimax 3G-6200N */
RAMIPS_MACH_ALL0256N, /* Allnet ALL0256N */
+ RAMIPS_MACH_CARAMBOLA, /* 8devices Carambola */
RAMIPS_MACH_DIR_300_B1, /* D-Link DIR-300 B1 */
RAMIPS_MACH_DIR_600_B1, /* D-Link DIR-600 B1 */
RAMIPS_MACH_DIR_600_B2, /* D-Link DIR-600 B2 */
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig b/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig
index 5837196f6..945639b97 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig
@@ -2,6 +2,11 @@ if RALINK_RT305X
menu "Ralink RT350x machine selection"
+config RT305X_MACH_CARAMBOLA
+ bool "8devices Carambola dev board support"
+ select RALINK_DEV_GPIO_BUTTONS
+ select RALINK_DEV_GPIO_LEDS
+
config RT305X_MACH_3G_6200N
bool "Edimax 3G-6200N board support"
select RALINK_DEV_GPIO_BUTTONS
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
index 0dcb1f9e3..c7c27cb74 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_RT305X_MACH_ARGUS_ATP52B) += mach-argus-atp52b.o
obj-$(CONFIG_RT305X_MACH_BC2) += mach-bc2.o
obj-$(CONFIG_RT305X_MACH_ALL0256N) += mach-all0256n.o
obj-$(CONFIG_RT305X_MACH_ALL5002) += mach-all5002.o
+obj-$(CONFIG_RT305X_MACH_CARAMBOLA) += mach-carambola.o
obj-$(CONFIG_RT305X_MACH_DIR_300_REVB) += mach-dir-300-revb.o
obj-$(CONFIG_RT305X_MACH_DIR_615_H1) += mach-dir-615-h1.o
obj-$(CONFIG_RT305X_MACH_DAP_1350) += mach-dap-1350.o
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c
new file mode 100644
index 000000000..c24527a7b
--- /dev/null
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-carambola.c
@@ -0,0 +1,42 @@
+/*
+ * 8devices Carambola dev board support
+ *
+ * Copyright (C) 2012 Tobias Diedrich <ranma+openwrt@tdiedrich.de>
+ *
+ * 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.
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-ralink/machine.h>
+#include <asm/mach-ralink/dev-gpio-buttons.h>
+#include <asm/mach-ralink/dev-gpio-leds.h>
+#include <asm/mach-ralink/rt305x.h>
+#include <asm/mach-ralink/rt305x_regs.h>
+
+#include "devices.h"
+
+static void __init carambola_init(void)
+{
+ /* Ugh, inverted logic...
+ * This actually puts the pins into GPIO mode rather I2C, SPI, ... */
+ rt305x_gpio_init(RT305X_GPIO_MODE_UART0(RT305X_GPIO_MODE_GPIO) |
+ RT305X_GPIO_MODE_I2C |
+ RT305X_GPIO_MODE_SPI |
+ RT305X_GPIO_MODE_JTAG |
+ RT305X_GPIO_MODE_MDIO);
+
+ rt305x_register_flash(0);
+
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_NONE;
+ rt305x_register_ethernet();
+ rt305x_register_wifi();
+ rt305x_register_wdt();
+ rt305x_register_usb();
+}
+
+MIPS_MACHINE(RAMIPS_MACH_CARAMBOLA, "CARAMBOLA", "8devices Carambola",
+ carambola_init);