Commit 1f3b536b authored by Edwin Peer's avatar Edwin Peer Committed by Eric Miao

[ARM] pxa: add support for Embedian MXM-8x10

Signed-off-by: default avatarEdwin Peer <epeer@tmtservices.co.za>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 0dc726bb
...@@ -115,6 +115,11 @@ config MACH_CM_X300 ...@@ -115,6 +115,11 @@ config MACH_CM_X300
select CPU_PXA310 select CPU_PXA310
select HAVE_PWM select HAVE_PWM
config MACH_CAPC7117
bool "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM"
select CPU_PXA320
select PXA3xx
config ARCH_GUMSTIX config ARCH_GUMSTIX
bool "Gumstix XScale 255 boards" bool "Gumstix XScale 255 boards"
select PXA25x select PXA25x
...@@ -511,6 +516,11 @@ config MACH_TOSA ...@@ -511,6 +516,11 @@ config MACH_TOSA
select PXA25x select PXA25x
select PXA_HAVE_BOARD_IRQS select PXA_HAVE_BOARD_IRQS
config MACH_ICONTROL
bool "TMT iControl/SafeTCam based on the MXM-8x10 CoM"
select CPU_PXA320
select PXA3xx
config ARCH_PXA_ESERIES config ARCH_PXA_ESERIES
bool "PXA based Toshiba e-series PDAs" bool "PXA based Toshiba e-series PDAs"
select PXA25x select PXA25x
......
...@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o ...@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o
endif endif
obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o
obj-$(CONFIG_MACH_CM_X300) += cm-x300.o obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
obj-$(CONFIG_MACH_CAPC7117) += capc7117.o mxm8x10.o
obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o
obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
...@@ -82,6 +83,7 @@ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o ...@@ -82,6 +83,7 @@ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
obj-$(CONFIG_MACH_POODLE) += poodle.o obj-$(CONFIG_MACH_POODLE) += poodle.o
obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_TOSA) += tosa.o
obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
obj-$(CONFIG_MACH_E330) += e330.o obj-$(CONFIG_MACH_E330) += e330.o
obj-$(CONFIG_MACH_E350) += e350.o obj-$(CONFIG_MACH_E350) += e350.o
......
/*
* linux/arch/arm/mach-pxa/capc7117.c
*
* Support for the Embedian CAPC-7117 Evaluation Kit
* based on the Embedian MXM-8x10 Computer on Module
*
* Copyright (C) 2009 Embedian Inc.
* Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd.
*
* 2007-09-04: eric miao <eric.y.miao@gmail.com>
* rewrite to align with latest kernel
*
* 2010-01-09: Edwin Peer <epeer@tmtservices.co.za>
* Hennie van der Merwe <hvdmerwe@tmtservices.co.za>
* rework for upstream merge
*
* 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/irq.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/serial_8250.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/pxa320.h>
#include <mach/mxm8x10.h>
#include "generic.h"
/* IDE (PATA) Support */
static struct pata_platform_info pata_platform_data = {
.ioport_shift = 1
};
static struct resource capc7117_ide_resources[] = {
[0] = {
.start = 0x11000020,
.end = 0x1100003f,
.flags = IORESOURCE_MEM
},
[1] = {
.start = 0x1100001c,
.end = 0x1100001c,
.flags = IORESOURCE_MEM
},
[2] = {
.start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)),
.end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)),
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING
}
};
static struct platform_device capc7117_ide_device = {
.name = "pata_platform",
.num_resources = ARRAY_SIZE(capc7117_ide_resources),
.resource = capc7117_ide_resources,
.dev = {
.platform_data = &pata_platform_data,
.coherent_dma_mask = ~0 /* grumble */
}
};
static void __init capc7117_ide_init(void)
{
platform_device_register(&capc7117_ide_device);
}
/* TI16C752 UART support */
#define TI16C752_FLAGS (UPF_BOOT_AUTOCONF | \
UPF_IOREMAP | \
UPF_BUGGY_UART | \
UPF_SKIP_TEST)
#define TI16C752_UARTCLK (22118400)
static struct plat_serial8250_port ti16c752_platform_data[] = {
[0] = {
.mapbase = 0x14000000,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO78)),
.irqflags = IRQF_TRIGGER_RISING,
.flags = TI16C752_FLAGS,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = TI16C752_UARTCLK
},
[1] = {
.mapbase = 0x14000040,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO79)),
.irqflags = IRQF_TRIGGER_RISING,
.flags = TI16C752_FLAGS,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = TI16C752_UARTCLK
},
[2] = {
.mapbase = 0x14000080,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO80)),
.irqflags = IRQF_TRIGGER_RISING,
.flags = TI16C752_FLAGS,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = TI16C752_UARTCLK
},
[3] = {
.mapbase = 0x140000c0,
.irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO81)),
.irqflags = IRQF_TRIGGER_RISING,
.flags = TI16C752_FLAGS,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = TI16C752_UARTCLK
},
[4] = {
/* end of array */
}
};
static struct platform_device ti16c752_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = ti16c752_platform_data
}
};
static void __init capc7117_uarts_init(void)
{
platform_device_register(&ti16c752_device);
}
static void __init capc7117_init(void)
{
/* Init CoM */
mxm_8x10_barebones_init();
/* Init evaluation board peripherals */
mxm_8x10_ac97_init();
mxm_8x10_usb_host_init();
mxm_8x10_mmc_init();
capc7117_uarts_init();
capc7117_ide_init();
}
MACHINE_START(CAPC7117,
"Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM")
.phys_io = 0x40000000,
.boot_params = 0xa0000100,
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
.map_io = pxa_map_io,
.init_irq = pxa3xx_init_irq,
.timer = &pxa_timer,
.init_machine = capc7117_init
MACHINE_END
/*
* linux/arch/arm/mach-pxa/icontrol.c
*
* Support for the iControl and SafeTcam platforms from TMT Services
* using the Embedian MXM-8x10 Computer on Module
*
* Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd.
*
* 2010-01-21 Hennie van der Merve <hvdmerwe@tmtservies.co.za>
*
* 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/irq.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/pxa320.h>
#include <mach/mxm8x10.h>
#include <linux/spi/spi.h>
#include <mach/pxa2xx_spi.h>
#include <linux/can/platform/mcp251x.h>
#include "generic.h"
#define ICONTROL_MCP251x_nCS1 (15)
#define ICONTROL_MCP251x_nCS2 (16)
#define ICONTROL_MCP251x_nCS3 (17)
#define ICONTROL_MCP251x_nCS4 (24)
#define ICONTROL_MCP251x_nIRQ1 (74)
#define ICONTROL_MCP251x_nIRQ2 (75)
#define ICONTROL_MCP251x_nIRQ3 (76)
#define ICONTROL_MCP251x_nIRQ4 (77)
static struct pxa2xx_spi_chip mcp251x_chip_info1 = {
.tx_threshold = 8,
.rx_threshold = 128,
.dma_burst_size = 8,
.timeout = 235,
.gpio_cs = ICONTROL_MCP251x_nCS1
};
static struct pxa2xx_spi_chip mcp251x_chip_info2 = {
.tx_threshold = 8,
.rx_threshold = 128,
.dma_burst_size = 8,
.timeout = 235,
.gpio_cs = ICONTROL_MCP251x_nCS2
};
static struct pxa2xx_spi_chip mcp251x_chip_info3 = {
.tx_threshold = 8,
.rx_threshold = 128,
.dma_burst_size = 8,
.timeout = 235,
.gpio_cs = ICONTROL_MCP251x_nCS3
};
static struct pxa2xx_spi_chip mcp251x_chip_info4 = {
.tx_threshold = 8,
.rx_threshold = 128,
.dma_burst_size = 8,
.timeout = 235,
.gpio_cs = ICONTROL_MCP251x_nCS4
};
static struct mcp251x_platform_data mcp251x_info = {
.oscillator_frequency = 16E6,
.model = CAN_MCP251X_MCP2515,
.board_specific_setup = NULL,
.power_enable = NULL,
.transceiver_enable = NULL
};
static struct spi_board_info mcp251x_board_info[] = {
{
.modalias = "mcp251x",
.max_speed_hz = 6500000,
.bus_num = 3,
.chip_select = 0,
.platform_data = &mcp251x_info,
.controller_data = &mcp251x_chip_info1,
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1)
},
{
.modalias = "mcp251x",
.max_speed_hz = 6500000,
.bus_num = 3,
.chip_select = 1,
.platform_data = &mcp251x_info,
.controller_data = &mcp251x_chip_info2,
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2)
},
{
.modalias = "mcp251x",
.max_speed_hz = 6500000,
.bus_num = 4,
.chip_select = 0,
.platform_data = &mcp251x_info,
.controller_data = &mcp251x_chip_info3,
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3)
},
{
.modalias = "mcp251x",
.max_speed_hz = 6500000,
.bus_num = 4,
.chip_select = 1,
.platform_data = &mcp251x_info,
.controller_data = &mcp251x_chip_info4,
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ4)
}
};
static struct pxa2xx_spi_master pxa_ssp3_spi_master_info = {
.clock_enable = CKEN_SSP3,
.num_chipselect = 2,
.enable_dma = 1
};
static struct pxa2xx_spi_master pxa_ssp4_spi_master_info = {
.clock_enable = CKEN_SSP4,
.num_chipselect = 2,
.enable_dma = 1
};
struct platform_device pxa_spi_ssp3 = {
.name = "pxa2xx-spi",
.id = 3,
.dev = {
.platform_data = &pxa_ssp3_spi_master_info,
}
};
struct platform_device pxa_spi_ssp4 = {
.name = "pxa2xx-spi",
.id = 4,
.dev = {
.platform_data = &pxa_ssp4_spi_master_info,
}
};
static struct platform_device *icontrol_spi_devices[] __initdata = {
&pxa_spi_ssp3,
&pxa_spi_ssp4,
};
static mfp_cfg_t mfp_can_cfg[] __initdata = {
/* CAN CS lines */
GPIO15_GPIO,
GPIO16_GPIO,
GPIO17_GPIO,
GPIO24_GPIO,
/* SPI (SSP3) lines */
GPIO89_SSP3_SCLK,
GPIO91_SSP3_TXD,
GPIO92_SSP3_RXD,
/* SPI (SSP4) lines */
GPIO93_SSP4_SCLK,
GPIO95_SSP4_TXD,
GPIO96_SSP4_RXD,
/* CAN nIRQ lines */
GPIO74_GPIO | MFP_LPM_EDGE_RISE,
GPIO75_GPIO | MFP_LPM_EDGE_RISE,
GPIO76_GPIO | MFP_LPM_EDGE_RISE,
GPIO77_GPIO | MFP_LPM_EDGE_RISE
};
static void __init icontrol_can_init(void)
{
pxa3xx_mfp_config(ARRAY_AND_SIZE(mfp_can_cfg));
platform_add_devices(ARRAY_AND_SIZE(icontrol_spi_devices));
spi_register_board_info(ARRAY_AND_SIZE(mcp251x_board_info));
}
static void __init icontrol_init(void)
{
mxm_8x10_barebones_init();
mxm_8x10_usb_host_init();
mxm_8x10_mmc_init();
icontrol_can_init();
}
MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
.phys_io = 0x40000000,
.boot_params = 0xa0000100,
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
.map_io = pxa_map_io,
.init_irq = pxa3xx_init_irq,
.timer = &pxa_timer,
.init_machine = icontrol_init
MACHINE_END
#ifndef __MACH_MXM_8X10_H
#define __MACH_MXM_8X10_H
#define MXM_8X10_ETH_PHYS 0x13000000
#if defined(CONFIG_MMC)
#define MXM_8X10_SD_nCD (72)
#define MXM_8x10_SD_WP (84)
extern void mxm_8x10_mmc_init(void);
#else
static inline void mxm_8x10_mmc_init(void) {}
#endif
extern void mxm_8x10_usb_host_init(void);
extern void mxm_8x10_ac97_init(void);
extern void mxm_8x10_barebones_init(void);
#endif /* __MACH_MXM_8X10_H */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment