summaryrefslogtreecommitdiff
path: root/target/linux/mx2/files
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-04-10 18:37:34 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-04-10 18:37:34 +0000
commit1d8823ae6163ffde33a3acf0da8f1f1865d05efc (patch)
treea3a5ab8e4a1580e2e5bbfa383a410846d69924b0 /target/linux/mx2/files
parent135c4b8d05fb456aa9a866e585c256fe9d395e31 (diff)
downloadmtk-20170518-1d8823ae6163ffde33a3acf0da8f1f1865d05efc.zip
mtk-20170518-1d8823ae6163ffde33a3acf0da8f1f1865d05efc.tar.gz
mtk-20170518-1d8823ae6163ffde33a3acf0da8f1f1865d05efc.tar.bz2
Add mx2 target with very basic support for the vp6500 voip phone
SVN-Revision: 20786
Diffstat (limited to 'target/linux/mx2/files')
-rw-r--r--target/linux/mx2/files/arch/arm/mach-mx2/mach-vp6500.c128
-rw-r--r--target/linux/mx2/files/arch/arm/plat-mxc/include/mach/board-vp6500.h9
2 files changed, 137 insertions, 0 deletions
diff --git a/target/linux/mx2/files/arch/arm/mach-mx2/mach-vp6500.c b/target/linux/mx2/files/arch/arm/mach-mx2/mach-vp6500.c
new file mode 100644
index 0000000..2032774
--- /dev/null
+++ b/target/linux/mx2/files/arch/arm/mach-mx2/mach-vp6500.c
@@ -0,0 +1,128 @@
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/physmap.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+
+#include <mach/common.h>
+#include <mach/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+#include <asm/mach/map.h>
+#include <mach/imx-uart.h>
+#include <mach/imxfb.h>
+#include <mach/iomux-mx21.h>
+#include <mach/board-vp6500.h>
+
+#include "devices.h"
+
+#include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
+
+static unsigned int vp6500_pins[] = {
+
+ /* UART1 */
+ PE12_PF_UART1_TXD,
+ PE13_PF_UART1_RXD,
+
+#if 0
+ /* LCDC */
+ PA5_PF_LSCLK,
+ PA6_PF_LD0,
+ PA7_PF_LD1,
+ PA8_PF_LD2,
+ PA9_PF_LD3,
+ PA10_PF_LD4,
+ PA11_PF_LD5,
+ PA12_PF_LD6,
+ PA13_PF_LD7,
+ PA14_PF_LD8,
+ PA15_PF_LD9,
+ PA16_PF_LD10,
+ PA17_PF_LD11,
+ PA18_PF_LD12,
+ PA19_PF_LD13,
+ PA20_PF_LD14,
+ PA21_PF_LD15,
+ PA22_PF_LD16,
+ PA28_PF_HSYNC,
+ PA29_PF_VSYNC,
+ PA30_PF_CONTRAST,
+ PA31_PF_OE_ACD,
+#endif
+};
+
+static struct physmap_flash_data vp6500_flash_data = {
+ .width = 2,
+};
+
+static struct resource vp6500_flash_resource = {
+ .start = MX21_CS0_BASE_ADDR,
+ .end = MX21_CS0_BASE_ADDR + SZ_64M - 1,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device vp6500_nor_mtd_device = {
+ .name = "physmap-flash",
+ .id = -1,
+ .dev = {
+ .platform_data = &vp6500_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &vp6500_flash_resource,
+};
+
+static struct gpio_led vp6500_leds[] = {
+ {
+ .name = "vp6500:orange:keypad",
+ .gpio = VP6500_GPIO_KEYPAD_LEDS,
+ },
+};
+
+static struct gpio_led_platform_data vp6500_leds_data = {
+ .leds = vp6500_leds,
+ .num_leds = ARRAY_SIZE(vp6500_leds),
+};
+
+static struct platform_device vp6500_leds_device = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &vp6500_leds_data,
+ },
+};
+
+static struct platform_device *platform_devices[] __initdata = {
+ &vp6500_nor_mtd_device,
+ &vp6500_leds_device,
+};
+
+static void __init vp6500_board_init(void)
+{
+ mxc_gpio_setup_multiple_pins(vp6500_pins, ARRAY_SIZE(vp6500_pins),
+ "vp6500");
+
+ mxc_register_device(&mxc_uart_device0, NULL);
+
+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+}
+
+static void __init vp6500_timer_init(void)
+{
+ mx21_clocks_init(32768, 26000000);
+}
+
+static struct sys_timer vp6500_timer = {
+ .init = vp6500_timer_init,
+};
+
+MACHINE_START(VP6500, "Phillips VP6500")
+ .phys_io = MX21_AIPI_BASE_ADDR,
+ .io_pg_offst = ((MX21_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
+ .boot_params = MX21_PHYS_OFFSET + 0x100,
+ .map_io = mx21_map_io,
+ .init_irq = mx21_init_irq,
+ .init_machine = vp6500_board_init,
+ .timer = &vp6500_timer,
+MACHINE_END
diff --git a/target/linux/mx2/files/arch/arm/plat-mxc/include/mach/board-vp6500.h b/target/linux/mx2/files/arch/arm/plat-mxc/include/mach/board-vp6500.h
new file mode 100644
index 0000000..6c351f0
--- /dev/null
+++ b/target/linux/mx2/files/arch/arm/plat-mxc/include/mach/board-vp6500.h
@@ -0,0 +1,9 @@
+
+#ifndef __BOARD_VP6500__
+#define __BOARD_VP6500__
+
+#define VP6500_GPIO_CAMERA_DIRECTION 45
+#define VP6500_GPIO_KEYPAD_LEDS 82
+#define VP6500_GPIO_AMP_ENABLE 89
+
+#endif