mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
This commit is contained in:
commit
3afdb0f352
159 changed files with 9230 additions and 2195 deletions
|
@ -110,7 +110,7 @@ CONFIG_MMC=y
|
|||
CONFIG_MMC_BLOCK=m
|
||||
CONFIG_MMC_SDHCI=m
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=m
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
|
||||
CONFIG_EXT2_FS=y
|
||||
|
|
|
@ -100,6 +100,7 @@ config MACH_MX25_3DS
|
|||
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMXDI_RTC
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_FB
|
||||
select IMX_HAVE_PLATFORM_IMX_KEYPAD
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
|
@ -238,6 +239,7 @@ config MACH_MX27_3DS
|
|||
select SOC_IMX27
|
||||
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_KEYPAD
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_EHCI
|
||||
|
@ -265,6 +267,7 @@ config MACH_IMX27LITE
|
|||
bool "LogicPD MX27 LITEKIT platform"
|
||||
select SOC_IMX27
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_IMX_SSI
|
||||
help
|
||||
Include support for MX27 LITEKIT platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
@ -300,4 +303,13 @@ config MACH_MXT_TD60
|
|||
Include support for i-MXT (aka td60) platform. This
|
||||
includes specific configurations for the module and its peripherals.
|
||||
|
||||
config MACH_IMX27IPCAM
|
||||
bool "IMX27 IPCAM platform"
|
||||
select SOC_IMX27
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Include support for IMX27 IPCAM platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
endif
|
||||
|
|
|
@ -9,10 +9,10 @@ obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
|
|||
obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
|
||||
obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o
|
||||
|
||||
obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o
|
||||
obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o
|
||||
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o
|
||||
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
|
||||
|
||||
# Support for CMOS sensor interface
|
||||
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
|
||||
|
@ -36,3 +36,4 @@ obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o
|
|||
obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
|
||||
obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
|
||||
obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o
|
||||
obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o
|
||||
|
|
|
@ -592,6 +592,7 @@ static struct clk_lookup lookups[] __initdata = {
|
|||
_REGISTER_CLOCK("imx-uart.2", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
|
||||
_REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk)
|
||||
_REGISTER_CLOCK("imx1-cspi.1", NULL, spi_clk)
|
||||
_REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk)
|
||||
_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
|
||||
_REGISTER_CLOCK(NULL, "mshc", mshc_clk)
|
||||
|
|
|
@ -228,6 +228,7 @@ DEFINE_CLOCK(esdhc1_per_clk, 0, CCM_CGCR0, 3, get_rate_esdhc1, NULL,
|
|||
DEFINE_CLOCK(esdhc2_ahb_clk, 0, CCM_CGCR0, 22, get_rate_esdhc2, NULL, NULL);
|
||||
DEFINE_CLOCK(esdhc2_per_clk, 0, CCM_CGCR0, 4, get_rate_esdhc2, NULL,
|
||||
&esdhc2_ahb_clk);
|
||||
DEFINE_CLOCK(sdma_ahb_clk, 0, CCM_CGCR0, 26, NULL, NULL, NULL);
|
||||
DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL);
|
||||
DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL);
|
||||
DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk);
|
||||
|
@ -253,6 +254,7 @@ DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk);
|
|||
DEFINE_CLOCK(wdt_clk, 0, CCM_CGCR2, 19, get_rate_ipg, NULL, NULL);
|
||||
DEFINE_CLOCK(ssi1_clk, 0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk);
|
||||
DEFINE_CLOCK(ssi2_clk, 1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk);
|
||||
DEFINE_CLOCK(sdma_clk, 0, CCM_CGCR2, 6, get_rate_ipg, NULL, &sdma_ahb_clk);
|
||||
DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGCR1, 13, get_rate_esdhc1, NULL,
|
||||
&esdhc1_per_clk);
|
||||
DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGCR1, 14, get_rate_esdhc2, NULL,
|
||||
|
@ -304,6 +306,7 @@ static struct clk_lookup lookups[] = {
|
|||
_REGISTER_CLOCK(NULL, "audmux", audmux_clk)
|
||||
_REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
|
||||
_REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
|
||||
_REGISTER_CLOCK("imx-sdma", NULL, sdma_clk)
|
||||
};
|
||||
|
||||
int __init mx25_clocks_init(void)
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#include <mach/mx1.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
extern const struct imx_imx_fb_data imx1_imx_fb_data __initconst;
|
||||
#define imx1_add_imx_fb(pdata) \
|
||||
imx_add_imx_fb(&imx1_imx_fb_data, pdata)
|
||||
|
||||
extern const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst;
|
||||
#define imx1_add_imx_i2c(pdata) \
|
||||
imx_add_imx_i2c(&imx1_imx_i2c_data, pdata)
|
||||
|
@ -18,3 +22,10 @@ extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst;
|
|||
imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata)
|
||||
#define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata)
|
||||
#define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata)
|
||||
|
||||
extern const struct imx_spi_imx_data imx1_cspi_data[] __initconst;
|
||||
#define imx1_add_cspi(id, pdata) \
|
||||
imx_add_spi_imx(&imx1_cspi_data[id], pdata)
|
||||
|
||||
#define imx1_add_spi_imx0(pdata) imx1_add_cspi(0, pdata)
|
||||
#define imx1_add_spi_imx1(pdata) imx1_add_cspi(1, pdata)
|
||||
|
|
|
@ -81,7 +81,11 @@ imx25_sdhci_esdhc_imx_data[] __initconst;
|
|||
|
||||
extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst;
|
||||
#define imx25_add_spi_imx(id, pdata) \
|
||||
imx_add_spi_imx(&imx25_spi_imx_data[id], pdata)
|
||||
imx_add_spi_imx(&imx25_cspi_data[id], pdata)
|
||||
#define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata)
|
||||
#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata)
|
||||
#define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
|
||||
|
||||
extern struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst;
|
||||
#define imx25_add_mxc_pwm(id) \
|
||||
imx_add_mxc_pwm(&imx25_mxc_pwm_data[id])
|
||||
|
|
|
@ -699,7 +699,7 @@ int imx_dma_request(int channel, const char *name)
|
|||
local_irq_restore(flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
memset(imxdma, 0, sizeof(imxdma));
|
||||
memset(imxdma, 0, sizeof(*imxdma));
|
||||
imxdma->name = name;
|
||||
local_irq_restore(flags); /* request_irq() can block */
|
||||
|
||||
|
|
80
arch/arm/mach-imx/ehci-imx25.c
Normal file
80
arch/arm/mach-imx/ehci-imx25.c
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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 <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#define USBCTRL_OTGBASE_OFFSET 0x600
|
||||
|
||||
#define MX25_OTG_SIC_SHIFT 29
|
||||
#define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT)
|
||||
#define MX25_OTG_PM_BIT (1 << 24)
|
||||
|
||||
#define MX25_H1_SIC_SHIFT 21
|
||||
#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)
|
||||
#define MX25_H1_PM_BIT (1 << 8)
|
||||
#define MX25_H1_IPPUE_UP_BIT (1 << 7)
|
||||
#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)
|
||||
#define MX25_H1_TLL_BIT (1 << 5)
|
||||
#define MX25_H1_USBTE_BIT (1 << 4)
|
||||
|
||||
int mx25_initialize_usb_hw(int port, unsigned int flags)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
v = readl(MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
switch (port) {
|
||||
case 0: /* OTG port */
|
||||
v &= ~(MX25_OTG_SIC_MASK | MX25_OTG_PM_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_OTG_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX25_OTG_PM_BIT;
|
||||
|
||||
break;
|
||||
case 1: /* H1 port */
|
||||
v &= ~(MX25_H1_SIC_MASK | MX25_H1_PM_BIT | MX25_H1_TLL_BIT |
|
||||
MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT | MX25_H1_IPPUE_UP_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_H1_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX25_H1_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX25_H1_TLL_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_INTERNAL_PHY)
|
||||
v |= MX25_H1_USBTE_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_IPPUE_DOWN)
|
||||
v |= MX25_H1_IPPUE_DOWN_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_IPPUE_UP)
|
||||
v |= MX25_H1_IPPUE_UP_BIT;
|
||||
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(v, MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
82
arch/arm/mach-imx/ehci-imx27.c
Normal file
82
arch/arm/mach-imx/ehci-imx27.c
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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 <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#define USBCTRL_OTGBASE_OFFSET 0x600
|
||||
|
||||
#define MX27_OTG_SIC_SHIFT 29
|
||||
#define MX27_OTG_SIC_MASK (0x3 << MX27_OTG_SIC_SHIFT)
|
||||
#define MX27_OTG_PM_BIT (1 << 24)
|
||||
|
||||
#define MX27_H2_SIC_SHIFT 21
|
||||
#define MX27_H2_SIC_MASK (0x3 << MX27_H2_SIC_SHIFT)
|
||||
#define MX27_H2_PM_BIT (1 << 16)
|
||||
#define MX27_H2_DT_BIT (1 << 5)
|
||||
|
||||
#define MX27_H1_SIC_SHIFT 13
|
||||
#define MX27_H1_SIC_MASK (0x3 << MX27_H1_SIC_SHIFT)
|
||||
#define MX27_H1_PM_BIT (1 << 8)
|
||||
#define MX27_H1_DT_BIT (1 << 4)
|
||||
|
||||
int mx27_initialize_usb_hw(int port, unsigned int flags)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
v = readl(MX27_IO_ADDRESS(MX27_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
switch (port) {
|
||||
case 0: /* OTG port */
|
||||
v &= ~(MX27_OTG_SIC_MASK | MX27_OTG_PM_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_OTG_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX27_OTG_PM_BIT;
|
||||
break;
|
||||
case 1: /* H1 port */
|
||||
v &= ~(MX27_H1_SIC_MASK | MX27_H1_PM_BIT | MX27_H1_DT_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_H1_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX27_H1_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX27_H1_DT_BIT;
|
||||
|
||||
break;
|
||||
case 2: /* H2 port */
|
||||
v &= ~(MX27_H2_SIC_MASK | MX27_H2_PM_BIT | MX27_H2_DT_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX27_H2_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX27_H2_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX27_H2_DT_BIT;
|
||||
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(v, MX27_IO_ADDRESS(MX27_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
|||
|
||||
#define ADS7846_PENDOWN (GPIO_PORTD | 25)
|
||||
|
||||
static void ads7846_dev_init(void)
|
||||
static void __maybe_unused ads7846_dev_init(void)
|
||||
{
|
||||
if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
|
||||
printk(KERN_ERR "can't get ads746 pen down GPIO\n");
|
||||
|
@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
|
|||
.keep_vref_on = 1,
|
||||
};
|
||||
|
||||
static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
|
||||
static struct spi_board_info __maybe_unused
|
||||
eukrea_mbimx27_spi_board_info[] __initdata = {
|
||||
[0] = {
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 0,
|
||||
|
@ -357,13 +358,11 @@ void __init eukrea_mbimx27_baseboard_init(void)
|
|||
ads7846_dev_init();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
/* SPI_CS0 init */
|
||||
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
|
||||
imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
|
||||
spi_register_board_info(eukrea_mbimx27_spi_board_info,
|
||||
ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
|
||||
#endif
|
||||
|
||||
/* Leds configuration */
|
||||
mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
|
||||
|
|
|
@ -209,17 +209,25 @@ static struct platform_device serial_device = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int eukrea_cpuimx27_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = eukrea_cpuimx27_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx27_usbh2_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = eukrea_cpuimx27_usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -273,21 +281,19 @@ static void __init eukrea_cpuimx27_init(void)
|
|||
platform_device_register(&serial_device);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (otg_pdata.otg)
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
} else {
|
||||
imx27_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
}
|
||||
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
if (!otg_mode_host)
|
||||
imx27_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
|
||||
#ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD
|
||||
eukrea_mbimx27_baseboard_init();
|
||||
|
@ -304,9 +310,10 @@ static struct sys_timer eukrea_cpuimx27_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = eukrea_cpuimx27_init,
|
||||
.timer = &eukrea_cpuimx27_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &eukrea_cpuimx27_timer,
|
||||
.init_machine = eukrea_cpuimx27_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -84,15 +84,25 @@ static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx25_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data otg_pdata __initconst = {
|
||||
.init = eukrea_cpuimx25_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx25_usbh2_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
|
||||
.init = eukrea_cpuimx25_usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
|
||||
MXC_EHCI_IPPUE_DOWN,
|
||||
};
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
|
@ -153,9 +163,10 @@ static struct sys_timer eukrea_cpuimx25_timer = {
|
|||
|
||||
MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25")
|
||||
/* Maintainer: Eukrea Electromatique */
|
||||
.boot_params = MX25_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx25_map_io,
|
||||
.init_irq = mx25_init_irq,
|
||||
.init_machine = eukrea_cpuimx25_init,
|
||||
.timer = &eukrea_cpuimx25_timer,
|
||||
.boot_params = MX25_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx25_map_io,
|
||||
.init_early = imx25_init_early,
|
||||
.init_irq = mx25_init_irq,
|
||||
.timer = &eukrea_cpuimx25_timer,
|
||||
.init_machine = eukrea_cpuimx25_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
@ -66,6 +67,11 @@ static const int visstrim_m10_pins[] __initconst = {
|
|||
PD15_AOUT_FEC_COL,
|
||||
PD16_AIN_FEC_TX_ER,
|
||||
PF23_AIN_FEC_TX_EN,
|
||||
/* SSI1 */
|
||||
PC20_PF_SSI1_FS,
|
||||
PC21_PF_SSI1_RXD,
|
||||
PC22_PF_SSI1_TXD,
|
||||
PC23_PF_SSI1_CLK,
|
||||
/* SDHC1 */
|
||||
PE18_PF_SD1_D0,
|
||||
PE19_PF_SD1_D1,
|
||||
|
@ -204,20 +210,30 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
|
|||
I2C_BOARD_INFO("pca9555", 0x20),
|
||||
.platform_data = &visstrim_m10_pca9555_pdata,
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("tlv320aic32x4", 0x18),
|
||||
}
|
||||
};
|
||||
|
||||
/* USB OTG */
|
||||
static int otg_phy_init(struct platform_device *pdev)
|
||||
{
|
||||
gpio_set_value(OTG_PHY_CS_GPIO, 0);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data
|
||||
visstrim_m10_usbotg_pdata __initconst = {
|
||||
.init = otg_phy_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
|
||||
/* SSI */
|
||||
static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = {
|
||||
.flags = IMX_SSI_DMA | IMX_SSI_SYN,
|
||||
};
|
||||
|
||||
static void __init visstrim_m10_board_init(void)
|
||||
|
@ -229,6 +245,7 @@ static void __init visstrim_m10_board_init(void)
|
|||
if (ret)
|
||||
pr_err("Failed to setup pins (%d)\n", ret);
|
||||
|
||||
imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata);
|
||||
imx27_add_imx_uart0(&uart_pdata);
|
||||
|
||||
i2c_register_board_info(0, visstrim_m10_i2c_devices,
|
||||
|
@ -251,9 +268,10 @@ static struct sys_timer visstrim_m10_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = visstrim_m10_board_init,
|
||||
.timer = &visstrim_m10_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &visstrim_m10_timer,
|
||||
.init_machine = visstrim_m10_board_init,
|
||||
MACHINE_END
|
||||
|
|
78
arch/arm/mach-imx/mach-imx27ipcam.c
Normal file
78
arch/arm/mach-imx/mach-imx27ipcam.c
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
*
|
||||
* Author: Fabio Estevam <fabio.estevam@freescale.com>
|
||||
*
|
||||
* 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 <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/iomux-mx27.h>
|
||||
|
||||
#include "devices-imx27.h"
|
||||
|
||||
static const int mx27ipcam_pins[] __initconst = {
|
||||
/* UART1 */
|
||||
PE12_PF_UART1_TXD,
|
||||
PE13_PF_UART1_RXD,
|
||||
/* FEC */
|
||||
PD0_AIN_FEC_TXD0,
|
||||
PD1_AIN_FEC_TXD1,
|
||||
PD2_AIN_FEC_TXD2,
|
||||
PD3_AIN_FEC_TXD3,
|
||||
PD4_AOUT_FEC_RX_ER,
|
||||
PD5_AOUT_FEC_RXD1,
|
||||
PD6_AOUT_FEC_RXD2,
|
||||
PD7_AOUT_FEC_RXD3,
|
||||
PD8_AF_FEC_MDIO,
|
||||
PD9_AIN_FEC_MDC,
|
||||
PD10_AOUT_FEC_CRS,
|
||||
PD11_AOUT_FEC_TX_CLK,
|
||||
PD12_AOUT_FEC_RXD0,
|
||||
PD13_AOUT_FEC_RX_DV,
|
||||
PD14_AOUT_FEC_RX_CLK,
|
||||
PD15_AOUT_FEC_COL,
|
||||
PD16_AIN_FEC_TX_ER,
|
||||
PF23_AIN_FEC_TX_EN,
|
||||
};
|
||||
|
||||
static void __init mx27ipcam_init(void)
|
||||
{
|
||||
mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins),
|
||||
"mx27ipcam");
|
||||
|
||||
imx27_add_imx_uart0(NULL);
|
||||
imx27_add_fec(NULL);
|
||||
imx27_add_imx2_wdt(NULL);
|
||||
}
|
||||
|
||||
static void __init mx27ipcam_timer_init(void)
|
||||
{
|
||||
mx27_clocks_init(25000000);
|
||||
}
|
||||
|
||||
static struct sys_timer mx27ipcam_timer = {
|
||||
.init = mx27ipcam_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
|
||||
/* maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &mx27ipcam_timer,
|
||||
.init_machine = mx27ipcam_init,
|
||||
MACHINE_END
|
|
@ -75,9 +75,10 @@ static struct sys_timer mx27lite_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = mx27lite_init,
|
||||
.timer = &mx27lite_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &mx27lite_timer,
|
||||
.init_machine = mx27lite_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -144,17 +144,19 @@ struct sys_timer mx1ads_timer = {
|
|||
|
||||
MACHINE_START(MX1ADS, "Freescale MX1ADS")
|
||||
/* Maintainer: Sascha Hauer, Pengutronix */
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &mx1ads_timer,
|
||||
.init_machine = mx1ads_init,
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_early = imx1_init_early,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &mx1ads_timer,
|
||||
.init_machine = mx1ads_init,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(MXLADS, "Freescale MXLADS")
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &mx1ads_timer,
|
||||
.init_machine = mx1ads_init,
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_early = imx1_init_early,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &mx1ads_timer,
|
||||
.init_machine = mx1ads_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -304,9 +304,10 @@ static struct sys_timer mx21ads_timer = {
|
|||
|
||||
MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
|
||||
/* maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX21_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx21ads_map_io,
|
||||
.init_irq = mx21_init_irq,
|
||||
.init_machine = mx21ads_board_init,
|
||||
.timer = &mx21ads_timer,
|
||||
.boot_params = MX21_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx21ads_map_io,
|
||||
.init_early = imx21_init_early,
|
||||
.init_irq = mx21_init_irq,
|
||||
.timer = &mx21ads_timer,
|
||||
.init_machine = mx21ads_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -103,14 +103,18 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
|
|||
MX25_PAD_SD1_DATA1__SD1_DATA1,
|
||||
MX25_PAD_SD1_DATA2__SD1_DATA2,
|
||||
MX25_PAD_SD1_DATA3__SD1_DATA3,
|
||||
|
||||
/* I2C1 */
|
||||
MX25_PAD_I2C1_CLK__I2C1_CLK,
|
||||
MX25_PAD_I2C1_DAT__I2C1_DAT,
|
||||
};
|
||||
|
||||
static const struct fec_platform_data mx25_fec_pdata __initconst = {
|
||||
.phy = PHY_INTERFACE_MODE_RMII,
|
||||
};
|
||||
|
||||
#define FEC_ENABLE_GPIO 35
|
||||
#define FEC_RESET_B_GPIO 104
|
||||
#define FEC_ENABLE_GPIO IMX_GPIO_NR(2, 3)
|
||||
#define FEC_RESET_B_GPIO IMX_GPIO_NR(4, 8)
|
||||
|
||||
static void __init mx25pdk_fec_reset(void)
|
||||
{
|
||||
|
@ -185,9 +189,14 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = {
|
|||
.keymap_size = ARRAY_SIZE(mx25pdk_keymap),
|
||||
};
|
||||
|
||||
static int mx25pdk_usbh2_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
|
||||
.init = mx25pdk_usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
|
@ -195,6 +204,10 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
|||
.phy_mode = FSL_USB2_PHY_UTMI,
|
||||
};
|
||||
|
||||
static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
static void __init mx25pdk_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
|
||||
|
@ -213,6 +226,7 @@ static void __init mx25pdk_init(void)
|
|||
imx25_add_imx_keypad(&mx25pdk_keymap_data);
|
||||
|
||||
imx25_add_sdhci_esdhc_imx(0, NULL);
|
||||
imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
|
||||
}
|
||||
|
||||
static void __init mx25pdk_timer_init(void)
|
||||
|
@ -226,10 +240,10 @@ static struct sys_timer mx25pdk_timer = {
|
|||
|
||||
MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
|
||||
/* Maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX25_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx25_map_io,
|
||||
.init_irq = mx25_init_irq,
|
||||
.init_machine = mx25pdk_init,
|
||||
.timer = &mx25pdk_timer,
|
||||
.boot_params = MX25_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx25_map_io,
|
||||
.init_early = imx25_init_early,
|
||||
.init_irq = mx25_init_irq,
|
||||
.timer = &mx25pdk_timer,
|
||||
.init_machine = mx25pdk_init,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -98,6 +98,9 @@ static const int mx27pdk_pins[] __initconst = {
|
|||
PD22_PF_CSPI2_SCLK,
|
||||
PD23_PF_CSPI2_MISO,
|
||||
PD24_PF_CSPI2_MOSI,
|
||||
/* I2C1 */
|
||||
PD17_PF_I2C_DATA,
|
||||
PD18_PF_I2C_CLK,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
|
@ -159,13 +162,15 @@ static int otg_phy_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int mx27_3ds_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = mx27_3ds_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -216,7 +221,7 @@ static struct regulator_init_data vgen_init = {
|
|||
.consumer_supplies = vgen_consumers,
|
||||
};
|
||||
|
||||
static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
|
||||
static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
|
||||
{
|
||||
.id = MC13783_REG_VMMC1,
|
||||
.init_data = &vmmc1_init,
|
||||
|
@ -227,10 +232,10 @@ static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
|
|||
};
|
||||
|
||||
/* MC13783 */
|
||||
static struct mc13783_platform_data mc13783_pdata __initdata = {
|
||||
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
|
||||
.regulators = mx27_3ds_regulators,
|
||||
.num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
|
||||
.flags = MC13783_USE_REGULATOR,
|
||||
.flags = MC13XXX_USE_REGULATOR,
|
||||
};
|
||||
|
||||
/* SPI */
|
||||
|
@ -253,6 +258,9 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
static void __init mx27pdk_init(void)
|
||||
{
|
||||
|
@ -265,14 +273,15 @@ static void __init mx27pdk_init(void)
|
|||
imx27_add_mxc_mmc(0, &sdhc1_pdata);
|
||||
imx27_add_imx2_wdt(NULL);
|
||||
otg_phy_init();
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
if (otg_pdata.otg)
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!otg_mode_host)
|
||||
imx27_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
|
||||
|
@ -282,6 +291,7 @@ static void __init mx27pdk_init(void)
|
|||
|
||||
if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT))
|
||||
pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n");
|
||||
imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data);
|
||||
}
|
||||
|
||||
static void __init mx27pdk_timer_init(void)
|
||||
|
@ -295,9 +305,10 @@ static struct sys_timer mx27pdk_timer = {
|
|||
|
||||
MACHINE_START(MX27_3DS, "Freescale MX27PDK")
|
||||
/* maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = mx27pdk_init,
|
||||
.timer = &mx27pdk_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &mx27pdk_timer,
|
||||
.init_machine = mx27pdk_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -344,9 +344,10 @@ static void __init mx27ads_map_io(void)
|
|||
|
||||
MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
|
||||
/* maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27ads_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = mx27ads_board_init,
|
||||
.timer = &mx27ads_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27ads_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &mx27ads_timer,
|
||||
.init_machine = mx27ads_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -266,10 +266,10 @@ static struct sys_timer mxt_td60_timer = {
|
|||
|
||||
MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
|
||||
/* maintainer: Maxtrack Industrial */
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = mxt_td60_board_init,
|
||||
.timer = &mxt_td60_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &mxt_td60_timer,
|
||||
.init_machine = mxt_td60_board_init,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -187,7 +187,6 @@ static struct i2c_board_info pca100_i2c_devices[] = {
|
|||
}
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
static struct spi_eeprom at25320 = {
|
||||
.name = "at25320an",
|
||||
.byte_len = 4096,
|
||||
|
@ -211,7 +210,6 @@ static const struct spi_imx_master pca100_spi0_data __initconst = {
|
|||
.chipselect = pca100_spi_cs,
|
||||
.num_chipselect = ARRAY_SIZE(pca100_spi_cs),
|
||||
};
|
||||
#endif
|
||||
|
||||
static void pca100_ac97_warm_reset(struct snd_ac97 *ac97)
|
||||
{
|
||||
|
@ -269,31 +267,33 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
|
|||
.exit = pca100_sdhc2_exit,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int otg_phy_init(struct platform_device *pdev)
|
||||
{
|
||||
gpio_set_value(OTG_PHY_CS_GPIO, 0);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = otg_phy_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int usbh2_phy_init(struct platform_device *pdev)
|
||||
{
|
||||
gpio_set_value(USBH2_PHY_CS_GPIO, 0);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = usbh2_phy_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -389,36 +389,33 @@ static void __init pca100_init(void)
|
|||
|
||||
imx27_add_imx_i2c(1, &pca100_i2c1_data);
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN);
|
||||
mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN);
|
||||
spi_register_board_info(pca100_spi_board_info,
|
||||
ARRAY_SIZE(pca100_spi_board_info));
|
||||
imx27_add_spi_imx0(&pca100_spi0_data);
|
||||
#endif
|
||||
|
||||
gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs");
|
||||
gpio_direction_output(OTG_PHY_CS_GPIO, 1);
|
||||
gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs");
|
||||
gpio_direction_output(USBH2_PHY_CS_GPIO, 1);
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
if (otg_pdata.otg)
|
||||
imx27_add_mxc_ehci_otg(&otg_pdata);
|
||||
} else {
|
||||
gpio_set_value(OTG_PHY_CS_GPIO, 0);
|
||||
imx27_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
}
|
||||
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
if (!otg_mode_host) {
|
||||
gpio_set_value(OTG_PHY_CS_GPIO, 0);
|
||||
imx27_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
}
|
||||
if (usbh2_pdata.otg)
|
||||
imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
|
||||
imx27_add_imx_fb(&pca100_fb_data);
|
||||
|
||||
|
@ -437,10 +434,10 @@ static struct sys_timer pca100_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(PCA100, "phyCARD-i.MX27")
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = pca100_init,
|
||||
.timer = &pca100_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = pca100_init,
|
||||
.timer = &pca100_timer,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ static struct regulator_init_data cam_data = {
|
|||
.consumer_supplies = cam_consumers,
|
||||
};
|
||||
|
||||
static struct mc13783_regulator_init_data pcm038_regulators[] = {
|
||||
static struct mc13xxx_regulator_init_data pcm038_regulators[] = {
|
||||
{
|
||||
.id = MC13783_REG_VCAM,
|
||||
.init_data = &cam_data,
|
||||
|
@ -262,11 +262,11 @@ static struct mc13783_regulator_init_data pcm038_regulators[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct mc13783_platform_data pcm038_pmic = {
|
||||
static struct mc13xxx_platform_data pcm038_pmic = {
|
||||
.regulators = pcm038_regulators,
|
||||
.num_regulators = ARRAY_SIZE(pcm038_regulators),
|
||||
.flags = MC13783_USE_ADC | MC13783_USE_REGULATOR |
|
||||
MC13783_USE_TOUCHSCREEN,
|
||||
.flags = MC13XXX_USE_ADC | MC13XXX_USE_REGULATOR |
|
||||
MC13XXX_USE_TOUCHSCREEN,
|
||||
};
|
||||
|
||||
static struct spi_board_info pcm038_spi_board_info[] __initdata = {
|
||||
|
@ -281,9 +281,15 @@ static struct spi_board_info pcm038_spi_board_info[] __initdata = {
|
|||
}
|
||||
};
|
||||
|
||||
static int pcm038_usbh2_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
|
||||
.init = pcm038_usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static void __init pcm038_init(void)
|
||||
|
@ -340,9 +346,10 @@ static struct sys_timer pcm038_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(PCM038, "phyCORE-i.MX27")
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = pcm038_init,
|
||||
.timer = &pcm038_timer,
|
||||
.boot_params = MX27_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.timer = &pcm038_timer,
|
||||
.init_machine = pcm038_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -145,10 +145,11 @@ static struct sys_timer scb9328_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(SCB9328, "Synertronixx scb9328")
|
||||
/* Sascha Hauer */
|
||||
.boot_params = 0x08000100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &scb9328_timer,
|
||||
.init_machine = scb9328_init,
|
||||
/* Sascha Hauer */
|
||||
.boot_params = 0x08000100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_early = imx1_init_early,
|
||||
.init_irq = mx1_init_irq,
|
||||
.timer = &scb9328_timer,
|
||||
.init_machine = scb9328_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/iomux-v1.h>
|
||||
|
||||
static struct map_desc imx_io_desc[] __initdata = {
|
||||
imx_map_entry(MX1, IO, MT_DEVICE),
|
||||
|
@ -30,16 +33,26 @@ static struct map_desc imx_io_desc[] __initdata = {
|
|||
|
||||
void __init mx1_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX1);
|
||||
mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
|
||||
|
||||
iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
|
||||
}
|
||||
|
||||
int imx1_register_gpios(void);
|
||||
void __init imx1_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX1);
|
||||
mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
|
||||
imx_iomuxv1_init(MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
|
||||
MX1_NUM_GPIO_PORT);
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx1_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 0, 1, MX1_GPIO_INT_PORTA),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 1, 2, MX1_GPIO_INT_PORTB),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 2, 3, MX1_GPIO_INT_PORTC),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX1, 3, 4, MX1_GPIO_INT_PORTD),
|
||||
};
|
||||
|
||||
void __init mx1_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR));
|
||||
imx1_register_gpios();
|
||||
mxc_gpio_init(imx1_gpio_ports, ARRAY_SIZE(imx1_gpio_ports));
|
||||
}
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
#include <mach/common.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/iomux-v1.h>
|
||||
|
||||
/* MX21 memory map definition */
|
||||
static struct map_desc imx21_io_desc[] __initdata = {
|
||||
|
@ -56,16 +59,28 @@ static struct map_desc imx21_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mx21_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX21);
|
||||
mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
|
||||
|
||||
iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
|
||||
}
|
||||
|
||||
int imx21_register_gpios(void);
|
||||
void __init imx21_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX21);
|
||||
mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
|
||||
imx_iomuxv1_init(MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR),
|
||||
MX21_NUM_GPIO_PORT);
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx21_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX21, 0, 1, MX21_INT_GPIO),
|
||||
DEFINE_IMX_GPIO_PORT(MX21, 1, 2),
|
||||
DEFINE_IMX_GPIO_PORT(MX21, 2, 3),
|
||||
DEFINE_IMX_GPIO_PORT(MX21, 3, 4),
|
||||
DEFINE_IMX_GPIO_PORT(MX21, 4, 5),
|
||||
DEFINE_IMX_GPIO_PORT(MX21, 5, 6),
|
||||
};
|
||||
|
||||
void __init mx21_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR));
|
||||
imx21_register_gpios();
|
||||
mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <mach/hardware.h>
|
||||
#include <mach/mx25.h>
|
||||
#include <mach/iomux-v3.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/*
|
||||
* This table defines static virtual address mappings for I/O regions.
|
||||
|
@ -45,18 +47,26 @@ static struct map_desc mx25_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mx25_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX25);
|
||||
mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
|
||||
|
||||
iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
|
||||
}
|
||||
|
||||
int imx25_register_gpios(void);
|
||||
void __init imx25_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX25);
|
||||
mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx25_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX25, 0, 1, MX25_INT_GPIO1),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX25, 1, 2, MX25_INT_GPIO2),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX25, 2, 3, MX25_INT_GPIO3),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX25, 3, 4, MX25_INT_GPIO4),
|
||||
};
|
||||
|
||||
void __init mx25_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR));
|
||||
imx25_register_gpios();
|
||||
mxc_gpio_init(imx25_gpio_ports, ARRAY_SIZE(imx25_gpio_ports));
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
#include <mach/common.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/iomux-v1.h>
|
||||
|
||||
/* MX27 memory map definition */
|
||||
static struct map_desc imx27_io_desc[] __initdata = {
|
||||
|
@ -56,16 +59,28 @@ static struct map_desc imx27_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mx27_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX27);
|
||||
mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
|
||||
|
||||
iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
|
||||
}
|
||||
|
||||
int imx27_register_gpios(void);
|
||||
void __init imx27_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX27);
|
||||
mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
|
||||
imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR),
|
||||
MX27_NUM_GPIO_PORT);
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx27_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, 1, MX27_INT_GPIO),
|
||||
DEFINE_IMX_GPIO_PORT(MX27, 1, 2),
|
||||
DEFINE_IMX_GPIO_PORT(MX27, 2, 3),
|
||||
DEFINE_IMX_GPIO_PORT(MX27, 3, 4),
|
||||
DEFINE_IMX_GPIO_PORT(MX27, 4, 5),
|
||||
DEFINE_IMX_GPIO_PORT(MX27, 5, 6),
|
||||
};
|
||||
|
||||
void __init mx27_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR));
|
||||
imx27_register_gpios();
|
||||
mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports));
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ config MACH_MX31_3DS
|
|||
select MXC_DEBUG_BOARD
|
||||
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_KEYPAD
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_EHCI
|
||||
|
@ -183,6 +184,7 @@ config MACH_MX35_3DS
|
|||
select MXC_DEBUG_BOARD
|
||||
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_EHCI
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
|
@ -199,6 +201,15 @@ config MACH_KZM_ARM11_01
|
|||
Include support for KZM-ARM11-01. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_BUG
|
||||
bool "Support Buglabs BUGBase platform"
|
||||
select SOC_IMX31
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
default y
|
||||
help
|
||||
Include support for BUGBase 1.3 platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_EUKREA_CPUIMX35
|
||||
bool "Support Eukrea CPUIMX35 Platform"
|
||||
select SOC_IMX35
|
||||
|
@ -229,4 +240,18 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD
|
|||
|
||||
endchoice
|
||||
|
||||
config MACH_VPR200
|
||||
bool "Support VPR200 platform"
|
||||
select SOC_IMX35
|
||||
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_MXC_EHCI
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
help
|
||||
Include support for VPR200 platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
endif
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# Object file lists.
|
||||
|
||||
obj-y := mm.o devices.o cpu.o
|
||||
obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o
|
||||
obj-$(CONFIG_SOC_IMX35) += clock-imx35.o
|
||||
obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o ehci-imx31.o
|
||||
obj-$(CONFIG_SOC_IMX35) += clock-imx35.o ehci-imx35.o
|
||||
obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
|
||||
obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
|
||||
obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
|
||||
|
@ -20,5 +20,7 @@ obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
|
|||
obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
|
||||
obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
|
||||
obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o
|
||||
obj-$(CONFIG_MACH_BUG) += mach-bug.o
|
||||
obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o
|
||||
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd-baseboard.o
|
||||
obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
|
||||
|
|
|
@ -35,7 +35,7 @@ extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst;
|
|||
#define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata)
|
||||
|
||||
extern const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst;
|
||||
#define imx31_add_imx_keypad(pdata) \
|
||||
#define imx35_add_imx_keypad(pdata) \
|
||||
imx_add_imx_keypad(&imx35_imx_keypad_data, pdata)
|
||||
|
||||
extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst;
|
||||
|
|
83
arch/arm/mach-mx3/ehci-imx31.c
Normal file
83
arch/arm/mach-mx3/ehci-imx31.c
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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 <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#define USBCTRL_OTGBASE_OFFSET 0x600
|
||||
|
||||
#define MX31_OTG_SIC_SHIFT 29
|
||||
#define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
|
||||
#define MX31_OTG_PM_BIT (1 << 24)
|
||||
|
||||
#define MX31_H2_SIC_SHIFT 21
|
||||
#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT)
|
||||
#define MX31_H2_PM_BIT (1 << 16)
|
||||
#define MX31_H2_DT_BIT (1 << 5)
|
||||
|
||||
#define MX31_H1_SIC_SHIFT 13
|
||||
#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
|
||||
#define MX31_H1_PM_BIT (1 << 8)
|
||||
#define MX31_H1_DT_BIT (1 << 4)
|
||||
|
||||
int mx31_initialize_usb_hw(int port, unsigned int flags)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
v = readl(MX31_IO_ADDRESS(MX31_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
switch (port) {
|
||||
case 0: /* OTG port */
|
||||
v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_OTG_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX31_OTG_PM_BIT;
|
||||
|
||||
break;
|
||||
case 1: /* H1 port */
|
||||
v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H1_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX31_H1_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX31_H1_DT_BIT;
|
||||
|
||||
break;
|
||||
case 2: /* H2 port */
|
||||
v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H2_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX31_H2_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX31_H2_DT_BIT;
|
||||
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(v, MX31_IO_ADDRESS(MX31_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
80
arch/arm/mach-mx3/ehci-imx35.c
Normal file
80
arch/arm/mach-mx3/ehci-imx35.c
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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 <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#define USBCTRL_OTGBASE_OFFSET 0x600
|
||||
|
||||
#define MX35_OTG_SIC_SHIFT 29
|
||||
#define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT)
|
||||
#define MX35_OTG_PM_BIT (1 << 24)
|
||||
|
||||
#define MX35_H1_SIC_SHIFT 21
|
||||
#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)
|
||||
#define MX35_H1_PM_BIT (1 << 8)
|
||||
#define MX35_H1_IPPUE_UP_BIT (1 << 7)
|
||||
#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)
|
||||
#define MX35_H1_TLL_BIT (1 << 5)
|
||||
#define MX35_H1_USBTE_BIT (1 << 4)
|
||||
|
||||
int mx35_initialize_usb_hw(int port, unsigned int flags)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
switch (port) {
|
||||
case 0: /* OTG port */
|
||||
v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_OTG_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX35_OTG_PM_BIT;
|
||||
|
||||
break;
|
||||
case 1: /* H1 port */
|
||||
v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT |
|
||||
MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT);
|
||||
v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_H1_SIC_SHIFT;
|
||||
|
||||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
|
||||
v |= MX35_H1_PM_BIT;
|
||||
|
||||
if (!(flags & MXC_EHCI_TTL_ENABLED))
|
||||
v |= MX35_H1_TLL_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_INTERNAL_PHY)
|
||||
v |= MX35_H1_USBTE_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_IPPUE_DOWN)
|
||||
v |= MX35_H1_IPPUE_DOWN_BIT;
|
||||
|
||||
if (flags & MXC_EHCI_IPPUE_UP)
|
||||
v |= MX35_H1_IPPUE_UP_BIT;
|
||||
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(v, MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -165,8 +165,8 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
|
|||
MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
|
||||
};
|
||||
|
||||
#define GPIO_LED1 (2 * 32 + 29)
|
||||
#define GPIO_SWITCH1 (2 * 32 + 25)
|
||||
#define GPIO_LED1 IMX_GPIO_NR(3, 29)
|
||||
#define GPIO_SWITCH1 IMX_GPIO_NR(3, 25)
|
||||
#define GPIO_LCDPWR (4)
|
||||
|
||||
static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd,
|
||||
|
|
|
@ -97,7 +97,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad);
|
|||
* - reserves the pin so that it is not claimed by another driver
|
||||
* - setups the iomux according to the configuration
|
||||
*/
|
||||
int mxc_iomux_alloc_pin(const unsigned int pin, const char *label)
|
||||
int mxc_iomux_alloc_pin(unsigned int pin, const char *label)
|
||||
{
|
||||
unsigned pad = pin & IOMUX_PADNUM_MASK;
|
||||
|
||||
|
@ -118,10 +118,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin, const char *label)
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_alloc_pin);
|
||||
|
||||
int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
|
||||
int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
|
||||
const char *label)
|
||||
{
|
||||
unsigned int *p = pin_list;
|
||||
const unsigned int *p = pin_list;
|
||||
int i;
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -139,7 +139,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins);
|
||||
|
||||
void mxc_iomux_release_pin(const unsigned int pin)
|
||||
void mxc_iomux_release_pin(unsigned int pin)
|
||||
{
|
||||
unsigned pad = pin & IOMUX_PADNUM_MASK;
|
||||
|
||||
|
@ -148,9 +148,9 @@ void mxc_iomux_release_pin(const unsigned int pin)
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_release_pin);
|
||||
|
||||
void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count)
|
||||
void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count)
|
||||
{
|
||||
unsigned int *p = pin_list;
|
||||
const unsigned int *p = pin_list;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
|
@ -133,7 +133,6 @@ static int armadillo5x0_pins[] = {
|
|||
};
|
||||
|
||||
/* USB */
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
|
||||
#define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4)
|
||||
#define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6)
|
||||
|
@ -176,8 +175,10 @@ static int usbotg_init(struct platform_device *pdev)
|
|||
gpio_set_value(OTG_RESET, 0/*LOW*/);
|
||||
mdelay(5);
|
||||
gpio_set_value(OTG_RESET, 1/*HIGH*/);
|
||||
mdelay(10);
|
||||
|
||||
return 0;
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
|
||||
otg_free_reset:
|
||||
gpio_free(OTG_RESET);
|
||||
|
@ -233,8 +234,10 @@ static int usbh2_init(struct platform_device *pdev)
|
|||
gpio_set_value(USBH2_RESET, 0/*LOW*/);
|
||||
mdelay(5);
|
||||
gpio_set_value(USBH2_RESET, 1/*HIGH*/);
|
||||
mdelay(10);
|
||||
|
||||
return 0;
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
|
||||
h2_free_reset:
|
||||
gpio_free(USBH2_RESET);
|
||||
|
@ -246,15 +249,12 @@ static int usbh2_init(struct platform_device *pdev)
|
|||
static struct mxc_usbh_platform_data usbotg_pdata __initdata = {
|
||||
.init = usbotg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif /* CONFIG_USB_ULPI */
|
||||
|
||||
/* RTC over I2C*/
|
||||
#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)
|
||||
|
@ -547,15 +547,15 @@ static void __init armadillo5x0_init(void)
|
|||
i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1);
|
||||
|
||||
/* USB */
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx31_add_mxc_ehci_otg(&usbotg_pdata);
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbotg_pdata.otg)
|
||||
imx31_add_mxc_ehci_otg(&usbotg_pdata);
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
}
|
||||
|
||||
static void __init armadillo5x0_timer_init(void)
|
||||
|
@ -569,9 +569,10 @@ static struct sys_timer armadillo5x0_timer = {
|
|||
|
||||
MACHINE_START(ARMADILLO5X0, "Armadillo-500")
|
||||
/* Maintainer: Alberto Panizzo */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &armadillo5x0_timer,
|
||||
.init_machine = armadillo5x0_init,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &armadillo5x0_timer,
|
||||
.init_machine = armadillo5x0_init,
|
||||
MACHINE_END
|
||||
|
|
66
arch/arm/mach-mx3/mach-bug.c
Normal file
66
arch/arm/mach-mx3/mach-bug.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (C) 2000 Deep Blue Solutions Ltd
|
||||
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
|
||||
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright 2011 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/iomux-mx3.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include "devices-imx31.h"
|
||||
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static const unsigned int bug_pins[] __initconst = {
|
||||
MX31_PIN_PC_RST__CTS5,
|
||||
MX31_PIN_PC_VS2__RTS5,
|
||||
MX31_PIN_PC_BVD2__TXD5,
|
||||
MX31_PIN_PC_BVD1__RXD5,
|
||||
};
|
||||
|
||||
static void __init bug_board_init(void)
|
||||
{
|
||||
mxc_iomux_setup_multiple_pins(bug_pins,
|
||||
ARRAY_SIZE(bug_pins), "uart-4");
|
||||
imx31_add_imx_uart4(&uart_pdata);
|
||||
}
|
||||
|
||||
static void __init bug_timer_init(void)
|
||||
{
|
||||
mx31_clocks_init(26000000);
|
||||
}
|
||||
|
||||
static struct sys_timer bug_timer = {
|
||||
.init = bug_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(BUG, "BugLabs BUGBase")
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &bug_timer,
|
||||
.init_machine = bug_board_init,
|
||||
MACHINE_END
|
|
@ -60,7 +60,7 @@ static struct tsc2007_platform_data tsc2007_info = {
|
|||
.x_plate_ohms = 180,
|
||||
};
|
||||
|
||||
#define TSC2007_IRQGPIO (2 * 32 + 2)
|
||||
#define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2)
|
||||
static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8563", 0x51),
|
||||
|
@ -111,15 +111,25 @@ static const struct mxc_nand_platform_data
|
|||
.flash_bbt = 1,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx35_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data otg_pdata __initconst = {
|
||||
.init = eukrea_cpuimx35_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx35_usbh1_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
|
||||
.init = eukrea_cpuimx35_usbh1_init,
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
|
||||
MXC_EHCI_IPPUE_DOWN,
|
||||
};
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
|
@ -146,7 +156,7 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode);
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init eukrea_cpuimx35_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
|
||||
ARRAY_SIZE(eukrea_cpuimx35_pads));
|
||||
|
@ -184,9 +194,10 @@ struct sys_timer eukrea_cpuimx35_timer = {
|
|||
|
||||
MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
|
||||
/* Maintainer: Eukrea Electromatique */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_irq = mx35_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &eukrea_cpuimx35_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_early = imx35_init_early,
|
||||
.init_irq = mx35_init_irq,
|
||||
.timer = &eukrea_cpuimx35_timer,
|
||||
.init_machine = eukrea_cpuimx35_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -266,17 +266,14 @@ static void __init kzm_timer_init(void)
|
|||
}
|
||||
|
||||
static struct sys_timer kzm_timer = {
|
||||
.init = kzm_timer_init,
|
||||
.init = kzm_timer_init,
|
||||
};
|
||||
|
||||
/*
|
||||
* The following uses standard kernel macros define in arch.h in order to
|
||||
* initialize __mach_desc_KZM_ARM11_01 data structure.
|
||||
*/
|
||||
MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = kzm_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = kzm_board_init,
|
||||
.timer = &kzm_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = kzm_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &kzm_timer,
|
||||
.init_machine = kzm_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -21,9 +21,13 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/mfd/mc13783.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/l4f00242t03.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/ulpi.h>
|
||||
#include <linux/memblock.h>
|
||||
|
||||
#include <media/soc_camera.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -35,6 +39,10 @@
|
|||
#include <mach/iomux-mx3.h>
|
||||
#include <mach/3ds_debugboard.h>
|
||||
#include <mach/ulpi.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/ipu.h>
|
||||
#include <mach/mx3fb.h>
|
||||
#include <mach/mx3_camera.h>
|
||||
|
||||
#include "devices-imx31.h"
|
||||
#include "devices.h"
|
||||
|
@ -42,10 +50,6 @@
|
|||
/* CPLD IRQ line for external uart, external ethernet etc */
|
||||
#define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
|
||||
|
||||
/*
|
||||
* This file contains the board-specific initialization routines.
|
||||
*/
|
||||
|
||||
static int mx31_3ds_pins[] = {
|
||||
/* UART1 */
|
||||
MX31_PIN_CTS1__CTS1,
|
||||
|
@ -53,6 +57,12 @@ static int mx31_3ds_pins[] = {
|
|||
MX31_PIN_TXD1__TXD1,
|
||||
MX31_PIN_RXD1__RXD1,
|
||||
IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
|
||||
/*SPI0*/
|
||||
MX31_PIN_CSPI1_SCLK__SCLK,
|
||||
MX31_PIN_CSPI1_MOSI__MOSI,
|
||||
MX31_PIN_CSPI1_MISO__MISO,
|
||||
MX31_PIN_CSPI1_SPI_RDY__SPI_RDY,
|
||||
MX31_PIN_CSPI1_SS2__SS2, /* CS for LCD */
|
||||
/* SPI 1 */
|
||||
MX31_PIN_CSPI2_SCLK__SCLK,
|
||||
MX31_PIN_CSPI2_MOSI__MOSI,
|
||||
|
@ -100,6 +110,252 @@ static int mx31_3ds_pins[] = {
|
|||
IOMUX_MODE(MX31_PIN_PC_RW_B, IOMUX_CONFIG_ALT1),
|
||||
/* USB Host2 reset */
|
||||
IOMUX_MODE(MX31_PIN_USB_BYP, IOMUX_CONFIG_GPIO),
|
||||
/* I2C1 */
|
||||
MX31_PIN_I2C_CLK__I2C1_SCL,
|
||||
MX31_PIN_I2C_DAT__I2C1_SDA,
|
||||
/* SDHC1 */
|
||||
MX31_PIN_SD1_DATA3__SD1_DATA3,
|
||||
MX31_PIN_SD1_DATA2__SD1_DATA2,
|
||||
MX31_PIN_SD1_DATA1__SD1_DATA1,
|
||||
MX31_PIN_SD1_DATA0__SD1_DATA0,
|
||||
MX31_PIN_SD1_CLK__SD1_CLK,
|
||||
MX31_PIN_SD1_CMD__SD1_CMD,
|
||||
MX31_PIN_GPIO3_1__GPIO3_1, /* Card detect */
|
||||
MX31_PIN_GPIO3_0__GPIO3_0, /* OE */
|
||||
/* Framebuffer */
|
||||
MX31_PIN_LD0__LD0,
|
||||
MX31_PIN_LD1__LD1,
|
||||
MX31_PIN_LD2__LD2,
|
||||
MX31_PIN_LD3__LD3,
|
||||
MX31_PIN_LD4__LD4,
|
||||
MX31_PIN_LD5__LD5,
|
||||
MX31_PIN_LD6__LD6,
|
||||
MX31_PIN_LD7__LD7,
|
||||
MX31_PIN_LD8__LD8,
|
||||
MX31_PIN_LD9__LD9,
|
||||
MX31_PIN_LD10__LD10,
|
||||
MX31_PIN_LD11__LD11,
|
||||
MX31_PIN_LD12__LD12,
|
||||
MX31_PIN_LD13__LD13,
|
||||
MX31_PIN_LD14__LD14,
|
||||
MX31_PIN_LD15__LD15,
|
||||
MX31_PIN_LD16__LD16,
|
||||
MX31_PIN_LD17__LD17,
|
||||
MX31_PIN_VSYNC3__VSYNC3,
|
||||
MX31_PIN_HSYNC__HSYNC,
|
||||
MX31_PIN_FPSHIFT__FPSHIFT,
|
||||
MX31_PIN_CONTRAST__CONTRAST,
|
||||
/* CSI */
|
||||
MX31_PIN_CSI_D6__CSI_D6,
|
||||
MX31_PIN_CSI_D7__CSI_D7,
|
||||
MX31_PIN_CSI_D8__CSI_D8,
|
||||
MX31_PIN_CSI_D9__CSI_D9,
|
||||
MX31_PIN_CSI_D10__CSI_D10,
|
||||
MX31_PIN_CSI_D11__CSI_D11,
|
||||
MX31_PIN_CSI_D12__CSI_D12,
|
||||
MX31_PIN_CSI_D13__CSI_D13,
|
||||
MX31_PIN_CSI_D14__CSI_D14,
|
||||
MX31_PIN_CSI_D15__CSI_D15,
|
||||
MX31_PIN_CSI_HSYNC__CSI_HSYNC,
|
||||
MX31_PIN_CSI_MCLK__CSI_MCLK,
|
||||
MX31_PIN_CSI_PIXCLK__CSI_PIXCLK,
|
||||
MX31_PIN_CSI_VSYNC__CSI_VSYNC,
|
||||
MX31_PIN_CSI_D5__GPIO3_5, /* CMOS PWDN */
|
||||
IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_GPIO), /* CMOS reset */
|
||||
};
|
||||
|
||||
/*
|
||||
* Camera support
|
||||
*/
|
||||
static phys_addr_t mx3_camera_base __initdata;
|
||||
#define MX31_3DS_CAMERA_BUF_SIZE SZ_8M
|
||||
|
||||
#define MX31_3DS_GPIO_CAMERA_PW IOMUX_TO_GPIO(MX31_PIN_CSI_D5)
|
||||
#define MX31_3DS_GPIO_CAMERA_RST IOMUX_TO_GPIO(MX31_PIN_RI_DTE1)
|
||||
|
||||
static struct gpio mx31_3ds_camera_gpios[] = {
|
||||
{ MX31_3DS_GPIO_CAMERA_PW, GPIOF_OUT_INIT_HIGH, "camera-power" },
|
||||
{ MX31_3DS_GPIO_CAMERA_RST, GPIOF_OUT_INIT_HIGH, "camera-reset" },
|
||||
};
|
||||
|
||||
static int __init mx31_3ds_camera_alloc_dma(void)
|
||||
{
|
||||
int dma;
|
||||
|
||||
if (!mx3_camera_base)
|
||||
return -ENOMEM;
|
||||
|
||||
dma = dma_declare_coherent_memory(&mx3_camera.dev,
|
||||
mx3_camera_base, mx3_camera_base,
|
||||
MX31_3DS_CAMERA_BUF_SIZE,
|
||||
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
|
||||
|
||||
if (!(dma & DMA_MEMORY_MAP))
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mx31_3ds_camera_power(struct device *dev, int on)
|
||||
{
|
||||
/* enable or disable the camera */
|
||||
pr_debug("%s: %s the camera\n", __func__, on ? "ENABLE" : "DISABLE");
|
||||
gpio_set_value(MX31_3DS_GPIO_CAMERA_PW, on ? 0 : 1);
|
||||
|
||||
if (!on)
|
||||
goto out;
|
||||
|
||||
/* If enabled, give a reset impulse */
|
||||
gpio_set_value(MX31_3DS_GPIO_CAMERA_RST, 0);
|
||||
msleep(20);
|
||||
gpio_set_value(MX31_3DS_GPIO_CAMERA_RST, 1);
|
||||
msleep(100);
|
||||
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_board_info mx31_3ds_i2c_camera = {
|
||||
I2C_BOARD_INFO("ov2640", 0x30),
|
||||
};
|
||||
|
||||
static struct regulator_bulk_data mx31_3ds_camera_regs[] = {
|
||||
{ .supply = "cmos_vcore" },
|
||||
{ .supply = "cmos_2v8" },
|
||||
};
|
||||
|
||||
static struct soc_camera_link iclink_ov2640 = {
|
||||
.bus_id = 0,
|
||||
.board_info = &mx31_3ds_i2c_camera,
|
||||
.i2c_adapter_id = 0,
|
||||
.power = mx31_3ds_camera_power,
|
||||
.regulators = mx31_3ds_camera_regs,
|
||||
.num_regulators = ARRAY_SIZE(mx31_3ds_camera_regs),
|
||||
};
|
||||
|
||||
static struct platform_device mx31_3ds_ov2640 = {
|
||||
.name = "soc-camera-pdrv",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &iclink_ov2640,
|
||||
},
|
||||
};
|
||||
|
||||
struct mx3_camera_pdata mx31_3ds_camera_pdata = {
|
||||
.dma_dev = &mx3_ipu.dev,
|
||||
.flags = MX3_CAMERA_DATAWIDTH_10,
|
||||
.mclk_10khz = 2600,
|
||||
};
|
||||
|
||||
/*
|
||||
* FB support
|
||||
*/
|
||||
static const struct fb_videomode fb_modedb[] = {
|
||||
{ /* 480x640 @ 60 Hz */
|
||||
.name = "Epson-VGA",
|
||||
.refresh = 60,
|
||||
.xres = 480,
|
||||
.yres = 640,
|
||||
.pixclock = 41701,
|
||||
.left_margin = 20,
|
||||
.right_margin = 41,
|
||||
.upper_margin = 10,
|
||||
.lower_margin = 5,
|
||||
.hsync_len = 20,
|
||||
.vsync_len = 10,
|
||||
.sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct ipu_platform_data mx3_ipu_data = {
|
||||
.irq_base = MXC_IPU_IRQ_START,
|
||||
};
|
||||
|
||||
static struct mx3fb_platform_data mx3fb_pdata = {
|
||||
.dma_dev = &mx3_ipu.dev,
|
||||
.name = "Epson-VGA",
|
||||
.mode = fb_modedb,
|
||||
.num_modes = ARRAY_SIZE(fb_modedb),
|
||||
};
|
||||
|
||||
/* LCD */
|
||||
static struct l4f00242t03_pdata mx31_3ds_l4f00242t03_pdata = {
|
||||
.reset_gpio = IOMUX_TO_GPIO(MX31_PIN_LCS1),
|
||||
.data_enable_gpio = IOMUX_TO_GPIO(MX31_PIN_SER_RS),
|
||||
.core_supply = "lcd_2v8",
|
||||
.io_supply = "vdd_lcdio",
|
||||
};
|
||||
|
||||
/*
|
||||
* Support for SD card slot in personality board
|
||||
*/
|
||||
#define MX31_3DS_GPIO_SDHC1_CD IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)
|
||||
#define MX31_3DS_GPIO_SDHC1_BE IOMUX_TO_GPIO(MX31_PIN_GPIO3_0)
|
||||
|
||||
static struct gpio mx31_3ds_sdhc1_gpios[] = {
|
||||
{ MX31_3DS_GPIO_SDHC1_CD, GPIOF_IN, "sdhc1-card-detect" },
|
||||
{ MX31_3DS_GPIO_SDHC1_BE, GPIOF_OUT_INIT_LOW, "sdhc1-bus-en" },
|
||||
};
|
||||
|
||||
static int mx31_3ds_sdhc1_init(struct device *dev,
|
||||
irq_handler_t detect_irq,
|
||||
void *data)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request_array(mx31_3ds_sdhc1_gpios,
|
||||
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
|
||||
if (ret) {
|
||||
pr_warning("Unable to request the SD/MMC GPIOs.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
|
||||
detect_irq, IRQF_DISABLED |
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
"sdhc1-detect", data);
|
||||
if (ret) {
|
||||
pr_warning("Unable to request the SD/MMC card-detect IRQ.\n");
|
||||
goto gpio_free;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
gpio_free:
|
||||
gpio_free_array(mx31_3ds_sdhc1_gpios,
|
||||
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mx31_3ds_sdhc1_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data);
|
||||
gpio_free_array(mx31_3ds_sdhc1_gpios,
|
||||
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
|
||||
}
|
||||
|
||||
static void mx31_3ds_sdhc1_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
/*
|
||||
* While the voltage stuff is done by the driver, activate the
|
||||
* Buffer Enable Pin only if there is a card in slot to fix the card
|
||||
* voltage issue caused by bi-directional chip TXB0108 on 3Stack.
|
||||
* Done here because at this stage we have for sure a debounced value
|
||||
* of the presence of the card, showed by the value of vdd.
|
||||
* 7 == ilog2(MMC_VDD_165_195)
|
||||
*/
|
||||
if (vdd > 7)
|
||||
gpio_set_value(MX31_3DS_GPIO_SDHC1_BE, 1);
|
||||
else
|
||||
gpio_set_value(MX31_3DS_GPIO_SDHC1_BE, 0);
|
||||
}
|
||||
|
||||
static struct imxmmc_platform_data sdhc1_pdata = {
|
||||
.init = mx31_3ds_sdhc1_init,
|
||||
.exit = mx31_3ds_sdhc1_exit,
|
||||
.setpower = mx31_3ds_sdhc1_setpower,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -138,7 +394,71 @@ static struct regulator_init_data gpo_init = {
|
|||
}
|
||||
};
|
||||
|
||||
static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
|
||||
static struct regulator_consumer_supply vmmc2_consumers[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "mxc-mmc.0"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data vmmc2_init = {
|
||||
.constraints = {
|
||||
.min_uV = 3000000,
|
||||
.max_uV = 3000000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
|
||||
REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vmmc2_consumers),
|
||||
.consumer_supplies = vmmc2_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vmmc1_consumers[] = {
|
||||
REGULATOR_SUPPLY("lcd_2v8", NULL),
|
||||
REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data vmmc1_init = {
|
||||
.constraints = {
|
||||
.min_uV = 2800000,
|
||||
.max_uV = 2800000,
|
||||
.apply_uV = 1,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
|
||||
REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers),
|
||||
.consumer_supplies = vmmc1_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vgen_consumers[] = {
|
||||
REGULATOR_SUPPLY("vdd_lcdio", NULL),
|
||||
};
|
||||
|
||||
static struct regulator_init_data vgen_init = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 1800000,
|
||||
.apply_uV = 1,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
|
||||
REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vgen_consumers),
|
||||
.consumer_supplies = vgen_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vvib_consumers[] = {
|
||||
REGULATOR_SUPPLY("cmos_vcore", "soc-camera-pdrv.0"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data vvib_init = {
|
||||
.constraints = {
|
||||
.min_uV = 1300000,
|
||||
.max_uV = 1300000,
|
||||
.apply_uV = 1,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
|
||||
REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vvib_consumers),
|
||||
.consumer_supplies = vvib_consumers,
|
||||
};
|
||||
|
||||
static struct mc13xxx_regulator_init_data mx31_3ds_regulators[] = {
|
||||
{
|
||||
.id = MC13783_REG_PWGT1SPI, /* Power Gate for ARM core. */
|
||||
.init_data = &pwgtx_init,
|
||||
|
@ -152,17 +472,38 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
|
|||
}, {
|
||||
.id = MC13783_REG_GPO3, /* Turn on 3.3V */
|
||||
.init_data = &gpo_init,
|
||||
}, {
|
||||
.id = MC13783_REG_VMMC2, /* Power MMC/SD, WiFi/Bluetooth. */
|
||||
.init_data = &vmmc2_init,
|
||||
}, {
|
||||
.id = MC13783_REG_VMMC1, /* Power LCD, CMOS, FM, GPS, Accel. */
|
||||
.init_data = &vmmc1_init,
|
||||
}, {
|
||||
.id = MC13783_REG_VGEN, /* Power LCD */
|
||||
.init_data = &vgen_init,
|
||||
}, {
|
||||
.id = MC13783_REG_VVIB, /* Power CMOS */
|
||||
.init_data = &vvib_init,
|
||||
},
|
||||
};
|
||||
|
||||
/* MC13783 */
|
||||
static struct mc13783_platform_data mc13783_pdata __initdata = {
|
||||
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
|
||||
.regulators = mx31_3ds_regulators,
|
||||
.num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
|
||||
.flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN,
|
||||
.flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_TOUCHSCREEN
|
||||
};
|
||||
|
||||
/* SPI */
|
||||
static int spi0_internal_chipselect[] = {
|
||||
MXC_SPI_CS(2),
|
||||
};
|
||||
|
||||
static const struct spi_imx_master spi0_pdata __initconst = {
|
||||
.chipselect = spi0_internal_chipselect,
|
||||
.num_chipselect = ARRAY_SIZE(spi0_internal_chipselect),
|
||||
};
|
||||
|
||||
static int spi1_internal_chipselect[] = {
|
||||
MXC_SPI_CS(0),
|
||||
MXC_SPI_CS(2),
|
||||
|
@ -182,6 +523,12 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = {
|
|||
.platform_data = &mc13783_pdata,
|
||||
.irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
|
||||
.mode = SPI_CS_HIGH,
|
||||
}, {
|
||||
.modalias = "l4f00242t03",
|
||||
.max_speed_hz = 5000000,
|
||||
.bus_num = 0,
|
||||
.chip_select = 0, /* SS2 */
|
||||
.platform_data = &mx31_3ds_l4f00242t03_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -245,6 +592,11 @@ static int mx31_3ds_usbotg_init(void)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int mx31_3ds_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static int mx31_3ds_host2_init(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
|
@ -276,25 +628,25 @@ static int mx31_3ds_host2_init(struct platform_device *pdev)
|
|||
|
||||
mdelay(1);
|
||||
gpio_set_value(USBH2_RST_B, 1);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
|
||||
usbotg_free_reset:
|
||||
gpio_free(USBH2_RST_B);
|
||||
return err;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = mx31_3ds_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = mx31_3ds_host2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data usbotg_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -320,19 +672,18 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
|||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
/*
|
||||
* Set up static virtual mappings.
|
||||
*/
|
||||
static void __init mx31_3ds_map_io(void)
|
||||
{
|
||||
mx31_map_io();
|
||||
}
|
||||
static const struct imxi2c_platform_data mx31_3ds_i2c0_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
/*!
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&mx31_3ds_ov2640,
|
||||
};
|
||||
|
||||
static void __init mx31_3ds_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
|
||||
"mx31_3ds");
|
||||
|
||||
|
@ -343,20 +694,22 @@ static void __init mxc_board_init(void)
|
|||
spi_register_board_info(mx31_3ds_spi_devs,
|
||||
ARRAY_SIZE(mx31_3ds_spi_devs));
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
imx31_add_imx_keypad(&mx31_3ds_keymap_data);
|
||||
|
||||
mx31_3ds_usbotg_init();
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx31_add_mxc_ehci_otg(&otg_pdata);
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (otg_pdata.otg)
|
||||
imx31_add_mxc_ehci_otg(&otg_pdata);
|
||||
}
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
|
||||
if (!otg_mode_host)
|
||||
imx31_add_fsl_usb2_udc(&usbotg_pdata);
|
||||
|
||||
|
@ -364,6 +717,26 @@ static void __init mxc_board_init(void)
|
|||
printk(KERN_WARNING "Init of the debug board failed, all "
|
||||
"devices on the debug board are unusable.\n");
|
||||
imx31_add_imx2_wdt(NULL);
|
||||
imx31_add_imx_i2c0(&mx31_3ds_i2c0_data);
|
||||
imx31_add_mxc_mmc(0, &sdhc1_pdata);
|
||||
|
||||
imx31_add_spi_imx0(&spi0_pdata);
|
||||
mxc_register_device(&mx3_ipu, &mx3_ipu_data);
|
||||
mxc_register_device(&mx3_fb, &mx3fb_pdata);
|
||||
|
||||
/* CSI */
|
||||
/* Camera power: default - off */
|
||||
ret = gpio_request_array(mx31_3ds_camera_gpios,
|
||||
ARRAY_SIZE(mx31_3ds_camera_gpios));
|
||||
if (ret) {
|
||||
pr_err("Failed to request camera gpios");
|
||||
iclink_ov2640.power = NULL;
|
||||
}
|
||||
|
||||
if (!mx31_3ds_camera_alloc_dma())
|
||||
mxc_register_device(&mx3_camera, &mx31_3ds_camera_pdata);
|
||||
else
|
||||
pr_err("Failed to allocate dma memory for camera");
|
||||
}
|
||||
|
||||
static void __init mx31_3ds_timer_init(void)
|
||||
|
@ -375,15 +748,22 @@ static struct sys_timer mx31_3ds_timer = {
|
|||
.init = mx31_3ds_timer_init,
|
||||
};
|
||||
|
||||
/*
|
||||
* The following uses standard kernel macros defined in arch.h in order to
|
||||
* initialize __mach_desc_MX31_3DS data structure.
|
||||
*/
|
||||
static void __init mx31_3ds_reserve(void)
|
||||
{
|
||||
/* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
|
||||
mx3_camera_base = memblock_alloc(MX31_3DS_CAMERA_BUF_SIZE,
|
||||
MX31_3DS_CAMERA_BUF_SIZE);
|
||||
memblock_free(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE);
|
||||
memblock_remove(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE);
|
||||
}
|
||||
|
||||
MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
|
||||
/* Maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_3ds_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mx31_3ds_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &mx31_3ds_timer,
|
||||
.init_machine = mx31_3ds_init,
|
||||
.reserve = mx31_3ds_reserve,
|
||||
MACHINE_END
|
||||
|
|
|
@ -69,12 +69,8 @@
|
|||
#define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11)
|
||||
|
||||
#define MXC_MAX_EXP_IO_LINES 16
|
||||
/*
|
||||
* This file contains the board-specific initialization routines.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
/*!
|
||||
/*
|
||||
* The serial port definition structure.
|
||||
*/
|
||||
static struct plat_serial8250_port serial_platform_data[] = {
|
||||
|
@ -110,14 +106,7 @@ static int __init mxc_init_extuart(void)
|
|||
{
|
||||
return platform_device_register(&serial_device);
|
||||
}
|
||||
#else
|
||||
static inline int mxc_init_extuart(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
@ -134,11 +123,6 @@ static inline void mxc_init_imx_uart(void)
|
|||
mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0");
|
||||
imx31_add_imx_uart0(&uart_pdata);
|
||||
}
|
||||
#else /* !SERIAL_IMX */
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
}
|
||||
#endif /* !SERIAL_IMX */
|
||||
|
||||
static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
|
||||
{
|
||||
|
@ -160,7 +144,7 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
|
|||
|
||||
/*
|
||||
* Disable an expio pin's interrupt by setting the bit in the imr.
|
||||
* @param irq an expio virtual irq number
|
||||
* @param d an expio virtual irq description
|
||||
*/
|
||||
static void expio_mask_irq(struct irq_data *d)
|
||||
{
|
||||
|
@ -172,7 +156,7 @@ static void expio_mask_irq(struct irq_data *d)
|
|||
|
||||
/*
|
||||
* Acknowledge an expanded io pin's interrupt by clearing the bit in the isr.
|
||||
* @param irq an expanded io virtual irq number
|
||||
* @param d an expio virtual irq description
|
||||
*/
|
||||
static void expio_ack_irq(struct irq_data *d)
|
||||
{
|
||||
|
@ -183,7 +167,7 @@ static void expio_ack_irq(struct irq_data *d)
|
|||
|
||||
/*
|
||||
* Enable a expio pin's interrupt by clearing the bit in the imr.
|
||||
* @param irq a expio virtual irq number
|
||||
* @param d an expio virtual irq description
|
||||
*/
|
||||
static void expio_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
|
@ -476,7 +460,6 @@ static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE)
|
||||
static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = {
|
||||
#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
|
||||
{
|
||||
|
@ -497,11 +480,6 @@ static void mxc_init_i2c(void)
|
|||
|
||||
imx31_add_imx_i2c1(NULL);
|
||||
}
|
||||
#else
|
||||
static void mxc_init_i2c(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static unsigned int ssi_pins[] = {
|
||||
MX31_PIN_SFS5__SFS5,
|
||||
|
@ -516,9 +494,7 @@ static void mxc_init_audio(void)
|
|||
mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi");
|
||||
}
|
||||
|
||||
/*!
|
||||
* This structure defines static mappings for the i.MX31ADS board.
|
||||
*/
|
||||
/* static mappings */
|
||||
static struct map_desc mx31ads_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = MX31_CS4_BASE_ADDR_VIRT,
|
||||
|
@ -528,9 +504,6 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
|
|||
},
|
||||
};
|
||||
|
||||
/*!
|
||||
* Set up static virtual mappings.
|
||||
*/
|
||||
static void __init mx31ads_map_io(void)
|
||||
{
|
||||
mx31_map_io();
|
||||
|
@ -543,10 +516,7 @@ static void __init mx31ads_init_irq(void)
|
|||
mx31ads_init_expio();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx31ads_init(void)
|
||||
{
|
||||
mxc_init_extuart();
|
||||
mxc_init_imx_uart();
|
||||
|
@ -563,15 +533,12 @@ static struct sys_timer mx31ads_timer = {
|
|||
.init = mx31ads_timer_init,
|
||||
};
|
||||
|
||||
/*
|
||||
* The following uses standard kernel macros defined in arch.h in order to
|
||||
* initialize __mach_desc_MX31ADS data structure.
|
||||
*/
|
||||
MACHINE_START(MX31ADS, "Freescale MX31ADS")
|
||||
/* Maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31ads_map_io,
|
||||
.init_irq = mx31ads_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mx31ads_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31ads_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31ads_init_irq,
|
||||
.timer = &mx31ads_timer,
|
||||
.init_machine = mx31ads_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/smsc911x.h>
|
||||
|
@ -110,55 +111,9 @@ static struct platform_device physmap_flash_device = {
|
|||
|
||||
/* USB */
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
|
||||
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
|
||||
PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
|
||||
|
||||
static int usbotg_init(struct platform_device *pdev)
|
||||
{
|
||||
unsigned int pins[] = {
|
||||
MX31_PIN_USBOTG_DATA0__USBOTG_DATA0,
|
||||
MX31_PIN_USBOTG_DATA1__USBOTG_DATA1,
|
||||
MX31_PIN_USBOTG_DATA2__USBOTG_DATA2,
|
||||
MX31_PIN_USBOTG_DATA3__USBOTG_DATA3,
|
||||
MX31_PIN_USBOTG_DATA4__USBOTG_DATA4,
|
||||
MX31_PIN_USBOTG_DATA5__USBOTG_DATA5,
|
||||
MX31_PIN_USBOTG_DATA6__USBOTG_DATA6,
|
||||
MX31_PIN_USBOTG_DATA7__USBOTG_DATA7,
|
||||
MX31_PIN_USBOTG_CLK__USBOTG_CLK,
|
||||
MX31_PIN_USBOTG_DIR__USBOTG_DIR,
|
||||
MX31_PIN_USBOTG_NXT__USBOTG_NXT,
|
||||
MX31_PIN_USBOTG_STP__USBOTG_STP,
|
||||
};
|
||||
|
||||
mxc_iomux_setup_multiple_pins(pins, ARRAY_SIZE(pins), "USB OTG");
|
||||
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG);
|
||||
|
||||
mxc_iomux_set_gpr(MUX_PGP_USB_4WIRE, true);
|
||||
mxc_iomux_set_gpr(MUX_PGP_USB_COMMON, true);
|
||||
|
||||
/* chip select */
|
||||
mxc_iomux_alloc_pin(IOMUX_MODE(MX31_PIN_DTR_DCE2, IOMUX_CONFIG_GPIO),
|
||||
"USBOTG_CS");
|
||||
gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS");
|
||||
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usbh1_init(struct platform_device *pdev)
|
||||
{
|
||||
int pins[] = {
|
||||
|
@ -183,7 +138,10 @@ static int usbh1_init(struct platform_device *pdev)
|
|||
|
||||
mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true);
|
||||
|
||||
return 0;
|
||||
mdelay(10);
|
||||
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_SINGLE_UNI);
|
||||
}
|
||||
|
||||
static int usbh2_init(struct platform_device *pdev)
|
||||
|
@ -220,41 +178,30 @@ static int usbh2_init(struct platform_device *pdev)
|
|||
gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
|
||||
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
mdelay(10);
|
||||
|
||||
static struct mxc_usbh_platform_data usbotg_pdata = {
|
||||
.init = usbotg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
|
||||
.init = usbh1_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
|
||||
};
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
|
||||
static void lilly1131_usb_init(void)
|
||||
{
|
||||
usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void lilly1131_usb_init(void) {}
|
||||
#endif /* CONFIG_USB_ULPI */
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
}
|
||||
|
||||
/* SPI */
|
||||
|
||||
|
@ -274,8 +221,8 @@ static const struct spi_imx_master spi1_pdata __initconst = {
|
|||
.num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
|
||||
};
|
||||
|
||||
static struct mc13783_platform_data mc13783_pdata __initdata = {
|
||||
.flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN,
|
||||
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
|
||||
.flags = MC13XXX_USE_RTC | MC13XXX_USE_TOUCHSCREEN,
|
||||
};
|
||||
|
||||
static struct spi_board_info mc13783_dev __initdata = {
|
||||
|
@ -347,10 +294,10 @@ static struct sys_timer mx31lilly_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mx31lilly_board_init,
|
||||
.timer = &mx31lilly_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &mx31lilly_timer,
|
||||
.init_machine = mx31lilly_board_init,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/ulpi.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
@ -111,9 +112,9 @@ static const struct spi_imx_master spi1_pdata __initconst = {
|
|||
.num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
|
||||
};
|
||||
|
||||
static struct mc13783_platform_data mc13783_pdata __initdata = {
|
||||
.flags = MC13783_USE_RTC |
|
||||
MC13783_USE_REGULATOR,
|
||||
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
|
||||
.flags = MC13XXX_USE_RTC |
|
||||
MC13XXX_USE_REGULATOR,
|
||||
};
|
||||
|
||||
static struct spi_board_info mc13783_spi_dev __initdata = {
|
||||
|
@ -129,7 +130,6 @@ static struct spi_board_info mc13783_spi_dev __initdata = {
|
|||
* USB
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
|
||||
PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
|
||||
|
||||
|
@ -167,15 +167,15 @@ static int usbh2_init(struct platform_device *pdev)
|
|||
gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
|
||||
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
|
||||
|
||||
return 0;
|
||||
mdelay(10);
|
||||
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOR flash
|
||||
|
@ -227,7 +227,7 @@ void __init mx31lite_map_io(void)
|
|||
static int mx31lite_baseboard;
|
||||
core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
|
||||
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx31lite_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -252,13 +252,11 @@ static void __init mxc_board_init(void)
|
|||
imx31_add_spi_imx1(&spi1_pdata);
|
||||
spi_register_board_info(&mc13783_spi_dev, 1);
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
/* USB */
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
|
||||
/* SMSC9117 IRQ pin */
|
||||
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
|
||||
|
@ -281,9 +279,10 @@ struct sys_timer mx31lite_timer = {
|
|||
|
||||
MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
|
||||
/* Maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31lite_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mx31lite_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31lite_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &mx31lite_timer,
|
||||
.init_machine = mx31lite_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -214,7 +214,7 @@ static struct regulator_init_data cam_vreg_data = {
|
|||
.consumer_supplies = cam_consumers,
|
||||
};
|
||||
|
||||
static struct mc13783_regulator_init_data moboard_regulators[] = {
|
||||
static struct mc13xxx_regulator_init_data moboard_regulators[] = {
|
||||
{
|
||||
.id = MC13783_REG_VMMC1,
|
||||
.init_data = &sdhc_vreg_data,
|
||||
|
@ -267,12 +267,12 @@ static struct mc13783_leds_platform_data moboard_leds = {
|
|||
.tc2_period = MC13783_LED_PERIOD_10MS,
|
||||
};
|
||||
|
||||
static struct mc13783_platform_data moboard_pmic = {
|
||||
static struct mc13xxx_platform_data moboard_pmic = {
|
||||
.regulators = moboard_regulators,
|
||||
.num_regulators = ARRAY_SIZE(moboard_regulators),
|
||||
.leds = &moboard_leds,
|
||||
.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC |
|
||||
MC13783_USE_ADC | MC13783_USE_LED,
|
||||
.flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC |
|
||||
MC13XXX_USE_ADC | MC13XXX_USE_LED,
|
||||
};
|
||||
|
||||
static struct spi_board_info moboard_spi_board_info[] __initdata = {
|
||||
|
@ -400,19 +400,24 @@ static void usb_xcvr_reset(void)
|
|||
mdelay(1);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int moboard_usbh2_init_hw(struct platform_device *pdev)
|
||||
{
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = moboard_usbh2_init_hw,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
|
||||
static int __init moboard_usbh2_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (!usbh2_pdata.otg)
|
||||
return -ENODEV;
|
||||
|
||||
pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
if (IS_ERR(pdev))
|
||||
|
@ -420,10 +425,6 @@ static int __init moboard_usbh2_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int moboard_usbh2_init(void) { return 0; }
|
||||
#endif
|
||||
|
||||
|
||||
static struct gpio_led mx31moboard_leds[] = {
|
||||
{
|
||||
|
@ -503,7 +504,7 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx31moboard_init(void)
|
||||
{
|
||||
mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins),
|
||||
"moboard");
|
||||
|
@ -564,10 +565,10 @@ struct sys_timer mx31moboard_timer = {
|
|||
|
||||
MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
|
||||
/* Maintainer: Valentin Longchamp, EPFL Mobots group */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mx31moboard_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &mx31moboard_timer,
|
||||
.init_machine = mx31moboard_init,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -118,24 +118,42 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
|
|||
MX35_PAD_SD1_DATA1__ESDHC1_DAT1,
|
||||
MX35_PAD_SD1_DATA2__ESDHC1_DAT2,
|
||||
MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
|
||||
/* I2C1 */
|
||||
MX35_PAD_I2C1_CLK__I2C1_SCL,
|
||||
MX35_PAD_I2C1_DAT__I2C1_SDA,
|
||||
};
|
||||
|
||||
static int mx35_3ds_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
/* OTG config */
|
||||
static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
.phy_mode = FSL_USB2_PHY_UTMI_WIDE,
|
||||
.workaround = FLS_USB2_WORKAROUND_ENGCM09152,
|
||||
/*
|
||||
* ENGCM09152 also requires a hardware change.
|
||||
* Please check the MX35 Chip Errata document for details.
|
||||
*/
|
||||
};
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = mx35_3ds_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static int mx35_3ds_usbh_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
/* USB HOST config */
|
||||
static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
|
||||
.init = mx35_3ds_usbh_init,
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static int otg_mode_host;
|
||||
|
@ -153,10 +171,14 @@ static int __init mx35_3ds_otg_mode(char *options)
|
|||
}
|
||||
__setup("otg_mode=", mx35_3ds_otg_mode);
|
||||
|
||||
static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx35_3ds_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
|
||||
|
||||
|
@ -180,6 +202,7 @@ static void __init mxc_board_init(void)
|
|||
if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
|
||||
pr_warn("Init of the debugboard failed, all "
|
||||
"devices on the debugboard are unusable.\n");
|
||||
imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
|
||||
}
|
||||
|
||||
static void __init mx35pdk_timer_init(void)
|
||||
|
@ -193,9 +216,10 @@ struct sys_timer mx35pdk_timer = {
|
|||
|
||||
MACHINE_START(MX35_3DS, "Freescale MX35PDK")
|
||||
/* Maintainer: Freescale Semiconductor, Inc */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_irq = mx35_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mx35pdk_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_early = imx35_init_early,
|
||||
.init_irq = mx35_init_irq,
|
||||
.timer = &mx35pdk_timer,
|
||||
.init_machine = mx35_3ds_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -533,17 +533,25 @@ static struct platform_device pcm970_sja1000 = {
|
|||
.num_resources = ARRAY_SIZE(pcm970_sja1000_resources),
|
||||
};
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int pcm037_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = pcm037_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int pcm037_usbh2_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
|
||||
.init = pcm037_usbh2_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -568,7 +576,7 @@ __setup("otg_mode=", pcm037_otg_mode);
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init pcm037_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -646,19 +654,18 @@ static void __init mxc_board_init(void)
|
|||
|
||||
platform_device_register(&pcm970_sja1000);
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx31_add_mxc_ehci_otg(&otg_pdata);
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (otg_pdata.otg)
|
||||
imx31_add_mxc_ehci_otg(&otg_pdata);
|
||||
}
|
||||
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (usbh2_pdata.otg)
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
|
||||
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
|
||||
#endif
|
||||
if (!otg_mode_host)
|
||||
imx31_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
|
||||
|
@ -675,9 +682,10 @@ struct sys_timer pcm037_timer = {
|
|||
|
||||
MACHINE_START(PCM037, "Phytec Phycore pcm037")
|
||||
/* Maintainer: Pengutronix */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &pcm037_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &pcm037_timer,
|
||||
.init_machine = pcm037_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -180,9 +180,7 @@ static int __init eet_init_devices(void)
|
|||
|
||||
/* SPI */
|
||||
spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
imx31_add_spi_imx0(&pcm037_spi1_pdata);
|
||||
#endif
|
||||
|
||||
platform_device_register(&pcm037_gpio_keys_device);
|
||||
|
||||
|
|
|
@ -115,7 +115,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
|||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
|
||||
static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = {
|
||||
.bitrate = 50000,
|
||||
};
|
||||
|
@ -134,7 +133,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
|
|||
I2C_BOARD_INFO("pcf8563", 0x51),
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&pcm043_flash,
|
||||
|
@ -221,9 +219,9 @@ static iomux_v3_cfg_t pcm043_pads[] = {
|
|||
MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
|
||||
};
|
||||
|
||||
#define AC97_GPIO_TXFS (1 * 32 + 31)
|
||||
#define AC97_GPIO_TXD (1 * 32 + 28)
|
||||
#define AC97_GPIO_RESET (1 * 32 + 0)
|
||||
#define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31)
|
||||
#define AC97_GPIO_TXD IMX_GPIO_NR(2, 28)
|
||||
#define AC97_GPIO_RESET IMX_GPIO_NR(2, 0)
|
||||
|
||||
static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97)
|
||||
{
|
||||
|
@ -307,18 +305,26 @@ pcm037_nand_board_info __initconst = {
|
|||
.hw_ecc = 1,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static int pcm043_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_pdata __initdata = {
|
||||
.init = pcm043_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static int pcm043_usbh1_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
|
||||
}
|
||||
|
||||
static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
|
||||
.init = pcm043_usbh1_init,
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
|
||||
MXC_EHCI_IPPUE_DOWN,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
|
@ -343,7 +349,7 @@ __setup("otg_mode=", pcm043_otg_mode);
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init pcm043_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
|
||||
|
||||
|
@ -369,26 +375,22 @@ static void __init mxc_board_init(void)
|
|||
|
||||
imx35_add_imx_uart1(&uart_pdata);
|
||||
|
||||
#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
|
||||
i2c_register_board_info(0, pcm043_i2c_devices,
|
||||
ARRAY_SIZE(pcm043_i2c_devices));
|
||||
|
||||
imx35_add_imx_i2c0(&pcm043_i2c0_data);
|
||||
#endif
|
||||
|
||||
mxc_register_device(&mx3_ipu, &mx3_ipu_data);
|
||||
mxc_register_device(&mx3_fb, &mx3fb_pdata);
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
|
||||
imx35_add_mxc_ehci_otg(&otg_pdata);
|
||||
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (otg_pdata.otg)
|
||||
imx35_add_mxc_ehci_otg(&otg_pdata);
|
||||
}
|
||||
|
||||
imx35_add_mxc_ehci_hs(&usbh1_pdata);
|
||||
#endif
|
||||
|
||||
if (!otg_mode_host)
|
||||
imx35_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
|
||||
|
@ -407,10 +409,10 @@ struct sys_timer pcm043_timer = {
|
|||
|
||||
MACHINE_START(PCM043, "Phytec Phycore pcm043")
|
||||
/* Maintainer: Pengutronix */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_irq = mx35_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &pcm043_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx35_map_io,
|
||||
.init_early = imx35_init_early,
|
||||
.init_irq = mx35_init_irq,
|
||||
.timer = &pcm043_timer,
|
||||
.init_machine = pcm043_init,
|
||||
MACHINE_END
|
||||
|
||||
|
|
|
@ -54,10 +54,6 @@
|
|||
|
||||
#define QONG_FPGA_IRQ IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1)
|
||||
|
||||
/*
|
||||
* This file contains the board-specific initialization routines.
|
||||
*/
|
||||
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
@ -247,7 +243,7 @@ static void __init qong_init_fpga(void)
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init qong_init(void)
|
||||
{
|
||||
mxc_init_imx_uart();
|
||||
qong_init_nor_mtd();
|
||||
|
@ -263,16 +259,12 @@ static struct sys_timer qong_timer = {
|
|||
.init = qong_timer_init,
|
||||
};
|
||||
|
||||
/*
|
||||
* The following uses standard kernel macros defined in arch.h in order to
|
||||
* initialize __mach_desc_QONG data structure.
|
||||
*/
|
||||
|
||||
MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
|
||||
/* Maintainer: DENX Software Engineering GmbH */
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_irq = mx31_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &qong_timer,
|
||||
.boot_params = MX3x_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx31_map_io,
|
||||
.init_early = imx31_init_early,
|
||||
.init_irq = mx31_init_irq,
|
||||
.timer = &qong_timer,
|
||||
.init_machine = qong_init,
|
||||
MACHINE_END
|
||||
|
|
328
arch/arm/mach-mx3/mach-vpr200.c
Normal file
328
arch/arm/mach-mx3/mach-vpr200.c
Normal file
|
@ -0,0 +1,328 @@
|
|||
/*
|
||||
* Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2009 Marc Kleine-Budde, Pengutronix
|
||||
* Copyright 2010 Creative Product Design
|
||||
*
|
||||
* Derived from mx35 3stack.
|
||||
* Original author: Fabio Estevam <fabio.estevam@freescale.com>
|
||||
*
|
||||
* 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 <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/memory.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/iomux-mx35.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/ipu.h>
|
||||
#include <mach/mx3fb.h>
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/at24.h>
|
||||
#include <linux/mfd/mc13xxx.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
|
||||
#include "devices-imx35.h"
|
||||
#include "devices.h"
|
||||
|
||||
#define GPIO_LCDPWR IMX_GPIO_NR(1, 2)
|
||||
#define GPIO_PMIC_INT IMX_GPIO_NR(2, 0)
|
||||
|
||||
#define GPIO_BUTTON1 IMX_GPIO_NR(1, 4)
|
||||
#define GPIO_BUTTON2 IMX_GPIO_NR(1, 5)
|
||||
#define GPIO_BUTTON3 IMX_GPIO_NR(1, 7)
|
||||
#define GPIO_BUTTON4 IMX_GPIO_NR(1, 8)
|
||||
#define GPIO_BUTTON5 IMX_GPIO_NR(1, 9)
|
||||
#define GPIO_BUTTON6 IMX_GPIO_NR(1, 10)
|
||||
#define GPIO_BUTTON7 IMX_GPIO_NR(1, 11)
|
||||
#define GPIO_BUTTON8 IMX_GPIO_NR(1, 12)
|
||||
|
||||
static const struct fb_videomode fb_modedb[] = {
|
||||
{
|
||||
/* 800x480 @ 60 Hz */
|
||||
.name = "PT0708048",
|
||||
.refresh = 60,
|
||||
.xres = 800,
|
||||
.yres = 480,
|
||||
.pixclock = KHZ2PICOS(33260),
|
||||
.left_margin = 50,
|
||||
.right_margin = 156,
|
||||
.upper_margin = 10,
|
||||
.lower_margin = 10,
|
||||
.hsync_len = 1, /* note: DE only display */
|
||||
.vsync_len = 1, /* note: DE only display */
|
||||
.sync = FB_SYNC_CLK_IDLE_EN | FB_SYNC_OE_ACT_HIGH,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
}, {
|
||||
/* 800x480 @ 60 Hz */
|
||||
.name = "CTP-CLAA070LC0ACW",
|
||||
.refresh = 60,
|
||||
.xres = 800,
|
||||
.yres = 480,
|
||||
.pixclock = KHZ2PICOS(27000),
|
||||
.left_margin = 50,
|
||||
.right_margin = 50, /* whole line should have 900 clocks */
|
||||
.upper_margin = 10,
|
||||
.lower_margin = 10, /* whole frame should have 500 lines */
|
||||
.hsync_len = 1, /* note: DE only display */
|
||||
.vsync_len = 1, /* note: DE only display */
|
||||
.sync = FB_SYNC_CLK_IDLE_EN | FB_SYNC_OE_ACT_HIGH,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
}
|
||||
};
|
||||
|
||||
static struct ipu_platform_data mx3_ipu_data = {
|
||||
.irq_base = MXC_IPU_IRQ_START,
|
||||
};
|
||||
|
||||
static struct mx3fb_platform_data mx3fb_pdata = {
|
||||
.dma_dev = &mx3_ipu.dev,
|
||||
.name = "PT0708048",
|
||||
.mode = fb_modedb,
|
||||
.num_modes = ARRAY_SIZE(fb_modedb),
|
||||
};
|
||||
|
||||
static struct physmap_flash_data vpr200_flash_data = {
|
||||
.width = 2,
|
||||
};
|
||||
|
||||
static struct resource vpr200_flash_resource = {
|
||||
.start = MX35_CS0_BASE_ADDR,
|
||||
.end = MX35_CS0_BASE_ADDR + SZ_64M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device vpr200_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &vpr200_flash_data,
|
||||
},
|
||||
.resource = &vpr200_flash_resource,
|
||||
.num_resources = 1,
|
||||
};
|
||||
|
||||
static const struct mxc_nand_platform_data
|
||||
vpr200_nand_board_info __initconst = {
|
||||
.width = 1,
|
||||
.hw_ecc = 1,
|
||||
.flash_bbt = 1,
|
||||
};
|
||||
|
||||
#define VPR_KEY_DEBOUNCE 500
|
||||
static struct gpio_keys_button vpr200_gpio_keys_table[] = {
|
||||
{KEY_F2, GPIO_BUTTON1, 1, "vpr-keys: F2", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F3, GPIO_BUTTON2, 1, "vpr-keys: F3", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F4, GPIO_BUTTON3, 1, "vpr-keys: F4", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F5, GPIO_BUTTON4, 1, "vpr-keys: F5", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F6, GPIO_BUTTON5, 1, "vpr-keys: F6", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F7, GPIO_BUTTON6, 1, "vpr-keys: F7", 0, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F8, GPIO_BUTTON7, 1, "vpr-keys: F8", 1, VPR_KEY_DEBOUNCE},
|
||||
{KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE},
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data vpr200_gpio_keys_data = {
|
||||
.buttons = vpr200_gpio_keys_table,
|
||||
.nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table),
|
||||
};
|
||||
|
||||
static struct platform_device vpr200_device_gpiokeys = {
|
||||
.name = "gpio-keys",
|
||||
.dev = {
|
||||
.platform_data = &vpr200_gpio_keys_data,
|
||||
}
|
||||
};
|
||||
|
||||
static struct mc13xxx_platform_data vpr200_pmic = {
|
||||
.flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN,
|
||||
};
|
||||
|
||||
static const struct imxi2c_platform_data vpr200_i2c0_data __initconst = {
|
||||
.bitrate = 50000,
|
||||
};
|
||||
|
||||
static struct at24_platform_data vpr200_eeprom = {
|
||||
.byte_len = 2048 / 8,
|
||||
.page_size = 1,
|
||||
};
|
||||
|
||||
static struct i2c_board_info vpr200_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("at24", 0x50), /* E0=0, E1=0, E2=0 */
|
||||
.platform_data = &vpr200_eeprom,
|
||||
}, {
|
||||
I2C_BOARD_INFO("mc13892", 0x08),
|
||||
.platform_data = &vpr200_pmic,
|
||||
.irq = gpio_to_irq(GPIO_PMIC_INT),
|
||||
}
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t vpr200_pads[] = {
|
||||
/* UART1 */
|
||||
MX35_PAD_TXD1__UART1_TXD_MUX,
|
||||
MX35_PAD_RXD1__UART1_RXD_MUX,
|
||||
/* UART3 */
|
||||
MX35_PAD_ATA_DATA10__UART3_RXD_MUX,
|
||||
MX35_PAD_ATA_DATA11__UART3_TXD_MUX,
|
||||
/* FEC */
|
||||
MX35_PAD_FEC_TX_CLK__FEC_TX_CLK,
|
||||
MX35_PAD_FEC_RX_CLK__FEC_RX_CLK,
|
||||
MX35_PAD_FEC_RX_DV__FEC_RX_DV,
|
||||
MX35_PAD_FEC_COL__FEC_COL,
|
||||
MX35_PAD_FEC_RDATA0__FEC_RDATA_0,
|
||||
MX35_PAD_FEC_TDATA0__FEC_TDATA_0,
|
||||
MX35_PAD_FEC_TX_EN__FEC_TX_EN,
|
||||
MX35_PAD_FEC_MDC__FEC_MDC,
|
||||
MX35_PAD_FEC_MDIO__FEC_MDIO,
|
||||
MX35_PAD_FEC_TX_ERR__FEC_TX_ERR,
|
||||
MX35_PAD_FEC_RX_ERR__FEC_RX_ERR,
|
||||
MX35_PAD_FEC_CRS__FEC_CRS,
|
||||
MX35_PAD_FEC_RDATA1__FEC_RDATA_1,
|
||||
MX35_PAD_FEC_TDATA1__FEC_TDATA_1,
|
||||
MX35_PAD_FEC_RDATA2__FEC_RDATA_2,
|
||||
MX35_PAD_FEC_TDATA2__FEC_TDATA_2,
|
||||
MX35_PAD_FEC_RDATA3__FEC_RDATA_3,
|
||||
MX35_PAD_FEC_TDATA3__FEC_TDATA_3,
|
||||
/* Display */
|
||||
MX35_PAD_LD0__IPU_DISPB_DAT_0,
|
||||
MX35_PAD_LD1__IPU_DISPB_DAT_1,
|
||||
MX35_PAD_LD2__IPU_DISPB_DAT_2,
|
||||
MX35_PAD_LD3__IPU_DISPB_DAT_3,
|
||||
MX35_PAD_LD4__IPU_DISPB_DAT_4,
|
||||
MX35_PAD_LD5__IPU_DISPB_DAT_5,
|
||||
MX35_PAD_LD6__IPU_DISPB_DAT_6,
|
||||
MX35_PAD_LD7__IPU_DISPB_DAT_7,
|
||||
MX35_PAD_LD8__IPU_DISPB_DAT_8,
|
||||
MX35_PAD_LD9__IPU_DISPB_DAT_9,
|
||||
MX35_PAD_LD10__IPU_DISPB_DAT_10,
|
||||
MX35_PAD_LD11__IPU_DISPB_DAT_11,
|
||||
MX35_PAD_LD12__IPU_DISPB_DAT_12,
|
||||
MX35_PAD_LD13__IPU_DISPB_DAT_13,
|
||||
MX35_PAD_LD14__IPU_DISPB_DAT_14,
|
||||
MX35_PAD_LD15__IPU_DISPB_DAT_15,
|
||||
MX35_PAD_LD16__IPU_DISPB_DAT_16,
|
||||
MX35_PAD_LD17__IPU_DISPB_DAT_17,
|
||||
MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK,
|
||||
MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY,
|
||||
MX35_PAD_CONTRAST__IPU_DISPB_CONTR,
|
||||
/* LCD Enable */
|
||||
MX35_PAD_D3_VSYNC__GPIO1_2,
|
||||
/* USBOTG */
|
||||
MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR,
|
||||
MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC,
|
||||
/* SDCARD */
|
||||
MX35_PAD_SD1_CMD__ESDHC1_CMD,
|
||||
MX35_PAD_SD1_CLK__ESDHC1_CLK,
|
||||
MX35_PAD_SD1_DATA0__ESDHC1_DAT0,
|
||||
MX35_PAD_SD1_DATA1__ESDHC1_DAT1,
|
||||
MX35_PAD_SD1_DATA2__ESDHC1_DAT2,
|
||||
MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
|
||||
/* PMIC */
|
||||
MX35_PAD_GPIO2_0__GPIO2_0,
|
||||
/* GPIO keys */
|
||||
MX35_PAD_SCKR__GPIO1_4,
|
||||
MX35_PAD_COMPARE__GPIO1_5,
|
||||
MX35_PAD_SCKT__GPIO1_7,
|
||||
MX35_PAD_FST__GPIO1_8,
|
||||
MX35_PAD_HCKT__GPIO1_9,
|
||||
MX35_PAD_TX5_RX0__GPIO1_10,
|
||||
MX35_PAD_TX4_RX1__GPIO1_11,
|
||||
MX35_PAD_TX3_RX2__GPIO1_12,
|
||||
};
|
||||
|
||||
/* USB Device config */
|
||||
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
.phy_mode = FSL_USB2_PHY_UTMI,
|
||||
.workaround = FLS_USB2_WORKAROUND_ENGCM09152,
|
||||
};
|
||||
|
||||
/* USB HOST config */
|
||||
static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
|
||||
.portsc = MXC_EHCI_MODE_SERIAL,
|
||||
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI |
|
||||
MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&vpr200_flash,
|
||||
&vpr200_device_gpiokeys,
|
||||
};
|
||||
|
||||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init vpr200_board_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(vpr200_pads, ARRAY_SIZE(vpr200_pads));
|
||||
|
||||
imx35_add_fec(NULL);
|
||||
imx35_add_imx2_wdt(NULL);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
if (0 != gpio_request(GPIO_LCDPWR, "LCDPWR"))
|
||||
printk(KERN_WARNING "vpr200: Couldn't get LCDPWR gpio\n");
|
||||
else
|
||||
gpio_direction_output(GPIO_LCDPWR, 0);
|
||||
|
||||
if (0 != gpio_request(GPIO_PMIC_INT, "PMIC_INT"))
|
||||
printk(KERN_WARNING "vpr200: Couldn't get PMIC_INT gpio\n");
|
||||
else
|
||||
gpio_direction_input(GPIO_PMIC_INT);
|
||||
|
||||
imx35_add_imx_uart0(NULL);
|
||||
imx35_add_imx_uart2(NULL);
|
||||
|
||||
mxc_register_device(&mx3_ipu, &mx3_ipu_data);
|
||||
mxc_register_device(&mx3_fb, &mx3fb_pdata);
|
||||
|
||||
imx35_add_fsl_usb2_udc(&otg_device_pdata);
|
||||
imx35_add_mxc_ehci_hs(&usb_host_pdata);
|
||||
|
||||
imx35_add_mxc_nand(&vpr200_nand_board_info);
|
||||
imx35_add_sdhci_esdhc_imx(0, NULL);
|
||||
|
||||
i2c_register_board_info(0, vpr200_i2c_devices,
|
||||
ARRAY_SIZE(vpr200_i2c_devices));
|
||||
|
||||
imx35_add_imx_i2c0(&vpr200_i2c0_data);
|
||||
}
|
||||
|
||||
static void __init vpr200_timer_init(void)
|
||||
{
|
||||
mx35_clocks_init();
|
||||
}
|
||||
|
||||
struct sys_timer vpr200_timer = {
|
||||
.init = vpr200_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(VPR200, "VPR200")
|
||||
/* Maintainer: Creative Product Design */
|
||||
.map_io = mx35_map_io,
|
||||
.init_early = imx35_init_early,
|
||||
.init_irq = mx35_init_irq,
|
||||
.timer = &vpr200_timer,
|
||||
.init_machine = vpr200_board_init,
|
||||
MACHINE_END
|
|
@ -27,14 +27,8 @@
|
|||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/iomux-v3.h>
|
||||
|
||||
/*!
|
||||
* @file mm.c
|
||||
*
|
||||
* @brief This file creates static virtual to physical mappings, common to all MX3 boards.
|
||||
*
|
||||
* @ingroup Memory
|
||||
*/
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#ifdef CONFIG_SOC_IMX31
|
||||
static struct map_desc mx31_io_desc[] __initdata = {
|
||||
|
@ -52,17 +46,25 @@ static struct map_desc mx31_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mx31_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX31);
|
||||
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
|
||||
|
||||
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
|
||||
}
|
||||
|
||||
int imx31_register_gpios(void);
|
||||
void __init imx31_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX31);
|
||||
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx31_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX31, 0, 1, MX31_INT_GPIO1),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX31, 1, 2, MX31_INT_GPIO2),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX31, 2, 3, MX31_INT_GPIO3),
|
||||
};
|
||||
|
||||
void __init mx31_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
|
||||
imx31_register_gpios();
|
||||
mxc_gpio_init(imx31_gpio_ports, ARRAY_SIZE(imx31_gpio_ports));
|
||||
}
|
||||
#endif /* ifdef CONFIG_SOC_IMX31 */
|
||||
|
||||
|
@ -77,18 +79,26 @@ static struct map_desc mx35_io_desc[] __initdata = {
|
|||
|
||||
void __init mx35_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX35);
|
||||
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
|
||||
|
||||
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
|
||||
}
|
||||
|
||||
int imx35_register_gpios(void);
|
||||
void __init imx35_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX35);
|
||||
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx35_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 0, 1, MX35_INT_GPIO1),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 1, 2, MX35_INT_GPIO2),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 2, 3, MX35_INT_GPIO3),
|
||||
};
|
||||
|
||||
void __init mx35_init_irq(void)
|
||||
{
|
||||
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
|
||||
imx35_register_gpios();
|
||||
mxc_gpio_init(imx35_gpio_ports, ARRAY_SIZE(imx35_gpio_ports));
|
||||
}
|
||||
#endif /* ifdef CONFIG_SOC_IMX35 */
|
||||
|
||||
|
@ -129,4 +139,3 @@ static int mxc_init_l2x0(void)
|
|||
|
||||
arch_initcall(mxc_init_l2x0);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/types.h>
|
||||
|
@ -149,7 +150,10 @@ static int devboard_usbh1_hw_init(struct platform_device *pdev)
|
|||
mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG);
|
||||
|
||||
return 0;
|
||||
mdelay(10);
|
||||
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_SINGLE_UNI);
|
||||
}
|
||||
|
||||
#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
|
||||
|
@ -187,7 +191,6 @@ static int devboard_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
|
|||
static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
|
||||
.init = devboard_usbh1_hw_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
|
||||
};
|
||||
|
||||
static int __init devboard_usbh1_init(void)
|
||||
|
|
|
@ -265,7 +265,10 @@ static int marxbot_usbh1_hw_init(struct platform_device *pdev)
|
|||
mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG);
|
||||
mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG);
|
||||
|
||||
return 0;
|
||||
mdelay(10);
|
||||
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_INTERFACE_SINGLE_UNI);
|
||||
}
|
||||
|
||||
#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
|
||||
|
@ -303,7 +306,6 @@ static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
|
|||
static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
|
||||
.init = marxbot_usbh1_hw_init,
|
||||
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
|
||||
};
|
||||
|
||||
static int __init marxbot_usbh1_init(void)
|
||||
|
|
|
@ -123,17 +123,24 @@ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
|
|||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
|
||||
static int smartbot_otg_init(struct platform_device *pdev)
|
||||
{
|
||||
return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
|
||||
.init = smartbot_otg_init,
|
||||
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
|
||||
.flags = MXC_EHCI_POWER_PINS_ENABLED,
|
||||
};
|
||||
|
||||
static int __init smartbot_otg_host_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
|
||||
otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
|
||||
otg_host_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT);
|
||||
if (!otg_host_pdata.otg)
|
||||
return -ENODEV;
|
||||
|
||||
pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
|
||||
if (IS_ERR(pdev))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
if ARCH_MX5
|
||||
# ARCH_MX51 and ARCH_MX50 are left for compatibility
|
||||
# ARCH_MX50/51/53 are left to mark places where prevent multi-soc in single
|
||||
# image. So for most time, SOC_IMX50/51/53 should be used.
|
||||
|
||||
config ARCH_MX50
|
||||
bool
|
||||
|
@ -50,6 +51,7 @@ config MACH_MX51_BABBAGE
|
|||
config MACH_MX51_3DS
|
||||
bool "Support MX51PDK (3DS)"
|
||||
select SOC_IMX51
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_KEYPAD
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
|
@ -112,19 +114,32 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD
|
|||
|
||||
endchoice
|
||||
|
||||
config MACH_MX51_EFIKAMX
|
||||
bool "Support MX51 Genesi Efika MX nettop"
|
||||
config MX51_EFIKA_COMMON
|
||||
bool
|
||||
select SOC_IMX51
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
select IMX_HAVE_PLATFORM_SPI_IMX
|
||||
select MXC_ULPI if USB_ULPI
|
||||
|
||||
config MACH_MX51_EFIKAMX
|
||||
bool "Support MX51 Genesi Efika MX nettop"
|
||||
select MX51_EFIKA_COMMON
|
||||
help
|
||||
Include support for Genesi Efika MX nettop. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_MX51_EFIKASB
|
||||
bool "Support MX51 Genesi Efika Smartbook"
|
||||
select MX51_EFIKA_COMMON
|
||||
help
|
||||
Include support for Genesi Efika Smartbook. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_MX53_EVK
|
||||
bool "Support MX53 EVK platforms"
|
||||
select SOC_IMX53
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
|
@ -136,6 +151,8 @@ config MACH_MX53_EVK
|
|||
config MACH_MX53_SMD
|
||||
bool "Support MX53 SMD platforms"
|
||||
select SOC_IMX53
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Include support for MX53 SMD platform. This includes specific
|
||||
|
@ -144,7 +161,10 @@ config MACH_MX53_SMD
|
|||
config MACH_MX53_LOCO
|
||||
bool "Support MX53 LOCO platforms"
|
||||
select SOC_IMX53
|
||||
select IMX_HAVE_PLATFORM_IMX2_WDT
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
help
|
||||
Include support for MX53 LOCO platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
@ -157,6 +177,7 @@ config MACH_MX50_RDP
|
|||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
|
||||
select IMX_HAVE_PLATFORM_SPI_IMX
|
||||
select IMX_HAVE_PLATFORM_FEC
|
||||
help
|
||||
Include support for MX50 reference design platform (RDP) board. This
|
||||
includes specific configurations for the board and its peripherals.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
# Object file lists.
|
||||
obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o
|
||||
obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o
|
||||
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
|
||||
|
||||
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
|
||||
|
@ -16,5 +16,7 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o
|
|||
obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
|
||||
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
|
||||
obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
|
||||
obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o
|
||||
obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o
|
||||
obj-$(CONFIG_MACH_MX51_EFIKASB) += board-mx51_efikasb.o
|
||||
obj-$(CONFIG_MACH_MX50_RDP) += board-mx50_rdp.o
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
#define MX51_USB_PLL_DIV_19_2_MHZ 0x01
|
||||
#define MX51_USB_PLL_DIV_24_MHZ 0x02
|
||||
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
static struct plat_serial8250_port serial_platform_data[] = {
|
||||
{
|
||||
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
|
||||
|
@ -105,12 +104,9 @@ static struct platform_device serial_device = {
|
|||
.platform_data = serial_platform_data,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
&serial_device,
|
||||
#endif
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = {
|
||||
|
@ -188,7 +184,10 @@ static int initialize_otg_port(struct platform_device *pdev)
|
|||
v |= MX51_USB_PLL_DIV_19_2_MHZ;
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
static int initialize_usbh1_port(struct platform_device *pdev)
|
||||
|
@ -206,13 +205,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
|
|||
v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
|
||||
__raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_ITC_NO_THRESHOLD);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data dr_utmi_config = {
|
||||
.init = initialize_otg_port,
|
||||
.portsc = MXC_EHCI_UTMI_16BIT,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static struct fsl_usb2_platform_data usb_pdata = {
|
||||
|
@ -223,7 +225,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
|
|||
static struct mxc_usbh_platform_data usbh1_config = {
|
||||
.init = initialize_usbh1_port,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
|
||||
};
|
||||
|
||||
static int otg_mode_host;
|
||||
|
@ -298,7 +299,8 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
|
|||
/* Maintainer: Eric Bénard <eric@eukrea.com> */
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = eukrea_cpuimx51_init,
|
||||
.timer = &mxc_timer,
|
||||
.init_machine = eukrea_cpuimx51_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
#include "devices-imx51.h"
|
||||
#include "devices.h"
|
||||
#include "cpu_op-mx51.h"
|
||||
|
||||
#define USBH1_RST IMX_GPIO_NR(2, 28)
|
||||
#define ETH_RST IMX_GPIO_NR(2, 31)
|
||||
|
@ -109,7 +110,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
|
|||
|
||||
/* Touchscreen */
|
||||
/* IRQ */
|
||||
_MX51_PAD_CSI1_D8__GPIO3_12 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
|
||||
_MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
|
||||
PAD_CTL_PKE | PAD_CTL_SRE_FAST |
|
||||
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
|
||||
};
|
||||
|
@ -118,15 +119,9 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
|||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static int ts_get_pendown_state(void)
|
||||
{
|
||||
return gpio_get_value(TSC2007_IRQGPIO) ? 0 : 1;
|
||||
}
|
||||
|
||||
static struct tsc2007_platform_data tsc2007_info = {
|
||||
.model = 2007,
|
||||
.x_plate_ohms = 180,
|
||||
.get_pendown_state = ts_get_pendown_state,
|
||||
};
|
||||
|
||||
static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
|
||||
|
@ -167,7 +162,10 @@ static int initialize_otg_port(struct platform_device *pdev)
|
|||
v |= MX51_USB_PLL_DIV_19_2_MHZ;
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
static int initialize_usbh1_port(struct platform_device *pdev)
|
||||
|
@ -186,13 +184,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
|
|||
__raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
|
||||
usbother_base + MX51_USB_CTRL_1_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_ITC_NO_THRESHOLD);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data dr_utmi_config = {
|
||||
.init = initialize_otg_port,
|
||||
.portsc = MXC_EHCI_UTMI_16BIT,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static struct fsl_usb2_platform_data usb_pdata = {
|
||||
|
@ -203,7 +204,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
|
|||
static struct mxc_usbh_platform_data usbh1_config = {
|
||||
.init = initialize_usbh1_port,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
|
||||
};
|
||||
|
||||
static int otg_mode_host;
|
||||
|
@ -242,7 +242,7 @@ static struct mcp251x_platform_data mcp251x_info = {
|
|||
static struct spi_board_info cpuimx51sd_spi_device[] = {
|
||||
{
|
||||
.modalias = "mcp2515",
|
||||
.max_speed_hz = 6500000,
|
||||
.max_speed_hz = 10000000,
|
||||
.bus_num = 0,
|
||||
.mode = SPI_MODE_0,
|
||||
.chip_select = 0,
|
||||
|
@ -269,6 +269,10 @@ static void __init eukrea_cpuimx51sd_init(void)
|
|||
mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads,
|
||||
ARRAY_SIZE(eukrea_cpuimx51sd_pads));
|
||||
|
||||
#if defined(CONFIG_CPU_FREQ_IMX)
|
||||
get_cpu_op = mx51_get_cpu_op;
|
||||
#endif
|
||||
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info);
|
||||
|
||||
|
@ -329,7 +333,8 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
|
|||
/* Maintainer: Eric Bénard <eric@eukrea.com> */
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = eukrea_cpuimx51sd_init,
|
||||
.timer = &mxc_timer,
|
||||
.init_machine = eukrea_cpuimx51sd_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -35,7 +35,10 @@
|
|||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include "devices-mx50.h"
|
||||
#include "devices-imx50.h"
|
||||
|
||||
#define FEC_EN IMX_GPIO_NR(6, 23)
|
||||
#define FEC_RESET_B IMX_GPIO_NR(4, 12)
|
||||
|
||||
static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
|
||||
/* SD1 */
|
||||
|
@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
|
|||
MX50_PAD_I2C3_SCL__USBOTG_OC,
|
||||
|
||||
MX50_PAD_SSI_RXC__FEC_MDIO,
|
||||
MX50_PAD_SSI_RXC__FEC_MDIO,
|
||||
MX50_PAD_SSI_RXFS__FEC_MDC,
|
||||
MX50_PAD_DISP_D0__FEC_TXCLK,
|
||||
MX50_PAD_DISP_D1__FEC_RX_ER,
|
||||
MX50_PAD_DISP_D2__FEC_RX_DV,
|
||||
|
@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
|
|||
MX50_PAD_DISP_D5__FEC_TX_EN,
|
||||
MX50_PAD_DISP_D6__FEC_TXD1,
|
||||
MX50_PAD_DISP_D7__FEC_TXD0,
|
||||
MX50_PAD_SSI_RXFS__FEC_MDC,
|
||||
MX50_PAD_I2C3_SDA__GPIO_6_23,
|
||||
MX50_PAD_ECSPI1_SCLK__GPIO_4_12,
|
||||
|
||||
|
@ -168,6 +170,24 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
|||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static const struct fec_platform_data fec_data __initconst = {
|
||||
.phy = PHY_INTERFACE_MODE_RMII,
|
||||
};
|
||||
|
||||
static inline void mx50_rdp_fec_reset(void)
|
||||
{
|
||||
gpio_request(FEC_EN, "fec-en");
|
||||
gpio_direction_output(FEC_EN, 0);
|
||||
gpio_request(FEC_RESET_B, "fec-reset_b");
|
||||
gpio_direction_output(FEC_RESET_B, 0);
|
||||
msleep(1);
|
||||
gpio_set_value(FEC_RESET_B, 1);
|
||||
}
|
||||
|
||||
static const struct imxi2c_platform_data i2c_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
|
@ -178,6 +198,11 @@ static void __init mx50_rdp_board_init(void)
|
|||
|
||||
imx50_add_imx_uart(0, &uart_pdata);
|
||||
imx50_add_imx_uart(1, &uart_pdata);
|
||||
mx50_rdp_fec_reset();
|
||||
imx50_add_fec(&fec_data);
|
||||
imx50_add_imx_i2c(0, &i2c_data);
|
||||
imx50_add_imx_i2c(1, &i2c_data);
|
||||
imx50_add_imx_i2c(2, &i2c_data);
|
||||
}
|
||||
|
||||
static void __init mx50_rdp_timer_init(void)
|
||||
|
@ -191,7 +216,8 @@ static struct sys_timer mx50_rdp_timer = {
|
|||
|
||||
MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
|
||||
.map_io = mx50_map_io,
|
||||
.init_early = imx50_init_early,
|
||||
.init_irq = mx50_init_irq,
|
||||
.init_machine = mx50_rdp_board_init,
|
||||
.timer = &mx50_rdp_timer,
|
||||
.init_machine = mx50_rdp_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -71,24 +71,10 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = {
|
|||
};
|
||||
|
||||
/* Serial ports */
|
||||
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_imx_uart(1, &uart_pdata);
|
||||
imx51_add_imx_uart(2, &uart_pdata);
|
||||
}
|
||||
#else /* !SERIAL_IMX */
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
}
|
||||
#endif /* SERIAL_IMX */
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE)
|
||||
static int mx51_3ds_board_keymap[] = {
|
||||
KEY(0, 0, KEY_1),
|
||||
KEY(0, 1, KEY_2),
|
||||
|
@ -124,16 +110,6 @@ static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
|
|||
.keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap),
|
||||
};
|
||||
|
||||
static void mxc_init_keypad(void)
|
||||
{
|
||||
imx51_add_imx_keypad(&mx51_3ds_map_data);
|
||||
}
|
||||
#else
|
||||
static inline void mxc_init_keypad(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int mx51_3ds_spi2_cs[] = {
|
||||
MXC_SPI_CS(0),
|
||||
MX51_3DS_ECSPI2_CS,
|
||||
|
@ -157,11 +133,14 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = {
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx51_3ds_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
|
||||
ARRAY_SIZE(mx51_3ds_pads));
|
||||
mxc_init_imx_uart();
|
||||
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_imx_uart(1, &uart_pdata);
|
||||
imx51_add_imx_uart(2, &uart_pdata);
|
||||
|
||||
imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
|
||||
spi_register_board_info(mx51_3ds_spi_nor_device,
|
||||
|
@ -172,7 +151,8 @@ static void __init mxc_board_init(void)
|
|||
"devices on the board are unusable.\n");
|
||||
|
||||
imx51_add_sdhci_esdhc_imx(0, NULL);
|
||||
mxc_init_keypad();
|
||||
imx51_add_imx_keypad(&mx51_3ds_map_data);
|
||||
imx51_add_imx2_wdt(0, NULL);
|
||||
}
|
||||
|
||||
static void __init mx51_3ds_timer_init(void)
|
||||
|
@ -180,15 +160,16 @@ static void __init mx51_3ds_timer_init(void)
|
|||
mx51_clocks_init(32768, 24000000, 22579200, 0);
|
||||
}
|
||||
|
||||
static struct sys_timer mxc_timer = {
|
||||
.init = mx51_3ds_timer_init,
|
||||
static struct sys_timer mx51_3ds_timer = {
|
||||
.init = mx51_3ds_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
|
||||
/* Maintainer: Freescale Semiconductor, Inc. */
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mxc_timer,
|
||||
.timer = &mx51_3ds_timer,
|
||||
.init_machine = mx51_3ds_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -161,23 +161,10 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
|
|||
};
|
||||
|
||||
/* Serial ports */
|
||||
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_imx_uart(1, &uart_pdata);
|
||||
imx51_add_imx_uart(2, &uart_pdata);
|
||||
}
|
||||
#else /* !SERIAL_IMX */
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
}
|
||||
#endif /* SERIAL_IMX */
|
||||
|
||||
static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
@ -272,7 +259,10 @@ static int initialize_otg_port(struct platform_device *pdev)
|
|||
v |= MX51_USB_PLL_DIV_19_2_MHZ;
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
static int initialize_usbh1_port(struct platform_device *pdev)
|
||||
|
@ -290,13 +280,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
|
|||
v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
|
||||
__raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
|
||||
MXC_EHCI_ITC_NO_THRESHOLD);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data dr_utmi_config = {
|
||||
.init = initialize_otg_port,
|
||||
.portsc = MXC_EHCI_UTMI_16BIT,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
};
|
||||
|
||||
static struct fsl_usb2_platform_data usb_pdata = {
|
||||
|
@ -307,7 +300,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
|
|||
static struct mxc_usbh_platform_data usbh1_config = {
|
||||
.init = initialize_usbh1_port,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
|
||||
};
|
||||
|
||||
static int otg_mode_host;
|
||||
|
@ -349,7 +341,7 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
|
|||
/*
|
||||
* Board specific initialization.
|
||||
*/
|
||||
static void __init mxc_board_init(void)
|
||||
static void __init mx51_babbage_init(void)
|
||||
{
|
||||
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
|
||||
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
|
||||
|
@ -360,7 +352,11 @@ static void __init mxc_board_init(void)
|
|||
#endif
|
||||
mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
|
||||
ARRAY_SIZE(mx51babbage_pads));
|
||||
mxc_init_imx_uart();
|
||||
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_imx_uart(1, &uart_pdata);
|
||||
imx51_add_imx_uart(2, &uart_pdata);
|
||||
|
||||
babbage_fec_reset();
|
||||
imx51_add_fec(NULL);
|
||||
|
||||
|
@ -399,15 +395,16 @@ static void __init mx51_babbage_timer_init(void)
|
|||
mx51_clocks_init(32768, 24000000, 22579200, 0);
|
||||
}
|
||||
|
||||
static struct sys_timer mxc_timer = {
|
||||
.init = mx51_babbage_timer_init,
|
||||
static struct sys_timer mx51_babbage_timer = {
|
||||
.init = mx51_babbage_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
|
||||
/* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mxc_timer,
|
||||
.timer = &mx51_babbage_timer,
|
||||
.init_machine = mx51_babbage_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include <linux/fsl_devices.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mfd/mc13892.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
|
@ -40,8 +43,7 @@
|
|||
|
||||
#include "devices-imx51.h"
|
||||
#include "devices.h"
|
||||
|
||||
#define MX51_USB_PLL_DIV_24_MHZ 0x01
|
||||
#include "efika.h"
|
||||
|
||||
#define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16)
|
||||
#define EFIKAMX_PCBID1 IMX_GPIO_NR(3, 17)
|
||||
|
@ -53,13 +55,14 @@
|
|||
|
||||
#define EFIKAMX_POWER_KEY IMX_GPIO_NR(2, 31)
|
||||
|
||||
#define EFIKAMX_SPI_CS0 IMX_GPIO_NR(4, 24)
|
||||
#define EFIKAMX_SPI_CS1 IMX_GPIO_NR(4, 25)
|
||||
|
||||
/* board 1.1 doesn't have same reset gpio */
|
||||
#define EFIKAMX_RESET1_1 IMX_GPIO_NR(3, 2)
|
||||
#define EFIKAMX_RESET IMX_GPIO_NR(1, 4)
|
||||
|
||||
#define EFIKAMX_POWEROFF IMX_GPIO_NR(4, 13)
|
||||
|
||||
#define EFIKAMX_PMIC IMX_GPIO_NR(1, 6)
|
||||
|
||||
/* the pci ids pin have pull up. they're driven low according to board id */
|
||||
#define MX51_PAD_PCBID0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
|
||||
#define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
|
||||
|
@ -67,38 +70,11 @@
|
|||
#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
|
||||
|
||||
static iomux_v3_cfg_t mx51efikamx_pads[] = {
|
||||
/* UART1 */
|
||||
MX51_PAD_UART1_RXD__UART1_RXD,
|
||||
MX51_PAD_UART1_TXD__UART1_TXD,
|
||||
MX51_PAD_UART1_RTS__UART1_RTS,
|
||||
MX51_PAD_UART1_CTS__UART1_CTS,
|
||||
/* board id */
|
||||
MX51_PAD_PCBID0,
|
||||
MX51_PAD_PCBID1,
|
||||
MX51_PAD_PCBID2,
|
||||
|
||||
/* SD 1 */
|
||||
MX51_PAD_SD1_CMD__SD1_CMD,
|
||||
MX51_PAD_SD1_CLK__SD1_CLK,
|
||||
MX51_PAD_SD1_DATA0__SD1_DATA0,
|
||||
MX51_PAD_SD1_DATA1__SD1_DATA1,
|
||||
MX51_PAD_SD1_DATA2__SD1_DATA2,
|
||||
MX51_PAD_SD1_DATA3__SD1_DATA3,
|
||||
|
||||
/* SD 2 */
|
||||
MX51_PAD_SD2_CMD__SD2_CMD,
|
||||
MX51_PAD_SD2_CLK__SD2_CLK,
|
||||
MX51_PAD_SD2_DATA0__SD2_DATA0,
|
||||
MX51_PAD_SD2_DATA1__SD2_DATA1,
|
||||
MX51_PAD_SD2_DATA2__SD2_DATA2,
|
||||
MX51_PAD_SD2_DATA3__SD2_DATA3,
|
||||
|
||||
/* SD/MMC WP/CD */
|
||||
MX51_PAD_GPIO1_0__SD1_CD,
|
||||
MX51_PAD_GPIO1_1__SD1_WP,
|
||||
MX51_PAD_GPIO1_7__SD2_WP,
|
||||
MX51_PAD_GPIO1_8__SD2_CD,
|
||||
|
||||
/* leds */
|
||||
MX51_PAD_CSI1_D9__GPIO3_13,
|
||||
MX51_PAD_CSI1_VSYNC__GPIO3_14,
|
||||
|
@ -107,64 +83,12 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
|
|||
/* power key */
|
||||
MX51_PAD_PWRKEY,
|
||||
|
||||
/* spi */
|
||||
MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
|
||||
MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
|
||||
MX51_PAD_CSPI1_SS0__GPIO4_24,
|
||||
MX51_PAD_CSPI1_SS1__GPIO4_25,
|
||||
MX51_PAD_CSPI1_RDY__ECSPI1_RDY,
|
||||
MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
|
||||
|
||||
/* reset */
|
||||
MX51_PAD_DI1_PIN13__GPIO3_2,
|
||||
MX51_PAD_GPIO1_4__GPIO1_4,
|
||||
};
|
||||
|
||||
/* Serial ports */
|
||||
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
|
||||
static const struct imxuart_platform_data uart_pdata = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
imx51_add_imx_uart(1, &uart_pdata);
|
||||
imx51_add_imx_uart(2, &uart_pdata);
|
||||
}
|
||||
#else /* !SERIAL_IMX */
|
||||
static inline void mxc_init_imx_uart(void)
|
||||
{
|
||||
}
|
||||
#endif /* SERIAL_IMX */
|
||||
|
||||
/* This function is board specific as the bit mask for the plldiv will also
|
||||
* be different for other Freescale SoCs, thus a common bitmask is not
|
||||
* possible and cannot get place in /plat-mxc/ehci.c.
|
||||
*/
|
||||
static int initialize_otg_port(struct platform_device *pdev)
|
||||
{
|
||||
u32 v;
|
||||
void __iomem *usb_base;
|
||||
void __iomem *usbother_base;
|
||||
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
|
||||
if (!usb_base)
|
||||
return -ENOMEM;
|
||||
usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
|
||||
|
||||
/* Set the PHY clock to 19.2MHz */
|
||||
v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
|
||||
v |= MX51_USB_PLL_DIV_24_MHZ;
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
iounmap(usb_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data dr_utmi_config = {
|
||||
.init = initialize_otg_port,
|
||||
.portsc = MXC_EHCI_UTMI_16BIT,
|
||||
.flags = MXC_EHCI_INTERNAL_PHY,
|
||||
/* power off */
|
||||
MX51_PAD_CSI2_VSYNC__GPIO4_13,
|
||||
};
|
||||
|
||||
/* PCBID2 PCBID1 PCBID0 STATE
|
||||
|
@ -265,47 +189,6 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon
|
|||
.nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey),
|
||||
};
|
||||
|
||||
static struct mtd_partition mx51_efikamx_spi_nor_partitions[] = {
|
||||
{
|
||||
.name = "u-boot",
|
||||
.offset = 0,
|
||||
.size = SZ_256K,
|
||||
},
|
||||
{
|
||||
.name = "config",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = SZ_64K,
|
||||
},
|
||||
};
|
||||
|
||||
static struct flash_platform_data mx51_efikamx_spi_flash_data = {
|
||||
.name = "spi_flash",
|
||||
.parts = mx51_efikamx_spi_nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(mx51_efikamx_spi_nor_partitions),
|
||||
.type = "sst25vf032b",
|
||||
};
|
||||
|
||||
static struct spi_board_info mx51_efikamx_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "m25p80",
|
||||
.max_speed_hz = 25000000,
|
||||
.bus_num = 0,
|
||||
.chip_select = 1,
|
||||
.platform_data = &mx51_efikamx_spi_flash_data,
|
||||
.irq = -1,
|
||||
},
|
||||
};
|
||||
|
||||
static int mx51_efikamx_spi_cs[] = {
|
||||
EFIKAMX_SPI_CS0,
|
||||
EFIKAMX_SPI_CS1,
|
||||
};
|
||||
|
||||
static const struct spi_imx_master mx51_efikamx_spi_pdata __initconst = {
|
||||
.chipselect = mx51_efikamx_spi_cs,
|
||||
.num_chipselect = ARRAY_SIZE(mx51_efikamx_spi_cs),
|
||||
};
|
||||
|
||||
void mx51_efikamx_reset(void)
|
||||
{
|
||||
if (system_rev == 0x11)
|
||||
|
@ -314,14 +197,53 @@ void mx51_efikamx_reset(void)
|
|||
gpio_direction_output(EFIKAMX_RESET, 0);
|
||||
}
|
||||
|
||||
static void __init mxc_board_init(void)
|
||||
static struct regulator *pwgt1, *pwgt2, *coincell;
|
||||
|
||||
static void mx51_efikamx_power_off(void)
|
||||
{
|
||||
if (!IS_ERR(coincell))
|
||||
regulator_disable(coincell);
|
||||
|
||||
if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
|
||||
regulator_disable(pwgt2);
|
||||
regulator_disable(pwgt1);
|
||||
}
|
||||
gpio_direction_output(EFIKAMX_POWEROFF, 1);
|
||||
}
|
||||
|
||||
static int __init mx51_efikamx_power_init(void)
|
||||
{
|
||||
if (machine_is_mx51_efikamx()) {
|
||||
pwgt1 = regulator_get(NULL, "pwgt1");
|
||||
pwgt2 = regulator_get(NULL, "pwgt2");
|
||||
if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
|
||||
regulator_enable(pwgt1);
|
||||
regulator_enable(pwgt2);
|
||||
}
|
||||
gpio_request(EFIKAMX_POWEROFF, "poweroff");
|
||||
pm_power_off = mx51_efikamx_power_off;
|
||||
|
||||
/* enable coincell charger. maybe need a small power driver ? */
|
||||
coincell = regulator_get(NULL, "coincell");
|
||||
if (!IS_ERR(coincell)) {
|
||||
regulator_set_voltage(coincell, 3000000, 3000000);
|
||||
regulator_enable(coincell);
|
||||
}
|
||||
|
||||
regulator_has_full_constraints();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(mx51_efikamx_power_init);
|
||||
|
||||
static void __init mx51_efikamx_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
|
||||
ARRAY_SIZE(mx51efikamx_pads));
|
||||
efika_board_common_init();
|
||||
|
||||
mx51_efikamx_board_id();
|
||||
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
|
||||
mxc_init_imx_uart();
|
||||
imx51_add_sdhci_esdhc_imx(0, NULL);
|
||||
|
||||
/* on < 1.2 boards both SD controllers are used */
|
||||
if (system_rev < 0x12) {
|
||||
|
@ -332,10 +254,6 @@ static void __init mxc_board_init(void)
|
|||
platform_device_register(&mx51_efikamx_leds_device);
|
||||
imx51_add_gpio_keys(&mx51_efikamx_powerkey_data);
|
||||
|
||||
spi_register_board_info(mx51_efikamx_spi_board_info,
|
||||
ARRAY_SIZE(mx51_efikamx_spi_board_info));
|
||||
imx51_add_ecspi(0, &mx51_efikamx_spi_pdata);
|
||||
|
||||
if (system_rev == 0x11) {
|
||||
gpio_request(EFIKAMX_RESET1_1, "reset");
|
||||
gpio_direction_output(EFIKAMX_RESET1_1, 1);
|
||||
|
@ -343,6 +261,20 @@ static void __init mxc_board_init(void)
|
|||
gpio_request(EFIKAMX_RESET, "reset");
|
||||
gpio_direction_output(EFIKAMX_RESET, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* enable wifi by default only on mx
|
||||
* sb and mx have same wlan pin but the value to enable it are
|
||||
* different :/
|
||||
*/
|
||||
gpio_request(EFIKA_WLAN_EN, "wlan_en");
|
||||
gpio_direction_output(EFIKA_WLAN_EN, 0);
|
||||
msleep(10);
|
||||
|
||||
gpio_request(EFIKA_WLAN_RESET, "wlan_rst");
|
||||
gpio_direction_output(EFIKA_WLAN_RESET, 0);
|
||||
msleep(10);
|
||||
gpio_set_value(EFIKA_WLAN_RESET, 1);
|
||||
}
|
||||
|
||||
static void __init mx51_efikamx_timer_init(void)
|
||||
|
@ -350,15 +282,16 @@ static void __init mx51_efikamx_timer_init(void)
|
|||
mx51_clocks_init(32768, 24000000, 22579200, 24576000);
|
||||
}
|
||||
|
||||
static struct sys_timer mxc_timer = {
|
||||
.init = mx51_efikamx_timer_init,
|
||||
static struct sys_timer mx51_efikamx_timer = {
|
||||
.init = mx51_efikamx_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
|
||||
/* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &mxc_timer,
|
||||
.timer = &mx51_efikamx_timer,
|
||||
.init_machine = mx51_efikamx_init,
|
||||
MACHINE_END
|
||||
|
|
283
arch/arm/mach-mx5/board-mx51_efikasb.c
Normal file
283
arch/arm/mach-mx5/board-mx51_efikasb.c
Normal file
|
@ -0,0 +1,283 @@
|
|||
/*
|
||||
* Copyright (C) Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
*
|
||||
* based on code from the following
|
||||
* Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright 2009-2010 Pegatron Corporation. All Rights Reserved.
|
||||
* Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved.
|
||||
*
|
||||
* The code contained herein is licensed under the GNU General Public
|
||||
* License. You may obtain a copy of the GNU General Public License
|
||||
* Version 2 or later at the following locations:
|
||||
*
|
||||
* http://www.opensource.org/licenses/gpl-license.html
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/fsl_devices.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mfd/mc13892.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/ulpi.h>
|
||||
#include <mach/ulpi.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/iomux-mx51.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include "devices-imx51.h"
|
||||
#include "devices.h"
|
||||
#include "efika.h"
|
||||
|
||||
#define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20)
|
||||
#define EFIKASB_GREEN_LED IMX_GPIO_NR(1, 3)
|
||||
#define EFIKASB_WHITE_LED IMX_GPIO_NR(2, 25)
|
||||
#define EFIKASB_PCBID0 IMX_GPIO_NR(2, 28)
|
||||
#define EFIKASB_PCBID1 IMX_GPIO_NR(2, 29)
|
||||
#define EFIKASB_PWRKEY IMX_GPIO_NR(2, 31)
|
||||
#define EFIKASB_LID IMX_GPIO_NR(3, 14)
|
||||
#define EFIKASB_POWEROFF IMX_GPIO_NR(4, 13)
|
||||
#define EFIKASB_RFKILL IMX_GPIO_NR(3, 1)
|
||||
|
||||
#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
|
||||
|
||||
static iomux_v3_cfg_t mx51efikasb_pads[] = {
|
||||
/* USB HOST2 */
|
||||
MX51_PAD_EIM_D16__USBH2_DATA0,
|
||||
MX51_PAD_EIM_D17__USBH2_DATA1,
|
||||
MX51_PAD_EIM_D18__USBH2_DATA2,
|
||||
MX51_PAD_EIM_D19__USBH2_DATA3,
|
||||
MX51_PAD_EIM_D20__USBH2_DATA4,
|
||||
MX51_PAD_EIM_D21__USBH2_DATA5,
|
||||
MX51_PAD_EIM_D22__USBH2_DATA6,
|
||||
MX51_PAD_EIM_D23__USBH2_DATA7,
|
||||
MX51_PAD_EIM_A24__USBH2_CLK,
|
||||
MX51_PAD_EIM_A25__USBH2_DIR,
|
||||
MX51_PAD_EIM_A26__USBH2_STP,
|
||||
MX51_PAD_EIM_A27__USBH2_NXT,
|
||||
|
||||
/* leds */
|
||||
MX51_PAD_EIM_CS0__GPIO2_25,
|
||||
MX51_PAD_GPIO1_3__GPIO1_3,
|
||||
|
||||
/* pcb id */
|
||||
MX51_PAD_EIM_CS3__GPIO2_28,
|
||||
MX51_PAD_EIM_CS4__GPIO2_29,
|
||||
|
||||
/* lid */
|
||||
MX51_PAD_CSI1_VSYNC__GPIO3_14,
|
||||
|
||||
/* power key*/
|
||||
MX51_PAD_PWRKEY,
|
||||
|
||||
/* wifi/bt button */
|
||||
MX51_PAD_DI1_PIN12__GPIO3_1,
|
||||
|
||||
/* power off */
|
||||
MX51_PAD_CSI2_VSYNC__GPIO4_13,
|
||||
|
||||
/* wdog reset */
|
||||
MX51_PAD_GPIO1_4__WDOG1_WDOG_B,
|
||||
|
||||
/* BT */
|
||||
MX51_PAD_EIM_A17__GPIO2_11,
|
||||
};
|
||||
|
||||
static int initialize_usbh2_port(struct platform_device *pdev)
|
||||
{
|
||||
iomux_v3_cfg_t usbh2stp = MX51_PAD_EIM_A26__USBH2_STP;
|
||||
iomux_v3_cfg_t usbh2gpio = MX51_PAD_EIM_A26__GPIO2_20;
|
||||
|
||||
mxc_iomux_v3_setup_pad(usbh2gpio);
|
||||
gpio_request(EFIKASB_USBH2_STP, "usbh2_stp");
|
||||
gpio_direction_output(EFIKASB_USBH2_STP, 0);
|
||||
msleep(1);
|
||||
gpio_set_value(EFIKASB_USBH2_STP, 1);
|
||||
msleep(1);
|
||||
|
||||
gpio_free(EFIKASB_USBH2_STP);
|
||||
mxc_iomux_v3_setup_pad(usbh2stp);
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_config = {
|
||||
.init = initialize_usbh2_port,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
};
|
||||
|
||||
static void __init mx51_efikasb_usb(void)
|
||||
{
|
||||
usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
|
||||
if (usbh2_config.otg)
|
||||
mxc_register_device(&mxc_usbh2_device, &usbh2_config);
|
||||
}
|
||||
|
||||
static struct gpio_led mx51_efikasb_leds[] = {
|
||||
{
|
||||
.name = "efikasb:green",
|
||||
.default_trigger = "default-on",
|
||||
.gpio = EFIKASB_GREEN_LED,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "efikasb:white",
|
||||
.default_trigger = "caps",
|
||||
.gpio = EFIKASB_WHITE_LED,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data mx51_efikasb_leds_data = {
|
||||
.leds = mx51_efikasb_leds,
|
||||
.num_leds = ARRAY_SIZE(mx51_efikasb_leds),
|
||||
};
|
||||
|
||||
static struct platform_device mx51_efikasb_leds_device = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &mx51_efikasb_leds_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_button mx51_efikasb_keys[] = {
|
||||
{
|
||||
.code = KEY_POWER,
|
||||
.gpio = EFIKASB_PWRKEY,
|
||||
.type = EV_PWR,
|
||||
.desc = "Power Button",
|
||||
.wakeup = 1,
|
||||
.debounce_interval = 10, /* ms */
|
||||
},
|
||||
{
|
||||
.code = SW_LID,
|
||||
.gpio = EFIKASB_LID,
|
||||
.type = EV_SW,
|
||||
.desc = "Lid Switch",
|
||||
},
|
||||
{
|
||||
/* SW_RFKILLALL vs KEY_RFKILL ? */
|
||||
.code = SW_RFKILL_ALL,
|
||||
.gpio = EFIKASB_RFKILL,
|
||||
.type = EV_SW,
|
||||
.desc = "rfkill",
|
||||
},
|
||||
};
|
||||
|
||||
static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst = {
|
||||
.buttons = mx51_efikasb_keys,
|
||||
.nbuttons = ARRAY_SIZE(mx51_efikasb_keys),
|
||||
};
|
||||
|
||||
static struct regulator *pwgt1, *pwgt2;
|
||||
|
||||
static void mx51_efikasb_power_off(void)
|
||||
{
|
||||
gpio_set_value(EFIKA_USB_PHY_RESET, 0);
|
||||
|
||||
if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
|
||||
regulator_disable(pwgt2);
|
||||
regulator_disable(pwgt1);
|
||||
}
|
||||
gpio_direction_output(EFIKASB_POWEROFF, 1);
|
||||
}
|
||||
|
||||
static int __init mx51_efikasb_power_init(void)
|
||||
{
|
||||
if (machine_is_mx51_efikasb()) {
|
||||
pwgt1 = regulator_get(NULL, "pwgt1");
|
||||
pwgt2 = regulator_get(NULL, "pwgt2");
|
||||
if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
|
||||
regulator_enable(pwgt1);
|
||||
regulator_enable(pwgt2);
|
||||
}
|
||||
gpio_request(EFIKASB_POWEROFF, "poweroff");
|
||||
pm_power_off = mx51_efikasb_power_off;
|
||||
|
||||
regulator_has_full_constraints();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(mx51_efikasb_power_init);
|
||||
|
||||
/* 01 R1.3 board
|
||||
10 R2.0 board */
|
||||
static void __init mx51_efikasb_board_id(void)
|
||||
{
|
||||
int id;
|
||||
|
||||
gpio_request(EFIKASB_PCBID0, "pcb id0");
|
||||
gpio_direction_input(EFIKASB_PCBID0);
|
||||
gpio_request(EFIKASB_PCBID1, "pcb id1");
|
||||
gpio_direction_input(EFIKASB_PCBID1);
|
||||
|
||||
id = gpio_get_value(EFIKASB_PCBID0);
|
||||
id |= gpio_get_value(EFIKASB_PCBID1) << 1;
|
||||
|
||||
switch (id) {
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
system_rev = 0x13;
|
||||
break;
|
||||
case 2:
|
||||
system_rev = 0x20;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void __init efikasb_board_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx51efikasb_pads,
|
||||
ARRAY_SIZE(mx51efikasb_pads));
|
||||
efika_board_common_init();
|
||||
|
||||
mx51_efikasb_board_id();
|
||||
mx51_efikasb_usb();
|
||||
imx51_add_sdhci_esdhc_imx(1, NULL);
|
||||
|
||||
platform_device_register(&mx51_efikasb_leds_device);
|
||||
imx51_add_gpio_keys(&mx51_efikasb_keys_data);
|
||||
|
||||
}
|
||||
|
||||
static void __init mx51_efikasb_timer_init(void)
|
||||
{
|
||||
mx51_clocks_init(32768, 24000000, 22579200, 24576000);
|
||||
}
|
||||
|
||||
static struct sys_timer mx51_efikasb_timer = {
|
||||
.init = mx51_efikasb_timer_init,
|
||||
};
|
||||
|
||||
MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
|
||||
.boot_params = MX51_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx51_map_io,
|
||||
.init_early = imx51_init_early,
|
||||
.init_irq = mx51_init_irq,
|
||||
.init_machine = efikasb_board_init,
|
||||
.timer = &mx51_efikasb_timer,
|
||||
MACHINE_END
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2010 Yong Shen. <Yong.Shen@linaro.org>
|
||||
*/
|
||||
|
||||
|
@ -42,28 +42,24 @@
|
|||
#include "devices-imx53.h"
|
||||
|
||||
static iomux_v3_cfg_t mx53_evk_pads[] = {
|
||||
MX53_PAD_CSI0_D10__UART1_TXD,
|
||||
MX53_PAD_CSI0_D11__UART1_RXD,
|
||||
MX53_PAD_ATA_DIOW__UART1_TXD,
|
||||
MX53_PAD_ATA_DMACK__UART1_RXD,
|
||||
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
|
||||
MX53_PAD_CSI0_DAT11__UART1_RXD_MUX,
|
||||
|
||||
MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
|
||||
MX53_PAD_ATA_DMARQ__UART2_TXD,
|
||||
MX53_PAD_ATA_DIOR__UART2_RTS,
|
||||
MX53_PAD_ATA_INTRQ__UART2_CTS,
|
||||
MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
|
||||
MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
|
||||
MX53_PAD_PATA_DIOR__UART2_RTS,
|
||||
MX53_PAD_PATA_INTRQ__UART2_CTS,
|
||||
|
||||
MX53_PAD_ATA_CS_0__UART3_TXD,
|
||||
MX53_PAD_ATA_CS_1__UART3_RXD,
|
||||
MX53_PAD_ATA_DA_1__UART3_CTS,
|
||||
MX53_PAD_ATA_DA_2__UART3_RTS,
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX,
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX,
|
||||
|
||||
MX53_PAD_EIM_D16__CSPI1_SCLK,
|
||||
MX53_PAD_EIM_D17__CSPI1_MISO,
|
||||
MX53_PAD_EIM_D18__CSPI1_MOSI,
|
||||
MX53_PAD_EIM_D16__ECSPI1_SCLK,
|
||||
MX53_PAD_EIM_D17__ECSPI1_MISO,
|
||||
MX53_PAD_EIM_D18__ECSPI1_MOSI,
|
||||
|
||||
/* ecspi chip select lines */
|
||||
MX53_PAD_EIM_EB2__GPIO_2_30,
|
||||
MX53_PAD_EIM_D19__GPIO_3_19,
|
||||
MX53_PAD_EIM_EB2__GPIO2_30,
|
||||
MX53_PAD_EIM_D19__GPIO3_19,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
|
||||
|
@ -72,9 +68,9 @@ static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
|
|||
|
||||
static inline void mx53_evk_init_uart(void)
|
||||
{
|
||||
imx53_add_imx_uart(0, &mx53_evk_uart_pdata);
|
||||
imx53_add_imx_uart(0, NULL);
|
||||
imx53_add_imx_uart(1, &mx53_evk_uart_pdata);
|
||||
imx53_add_imx_uart(2, &mx53_evk_uart_pdata);
|
||||
imx53_add_imx_uart(2, NULL);
|
||||
}
|
||||
|
||||
static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = {
|
||||
|
@ -139,6 +135,7 @@ static void __init mx53_evk_board_init(void)
|
|||
spi_register_board_info(mx53_evk_spi_board_info,
|
||||
ARRAY_SIZE(mx53_evk_spi_board_info));
|
||||
imx53_add_ecspi(0, &mx53_evk_spi_data);
|
||||
imx53_add_imx2_wdt(0, NULL);
|
||||
}
|
||||
|
||||
static void __init mx53_evk_timer_init(void)
|
||||
|
@ -152,7 +149,8 @@ static struct sys_timer mx53_evk_timer = {
|
|||
|
||||
MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
|
||||
.map_io = mx53_map_io,
|
||||
.init_early = imx53_init_early,
|
||||
.init_irq = mx53_init_irq,
|
||||
.init_machine = mx53_evk_board_init,
|
||||
.timer = &mx53_evk_timer,
|
||||
.init_machine = mx53_evk_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -39,33 +39,147 @@
|
|||
#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6)
|
||||
|
||||
static iomux_v3_cfg_t mx53_loco_pads[] = {
|
||||
MX53_PAD_CSI0_D10__UART1_TXD,
|
||||
MX53_PAD_CSI0_D11__UART1_RXD,
|
||||
MX53_PAD_ATA_DIOW__UART1_TXD,
|
||||
MX53_PAD_ATA_DMACK__UART1_RXD,
|
||||
|
||||
MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
|
||||
MX53_PAD_ATA_DMARQ__UART2_TXD,
|
||||
MX53_PAD_ATA_DIOR__UART2_RTS,
|
||||
MX53_PAD_ATA_INTRQ__UART2_CTS,
|
||||
|
||||
MX53_PAD_ATA_CS_0__UART3_TXD,
|
||||
MX53_PAD_ATA_CS_1__UART3_RXD,
|
||||
MX53_PAD_ATA_DA_1__UART3_CTS,
|
||||
MX53_PAD_ATA_DA_2__UART3_RTS,
|
||||
/* FEC */
|
||||
MX53_PAD_FEC_MDC__FEC_MDC,
|
||||
MX53_PAD_FEC_MDIO__FEC_MDIO,
|
||||
MX53_PAD_FEC_REF_CLK__FEC_TX_CLK,
|
||||
MX53_PAD_FEC_RX_ER__FEC_RX_ER,
|
||||
MX53_PAD_FEC_CRS_DV__FEC_RX_DV,
|
||||
MX53_PAD_FEC_RXD1__FEC_RDATA_1,
|
||||
MX53_PAD_FEC_RXD0__FEC_RDATA_0,
|
||||
MX53_PAD_FEC_TX_EN__FEC_TX_EN,
|
||||
MX53_PAD_FEC_TXD1__FEC_TDATA_1,
|
||||
MX53_PAD_FEC_TXD0__FEC_TDATA_0,
|
||||
/* FEC_nRST */
|
||||
MX53_PAD_PATA_DA_0__GPIO7_6,
|
||||
/* FEC_nINT */
|
||||
MX53_PAD_PATA_DATA4__GPIO2_4,
|
||||
/* AUDMUX5 */
|
||||
MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC,
|
||||
MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD,
|
||||
MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS,
|
||||
MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD,
|
||||
/* I2C2 */
|
||||
MX53_PAD_KEY_COL3__I2C2_SCL,
|
||||
MX53_PAD_KEY_ROW3__I2C2_SDA,
|
||||
/* SD1 */
|
||||
MX53_PAD_SD1_CMD__ESDHC1_CMD,
|
||||
MX53_PAD_SD1_CLK__ESDHC1_CLK,
|
||||
MX53_PAD_SD1_DATA0__ESDHC1_DAT0,
|
||||
MX53_PAD_SD1_DATA1__ESDHC1_DAT1,
|
||||
MX53_PAD_SD1_DATA2__ESDHC1_DAT2,
|
||||
MX53_PAD_SD1_DATA3__ESDHC1_DAT3,
|
||||
/* SD3 */
|
||||
MX53_PAD_PATA_DATA8__ESDHC3_DAT0,
|
||||
MX53_PAD_PATA_DATA9__ESDHC3_DAT1,
|
||||
MX53_PAD_PATA_DATA10__ESDHC3_DAT2,
|
||||
MX53_PAD_PATA_DATA11__ESDHC3_DAT3,
|
||||
MX53_PAD_PATA_DATA0__ESDHC3_DAT4,
|
||||
MX53_PAD_PATA_DATA1__ESDHC3_DAT5,
|
||||
MX53_PAD_PATA_DATA2__ESDHC3_DAT6,
|
||||
MX53_PAD_PATA_DATA3__ESDHC3_DAT7,
|
||||
MX53_PAD_PATA_IORDY__ESDHC3_CLK,
|
||||
MX53_PAD_PATA_RESET_B__ESDHC3_CMD,
|
||||
/* SD3_CD */
|
||||
MX53_PAD_EIM_DA11__GPIO3_11,
|
||||
/* SD3_WP */
|
||||
MX53_PAD_EIM_DA12__GPIO3_12,
|
||||
/* VGA */
|
||||
MX53_PAD_EIM_OE__IPU_DI1_PIN7,
|
||||
MX53_PAD_EIM_RW__IPU_DI1_PIN8,
|
||||
/* DISPLB */
|
||||
MX53_PAD_EIM_D20__IPU_SER_DISP0_CS,
|
||||
MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK,
|
||||
MX53_PAD_EIM_D22__IPU_DISPB0_SER_DIN,
|
||||
MX53_PAD_EIM_D23__IPU_DI0_D0_CS,
|
||||
/* DISP0_POWER_EN */
|
||||
MX53_PAD_EIM_D24__GPIO3_24,
|
||||
/* DISP0 DET INT */
|
||||
MX53_PAD_EIM_D31__GPIO3_31,
|
||||
/* LVDS */
|
||||
MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3,
|
||||
MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK,
|
||||
MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2,
|
||||
MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1,
|
||||
MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0,
|
||||
MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3,
|
||||
MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2,
|
||||
MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK,
|
||||
MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1,
|
||||
MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0,
|
||||
/* I2C1 */
|
||||
MX53_PAD_CSI0_DAT8__I2C1_SDA,
|
||||
MX53_PAD_CSI0_DAT9__I2C1_SCL,
|
||||
/* UART1 */
|
||||
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
|
||||
MX53_PAD_CSI0_DAT11__UART1_RXD_MUX,
|
||||
/* CSI0 */
|
||||
MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12,
|
||||
MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13,
|
||||
MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14,
|
||||
MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15,
|
||||
MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16,
|
||||
MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17,
|
||||
MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18,
|
||||
MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19,
|
||||
MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC,
|
||||
MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC,
|
||||
MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK,
|
||||
/* DISPLAY */
|
||||
MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK,
|
||||
MX53_PAD_DI0_PIN15__IPU_DI0_PIN15,
|
||||
MX53_PAD_DI0_PIN2__IPU_DI0_PIN2,
|
||||
MX53_PAD_DI0_PIN3__IPU_DI0_PIN3,
|
||||
MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0,
|
||||
MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1,
|
||||
MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2,
|
||||
MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3,
|
||||
MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4,
|
||||
MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5,
|
||||
MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6,
|
||||
MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7,
|
||||
MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8,
|
||||
MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9,
|
||||
MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10,
|
||||
MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11,
|
||||
MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12,
|
||||
MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13,
|
||||
MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14,
|
||||
MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15,
|
||||
MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16,
|
||||
MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17,
|
||||
MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18,
|
||||
MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19,
|
||||
MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20,
|
||||
MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21,
|
||||
MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22,
|
||||
MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23,
|
||||
/* Audio CLK*/
|
||||
MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK,
|
||||
/* PWM */
|
||||
MX53_PAD_GPIO_1__PWM2_PWMO,
|
||||
/* SPDIF */
|
||||
MX53_PAD_GPIO_7__SPDIF_PLOCK,
|
||||
MX53_PAD_GPIO_17__SPDIF_OUT1,
|
||||
/* GPIO */
|
||||
MX53_PAD_PATA_DA_1__GPIO7_7,
|
||||
MX53_PAD_PATA_DA_2__GPIO7_8,
|
||||
MX53_PAD_PATA_DATA5__GPIO2_5,
|
||||
MX53_PAD_PATA_DATA6__GPIO2_6,
|
||||
MX53_PAD_PATA_DATA14__GPIO2_14,
|
||||
MX53_PAD_PATA_DATA15__GPIO2_15,
|
||||
MX53_PAD_PATA_INTRQ__GPIO7_2,
|
||||
MX53_PAD_EIM_WAIT__GPIO5_0,
|
||||
MX53_PAD_NANDF_WP_B__GPIO6_9,
|
||||
MX53_PAD_NANDF_RB0__GPIO6_10,
|
||||
MX53_PAD_NANDF_CS1__GPIO6_14,
|
||||
MX53_PAD_NANDF_CS2__GPIO6_15,
|
||||
MX53_PAD_NANDF_CS3__GPIO6_16,
|
||||
MX53_PAD_GPIO_5__GPIO1_5,
|
||||
MX53_PAD_GPIO_16__GPIO7_11,
|
||||
MX53_PAD_GPIO_8__GPIO1_8,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data mx53_loco_uart_data __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static inline void mx53_loco_init_uart(void)
|
||||
{
|
||||
imx53_add_imx_uart(0, &mx53_loco_uart_data);
|
||||
imx53_add_imx_uart(1, &mx53_loco_uart_data);
|
||||
imx53_add_imx_uart(2, &mx53_loco_uart_data);
|
||||
}
|
||||
|
||||
static inline void mx53_loco_fec_reset(void)
|
||||
{
|
||||
int ret;
|
||||
|
@ -85,13 +199,22 @@ static struct fec_platform_data mx53_loco_fec_data = {
|
|||
.phy = PHY_INTERFACE_MODE_RMII,
|
||||
};
|
||||
|
||||
static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
static void __init mx53_loco_board_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
|
||||
ARRAY_SIZE(mx53_loco_pads));
|
||||
mx53_loco_init_uart();
|
||||
imx53_add_imx_uart(0, NULL);
|
||||
mx53_loco_fec_reset();
|
||||
imx53_add_fec(&mx53_loco_fec_data);
|
||||
imx53_add_imx2_wdt(0, NULL);
|
||||
imx53_add_imx_i2c(0, &mx53_loco_i2c_data);
|
||||
imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
|
||||
imx53_add_sdhci_esdhc_imx(0, NULL);
|
||||
imx53_add_sdhci_esdhc_imx(2, NULL);
|
||||
}
|
||||
|
||||
static void __init mx53_loco_timer_init(void)
|
||||
|
@ -105,7 +228,8 @@ static struct sys_timer mx53_loco_timer = {
|
|||
|
||||
MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
|
||||
.map_io = mx53_map_io,
|
||||
.init_early = imx53_init_early,
|
||||
.init_irq = mx53_init_irq,
|
||||
.init_machine = mx53_loco_board_init,
|
||||
.timer = &mx53_loco_timer,
|
||||
.init_machine = mx53_loco_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -39,20 +39,19 @@
|
|||
#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
|
||||
|
||||
static iomux_v3_cfg_t mx53_smd_pads[] = {
|
||||
MX53_PAD_CSI0_D10__UART1_TXD,
|
||||
MX53_PAD_CSI0_D11__UART1_RXD,
|
||||
MX53_PAD_ATA_DIOW__UART1_TXD,
|
||||
MX53_PAD_ATA_DMACK__UART1_RXD,
|
||||
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
|
||||
MX53_PAD_CSI0_DAT11__UART1_RXD_MUX,
|
||||
|
||||
MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
|
||||
MX53_PAD_ATA_DMARQ__UART2_TXD,
|
||||
MX53_PAD_ATA_DIOR__UART2_RTS,
|
||||
MX53_PAD_ATA_INTRQ__UART2_CTS,
|
||||
MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
|
||||
MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
|
||||
|
||||
MX53_PAD_ATA_CS_0__UART3_TXD,
|
||||
MX53_PAD_ATA_CS_1__UART3_RXD,
|
||||
MX53_PAD_ATA_DA_1__UART3_CTS,
|
||||
MX53_PAD_ATA_DA_2__UART3_RTS,
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX,
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX,
|
||||
MX53_PAD_PATA_DA_1__UART3_CTS,
|
||||
MX53_PAD_PATA_DA_2__UART3_RTS,
|
||||
/* I2C1 */
|
||||
MX53_PAD_CSI0_DAT8__I2C1_SDA,
|
||||
MX53_PAD_CSI0_DAT9__I2C1_SCL,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data mx53_smd_uart_data __initconst = {
|
||||
|
@ -61,8 +60,8 @@ static const struct imxuart_platform_data mx53_smd_uart_data __initconst = {
|
|||
|
||||
static inline void mx53_smd_init_uart(void)
|
||||
{
|
||||
imx53_add_imx_uart(0, &mx53_smd_uart_data);
|
||||
imx53_add_imx_uart(1, &mx53_smd_uart_data);
|
||||
imx53_add_imx_uart(0, NULL);
|
||||
imx53_add_imx_uart(1, NULL);
|
||||
imx53_add_imx_uart(2, &mx53_smd_uart_data);
|
||||
}
|
||||
|
||||
|
@ -85,6 +84,10 @@ static struct fec_platform_data mx53_smd_fec_data = {
|
|||
.phy = PHY_INTERFACE_MODE_RMII,
|
||||
};
|
||||
|
||||
static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
static void __init mx53_smd_board_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads,
|
||||
|
@ -92,6 +95,8 @@ static void __init mx53_smd_board_init(void)
|
|||
mx53_smd_init_uart();
|
||||
mx53_smd_fec_reset();
|
||||
imx53_add_fec(&mx53_smd_fec_data);
|
||||
imx53_add_imx2_wdt(0, NULL);
|
||||
imx53_add_imx_i2c(0, &mx53_smd_i2c_data);
|
||||
}
|
||||
|
||||
static void __init mx53_smd_timer_init(void)
|
||||
|
@ -105,7 +110,8 @@ static struct sys_timer mx53_smd_timer = {
|
|||
|
||||
MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
|
||||
.map_io = mx53_map_io,
|
||||
.init_early = imx53_init_early,
|
||||
.init_irq = mx53_init_irq,
|
||||
.init_machine = mx53_smd_board_init,
|
||||
.timer = &mx53_smd_timer,
|
||||
.init_machine = mx53_smd_board_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -42,6 +42,9 @@ static struct clk usboh3_clk;
|
|||
static struct clk emi_fast_clk;
|
||||
static struct clk ipu_clk;
|
||||
static struct clk mipi_hsc1_clk;
|
||||
static struct clk esdhc1_clk;
|
||||
static struct clk esdhc2_clk;
|
||||
static struct clk esdhc3_mx53_clk;
|
||||
|
||||
#define MAX_DPLL_WAIT_TRIES 1000 /* 1000 * udelay(1) = 1ms */
|
||||
|
||||
|
@ -867,10 +870,6 @@ static struct clk gpt_32k_clk = {
|
|||
.parent = &ckil_clk,
|
||||
};
|
||||
|
||||
static struct clk kpp_clk = {
|
||||
.id = 0,
|
||||
};
|
||||
|
||||
static struct clk dummy_clk = {
|
||||
.id = 0,
|
||||
};
|
||||
|
@ -1147,10 +1146,80 @@ CLK_GET_RATE(esdhc1, 1, ESDHC1_MSHC1)
|
|||
CLK_SET_PARENT(esdhc1, 1, ESDHC1_MSHC1)
|
||||
CLK_SET_RATE(esdhc1, 1, ESDHC1_MSHC1)
|
||||
|
||||
/* mx51 specific */
|
||||
CLK_GET_RATE(esdhc2, 1, ESDHC2_MSHC2)
|
||||
CLK_SET_PARENT(esdhc2, 1, ESDHC2_MSHC2)
|
||||
CLK_SET_RATE(esdhc2, 1, ESDHC2_MSHC2)
|
||||
|
||||
static int clk_esdhc3_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = __raw_readl(MXC_CCM_CSCMR1);
|
||||
if (parent == &esdhc1_clk)
|
||||
reg &= ~MXC_CCM_CSCMR1_ESDHC3_CLK_SEL;
|
||||
else if (parent == &esdhc2_clk)
|
||||
reg |= MXC_CCM_CSCMR1_ESDHC3_CLK_SEL;
|
||||
else
|
||||
return -EINVAL;
|
||||
__raw_writel(reg, MXC_CCM_CSCMR1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int clk_esdhc4_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = __raw_readl(MXC_CCM_CSCMR1);
|
||||
if (parent == &esdhc1_clk)
|
||||
reg &= ~MXC_CCM_CSCMR1_ESDHC4_CLK_SEL;
|
||||
else if (parent == &esdhc2_clk)
|
||||
reg |= MXC_CCM_CSCMR1_ESDHC4_CLK_SEL;
|
||||
else
|
||||
return -EINVAL;
|
||||
__raw_writel(reg, MXC_CCM_CSCMR1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* mx53 specific */
|
||||
static int clk_esdhc2_mx53_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = __raw_readl(MXC_CCM_CSCMR1);
|
||||
if (parent == &esdhc1_clk)
|
||||
reg &= ~MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL;
|
||||
else if (parent == &esdhc3_mx53_clk)
|
||||
reg |= MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL;
|
||||
else
|
||||
return -EINVAL;
|
||||
__raw_writel(reg, MXC_CCM_CSCMR1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CLK_GET_RATE(esdhc3_mx53, 1, ESDHC3_MX53)
|
||||
CLK_SET_PARENT(esdhc3_mx53, 1, ESDHC3_MX53)
|
||||
CLK_SET_RATE(esdhc3_mx53, 1, ESDHC3_MX53)
|
||||
|
||||
static int clk_esdhc4_mx53_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = __raw_readl(MXC_CCM_CSCMR1);
|
||||
if (parent == &esdhc1_clk)
|
||||
reg &= ~MXC_CCM_CSCMR1_ESDHC4_CLK_SEL;
|
||||
else if (parent == &esdhc3_mx53_clk)
|
||||
reg |= MXC_CCM_CSCMR1_ESDHC4_CLK_SEL;
|
||||
else
|
||||
return -EINVAL;
|
||||
__raw_writel(reg, MXC_CCM_CSCMR1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define DEFINE_CLOCK_FULL(name, i, er, es, gr, sr, e, d, p, s) \
|
||||
static struct clk name = { \
|
||||
.id = i, \
|
||||
|
@ -1255,9 +1324,62 @@ DEFINE_CLOCK_MAX(esdhc1_clk, 0, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG1_OFFSET,
|
|||
clk_esdhc1, &pll2_sw_clk, &esdhc1_ipg_clk);
|
||||
DEFINE_CLOCK_FULL(esdhc2_ipg_clk, 1, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG2_OFFSET,
|
||||
NULL, NULL, _clk_max_enable, _clk_max_disable, &ipg_clk, NULL);
|
||||
DEFINE_CLOCK_FULL(esdhc3_ipg_clk, 2, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG4_OFFSET,
|
||||
NULL, NULL, _clk_max_enable, _clk_max_disable, &ipg_clk, NULL);
|
||||
DEFINE_CLOCK_FULL(esdhc4_ipg_clk, 3, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG6_OFFSET,
|
||||
NULL, NULL, _clk_max_enable, _clk_max_disable, &ipg_clk, NULL);
|
||||
|
||||
/* mx51 specific */
|
||||
DEFINE_CLOCK_MAX(esdhc2_clk, 1, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG3_OFFSET,
|
||||
clk_esdhc2, &pll2_sw_clk, &esdhc2_ipg_clk);
|
||||
|
||||
static struct clk esdhc3_clk = {
|
||||
.id = 2,
|
||||
.parent = &esdhc1_clk,
|
||||
.set_parent = clk_esdhc3_set_parent,
|
||||
.enable_reg = MXC_CCM_CCGR3,
|
||||
.enable_shift = MXC_CCM_CCGRx_CG5_OFFSET,
|
||||
.enable = _clk_max_enable,
|
||||
.disable = _clk_max_disable,
|
||||
.secondary = &esdhc3_ipg_clk,
|
||||
};
|
||||
static struct clk esdhc4_clk = {
|
||||
.id = 3,
|
||||
.parent = &esdhc1_clk,
|
||||
.set_parent = clk_esdhc4_set_parent,
|
||||
.enable_reg = MXC_CCM_CCGR3,
|
||||
.enable_shift = MXC_CCM_CCGRx_CG7_OFFSET,
|
||||
.enable = _clk_max_enable,
|
||||
.disable = _clk_max_disable,
|
||||
.secondary = &esdhc4_ipg_clk,
|
||||
};
|
||||
|
||||
/* mx53 specific */
|
||||
static struct clk esdhc2_mx53_clk = {
|
||||
.id = 2,
|
||||
.parent = &esdhc1_clk,
|
||||
.set_parent = clk_esdhc2_mx53_set_parent,
|
||||
.enable_reg = MXC_CCM_CCGR3,
|
||||
.enable_shift = MXC_CCM_CCGRx_CG3_OFFSET,
|
||||
.enable = _clk_max_enable,
|
||||
.disable = _clk_max_disable,
|
||||
.secondary = &esdhc3_ipg_clk,
|
||||
};
|
||||
|
||||
DEFINE_CLOCK_MAX(esdhc3_mx53_clk, 2, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG5_OFFSET,
|
||||
clk_esdhc3_mx53, &pll2_sw_clk, &esdhc2_ipg_clk);
|
||||
|
||||
static struct clk esdhc4_mx53_clk = {
|
||||
.id = 3,
|
||||
.parent = &esdhc1_clk,
|
||||
.set_parent = clk_esdhc4_mx53_set_parent,
|
||||
.enable_reg = MXC_CCM_CCGR3,
|
||||
.enable_shift = MXC_CCM_CCGRx_CG7_OFFSET,
|
||||
.enable = _clk_max_enable,
|
||||
.disable = _clk_max_disable,
|
||||
.secondary = &esdhc4_ipg_clk,
|
||||
};
|
||||
|
||||
DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk);
|
||||
DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk);
|
||||
DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk);
|
||||
|
@ -1302,7 +1424,7 @@ static struct clk_lookup mx51_lookups[] = {
|
|||
_REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_ahb_clk)
|
||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk)
|
||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk)
|
||||
_REGISTER_CLOCK("imx-keypad", NULL, kpp_clk)
|
||||
_REGISTER_CLOCK("imx-keypad", NULL, dummy_clk)
|
||||
_REGISTER_CLOCK("mxc_nand", NULL, nfc_clk)
|
||||
_REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
|
||||
_REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
|
||||
|
@ -1316,6 +1438,8 @@ static struct clk_lookup mx51_lookups[] = {
|
|||
_REGISTER_CLOCK("imx51-cspi.0", NULL, cspi_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.2", NULL, esdhc3_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.3", NULL, esdhc4_clk)
|
||||
_REGISTER_CLOCK(NULL, "cpu_clk", cpu_clk)
|
||||
_REGISTER_CLOCK(NULL, "iim_clk", iim_clk)
|
||||
_REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
|
||||
|
@ -1336,10 +1460,14 @@ static struct clk_lookup mx53_lookups[] = {
|
|||
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
|
||||
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_mx53_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.2", NULL, esdhc3_mx53_clk)
|
||||
_REGISTER_CLOCK("sdhci-esdhc-imx.3", NULL, esdhc4_mx53_clk)
|
||||
_REGISTER_CLOCK("imx53-ecspi.0", NULL, ecspi1_clk)
|
||||
_REGISTER_CLOCK("imx53-ecspi.1", NULL, ecspi2_clk)
|
||||
_REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
|
||||
_REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
|
||||
_REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
|
||||
};
|
||||
|
||||
static void clk_tree_init(void)
|
||||
|
@ -1427,6 +1555,14 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
|
|||
mx53_revision();
|
||||
clk_disable(&iim_clk);
|
||||
|
||||
/* Set SDHC parents to be PLL2 */
|
||||
clk_set_parent(&esdhc1_clk, &pll2_sw_clk);
|
||||
clk_set_parent(&esdhc3_mx53_clk, &pll2_sw_clk);
|
||||
|
||||
/* set SDHC root clock as 200MHZ*/
|
||||
clk_set_rate(&esdhc1_clk, 200000000);
|
||||
clk_set_rate(&esdhc3_mx53_clk, 200000000);
|
||||
|
||||
/* System timer */
|
||||
mxc_timer_init(&gpt_clk, MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR),
|
||||
MX53_INT_GPT);
|
||||
|
|
|
@ -78,11 +78,16 @@ static int get_mx53_srev(void)
|
|||
void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR);
|
||||
u32 rev = readl(iim_base + IIM_SREV) & 0xff;
|
||||
|
||||
if (rev == 0x0)
|
||||
switch (rev) {
|
||||
case 0x0:
|
||||
return IMX_CHIP_REVISION_1_0;
|
||||
else if (rev == 0x10)
|
||||
case 0x2:
|
||||
return IMX_CHIP_REVISION_2_0;
|
||||
return 0;
|
||||
case 0x3:
|
||||
return IMX_CHIP_REVISION_2_1;
|
||||
default:
|
||||
return IMX_CHIP_REVISION_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -217,9 +217,12 @@
|
|||
#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET (20)
|
||||
#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK (0x3 << 20)
|
||||
#define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL (0x1 << 19)
|
||||
#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL (0x1 << 19)
|
||||
#define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL (0x1 << 18)
|
||||
#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET (16)
|
||||
#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK (0x3 << 16)
|
||||
#define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_OFFSET (16)
|
||||
#define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_MASK (0x3 << 16)
|
||||
#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET (14)
|
||||
#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14)
|
||||
#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12)
|
||||
|
@ -271,6 +274,10 @@
|
|||
#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK (0x7 << 22)
|
||||
#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET (19)
|
||||
#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK (0x7 << 19)
|
||||
#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_OFFSET (22)
|
||||
#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_MASK (0x7 << 22)
|
||||
#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET (19)
|
||||
#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK (0x7 << 19)
|
||||
#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET (16)
|
||||
#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16)
|
||||
#define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14)
|
||||
|
|
|
@ -24,3 +24,11 @@
|
|||
extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst;
|
||||
#define imx50_add_imx_uart(id, pdata) \
|
||||
imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata)
|
||||
|
||||
extern const struct imx_fec_data imx50_fec_data __initconst;
|
||||
#define imx50_add_fec(pdata) \
|
||||
imx_add_fec(&imx50_fec_data, pdata)
|
||||
|
||||
extern const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst;
|
||||
#define imx50_add_imx_i2c(id, pdata) \
|
||||
imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata)
|
|
@ -29,3 +29,7 @@ imx53_sdhci_esdhc_imx_data[] __initconst;
|
|||
extern const struct imx_spi_imx_data imx53_ecspi_data[] __initconst;
|
||||
#define imx53_add_ecspi(id, pdata) \
|
||||
imx_add_spi_imx(&imx53_ecspi_data[id], pdata)
|
||||
|
||||
extern const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst;
|
||||
#define imx53_add_imx2_wdt(id, pdata) \
|
||||
imx_add_imx2_wdt(&imx53_imx2_wdt_data[id])
|
||||
|
|
10
arch/arm/mach-mx5/efika.h
Normal file
10
arch/arm/mach-mx5/efika.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _EFIKA_H
|
||||
#define _EFIKA_H
|
||||
|
||||
#define EFIKA_WLAN_EN IMX_GPIO_NR(2, 16)
|
||||
#define EFIKA_WLAN_RESET IMX_GPIO_NR(2, 10)
|
||||
#define EFIKA_USB_PHY_RESET IMX_GPIO_NR(2, 9)
|
||||
|
||||
void __init efika_board_common_init(void);
|
||||
|
||||
#endif
|
156
arch/arm/mach-mx5/ehci.c
Normal file
156
arch/arm/mach-mx5/ehci.c
Normal file
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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 <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#define MXC_OTG_OFFSET 0
|
||||
#define MXC_H1_OFFSET 0x200
|
||||
#define MXC_H2_OFFSET 0x400
|
||||
|
||||
/* USB_CTRL */
|
||||
#define MXC_OTG_UCTRL_OWIE_BIT (1 << 27) /* OTG wakeup intr enable */
|
||||
#define MXC_OTG_UCTRL_OPM_BIT (1 << 24) /* OTG power mask */
|
||||
#define MXC_H1_UCTRL_H1UIE_BIT (1 << 12) /* Host1 ULPI interrupt enable */
|
||||
#define MXC_H1_UCTRL_H1WIE_BIT (1 << 11) /* HOST1 wakeup intr enable */
|
||||
#define MXC_H1_UCTRL_H1PM_BIT (1 << 8) /* HOST1 power mask */
|
||||
|
||||
/* USB_PHY_CTRL_FUNC */
|
||||
#define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8) /* OTG Disable Overcurrent Event */
|
||||
#define MXC_H1_OC_DIS_BIT (1 << 5) /* UH1 Disable Overcurrent Event */
|
||||
|
||||
/* USBH2CTRL */
|
||||
#define MXC_H2_UCTRL_H2UIE_BIT (1 << 8)
|
||||
#define MXC_H2_UCTRL_H2WIE_BIT (1 << 7)
|
||||
#define MXC_H2_UCTRL_H2PM_BIT (1 << 4)
|
||||
|
||||
#define MXC_USBCMD_OFFSET 0x140
|
||||
|
||||
/* USBCMD */
|
||||
#define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */
|
||||
|
||||
int mx51_initialize_usb_hw(int port, unsigned int flags)
|
||||
{
|
||||
unsigned int v;
|
||||
void __iomem *usb_base;
|
||||
void __iomem *usbotg_base;
|
||||
void __iomem *usbother_base;
|
||||
int ret = 0;
|
||||
|
||||
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
|
||||
if (!usb_base) {
|
||||
printk(KERN_ERR "%s(): ioremap failed\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
switch (port) {
|
||||
case 0: /* OTG port */
|
||||
usbotg_base = usb_base + MXC_OTG_OFFSET;
|
||||
break;
|
||||
case 1: /* Host 1 port */
|
||||
usbotg_base = usb_base + MXC_H1_OFFSET;
|
||||
break;
|
||||
case 2: /* Host 2 port */
|
||||
usbotg_base = usb_base + MXC_H2_OFFSET;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR"%s no such port %d\n", __func__, port);
|
||||
ret = -ENOENT;
|
||||
goto error;
|
||||
}
|
||||
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
|
||||
|
||||
switch (port) {
|
||||
case 0: /*OTG port */
|
||||
if (flags & MXC_EHCI_INTERNAL_PHY) {
|
||||
v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
|
||||
|
||||
if (flags & MXC_EHCI_POWER_PINS_ENABLED) {
|
||||
/* OC/USBPWR is not used */
|
||||
v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
|
||||
} else {
|
||||
/* OC/USBPWR is used */
|
||||
v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
|
||||
}
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
|
||||
|
||||
v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
|
||||
if (flags & MXC_EHCI_WAKEUP_ENABLED)
|
||||
v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */
|
||||
else
|
||||
v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */
|
||||
if (flags & MXC_EHCI_POWER_PINS_ENABLED)
|
||||
v |= MXC_OTG_UCTRL_OPM_BIT;
|
||||
else
|
||||
v &= ~MXC_OTG_UCTRL_OPM_BIT;
|
||||
__raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
|
||||
}
|
||||
break;
|
||||
case 1: /* Host 1 */
|
||||
/*Host ULPI */
|
||||
v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
|
||||
if (flags & MXC_EHCI_WAKEUP_ENABLED) {
|
||||
/* HOST1 wakeup/ULPI intr enable */
|
||||
v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
|
||||
} else {
|
||||
/* HOST1 wakeup/ULPI intr disable */
|
||||
v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
|
||||
}
|
||||
|
||||
if (flags & MXC_EHCI_POWER_PINS_ENABLED)
|
||||
v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
|
||||
else
|
||||
v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
|
||||
__raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
|
||||
|
||||
v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
|
||||
if (flags & MXC_EHCI_POWER_PINS_ENABLED)
|
||||
v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */
|
||||
else
|
||||
v |= MXC_H1_OC_DIS_BIT; /* OC is not used */
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
|
||||
|
||||
v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET);
|
||||
if (flags & MXC_EHCI_ITC_NO_THRESHOLD)
|
||||
/* Interrupt Threshold Control:Immediate (no threshold) */
|
||||
v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK;
|
||||
__raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET);
|
||||
break;
|
||||
case 2: /* Host 2 ULPI */
|
||||
v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET);
|
||||
if (flags & MXC_EHCI_WAKEUP_ENABLED) {
|
||||
/* HOST1 wakeup/ULPI intr enable */
|
||||
v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
|
||||
} else {
|
||||
/* HOST1 wakeup/ULPI intr disable */
|
||||
v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
|
||||
}
|
||||
|
||||
if (flags & MXC_EHCI_POWER_PINS_ENABLED)
|
||||
v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
|
||||
else
|
||||
v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
|
||||
__raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);
|
||||
break;
|
||||
}
|
||||
|
||||
error:
|
||||
iounmap(usb_base);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -26,6 +26,8 @@
|
|||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/iomux-v3.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/*
|
||||
* Define the MX50 memory map.
|
||||
|
@ -44,16 +46,27 @@ static struct map_desc mx50_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mx50_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX50);
|
||||
mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
|
||||
iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
|
||||
}
|
||||
|
||||
int imx50_register_gpios(void);
|
||||
void __init imx50_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX50);
|
||||
mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
|
||||
}
|
||||
|
||||
static struct mxc_gpio_port imx50_gpio_ports[] = {
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 0, 1, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 1, 2, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 2, 3, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 3, 4, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 4, 5, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
|
||||
DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 5, 6, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
|
||||
};
|
||||
|
||||
void __init mx50_init_irq(void)
|
||||
{
|
||||
tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
|
||||
imx50_register_gpios();
|
||||
mxc_gpio_init(imx50_gpio_ports, ARRAY_SIZE(imx50_gpio_ports));
|
||||
}
|
||||
|
|
|
@ -46,19 +46,27 @@ static struct map_desc mx53_io_desc[] __initdata = {
|
|||
* for the IO modules.
|
||||
*/
|
||||
void __init mx51_map_io(void)
|
||||
{
|
||||
iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
|
||||
}
|
||||
|
||||
void __init imx51_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX51);
|
||||
mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
|
||||
iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
|
||||
}
|
||||
|
||||
void __init mx53_map_io(void)
|
||||
{
|
||||
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
|
||||
}
|
||||
|
||||
void __init imx53_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MX53);
|
||||
mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR));
|
||||
mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG_BASE_ADDR));
|
||||
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
|
||||
mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
|
||||
}
|
||||
|
||||
int imx51_register_gpios(void);
|
||||
|
|
636
arch/arm/mach-mx5/mx51_efika.c
Normal file
636
arch/arm/mach-mx5/mx51_efika.c
Normal file
|
@ -0,0 +1,636 @@
|
|||
/*
|
||||
* based on code from the following
|
||||
* Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright 2009-2010 Pegatron Corporation. All Rights Reserved.
|
||||
* Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved.
|
||||
*
|
||||
* The code contained herein is licensed under the GNU General Public
|
||||
* License. You may obtain a copy of the GNU General Public License
|
||||
* Version 2 or later at the following locations:
|
||||
*
|
||||
* http://www.opensource.org/licenses/gpl-license.html
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/fsl_devices.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mfd/mc13892.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/iomux-mx51.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/ulpi.h>
|
||||
#include <mach/ulpi.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include "devices-imx51.h"
|
||||
#include "devices.h"
|
||||
#include "efika.h"
|
||||
#include "cpu_op-mx51.h"
|
||||
|
||||
#define MX51_USB_CTRL_1_OFFSET 0x10
|
||||
#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
|
||||
#define MX51_USB_PLL_DIV_19_2_MHZ 0x01
|
||||
|
||||
#define EFIKAMX_USB_HUB_RESET IMX_GPIO_NR(1, 5)
|
||||
#define EFIKAMX_USBH1_STP IMX_GPIO_NR(1, 27)
|
||||
|
||||
#define EFIKAMX_SPI_CS0 IMX_GPIO_NR(4, 24)
|
||||
#define EFIKAMX_SPI_CS1 IMX_GPIO_NR(4, 25)
|
||||
|
||||
#define EFIKAMX_PMIC IMX_GPIO_NR(1, 6)
|
||||
|
||||
static iomux_v3_cfg_t mx51efika_pads[] = {
|
||||
/* UART1 */
|
||||
MX51_PAD_UART1_RXD__UART1_RXD,
|
||||
MX51_PAD_UART1_TXD__UART1_TXD,
|
||||
MX51_PAD_UART1_RTS__UART1_RTS,
|
||||
MX51_PAD_UART1_CTS__UART1_CTS,
|
||||
|
||||
/* SD 1 */
|
||||
MX51_PAD_SD1_CMD__SD1_CMD,
|
||||
MX51_PAD_SD1_CLK__SD1_CLK,
|
||||
MX51_PAD_SD1_DATA0__SD1_DATA0,
|
||||
MX51_PAD_SD1_DATA1__SD1_DATA1,
|
||||
MX51_PAD_SD1_DATA2__SD1_DATA2,
|
||||
MX51_PAD_SD1_DATA3__SD1_DATA3,
|
||||
|
||||
/* SD 2 */
|
||||
MX51_PAD_SD2_CMD__SD2_CMD,
|
||||
MX51_PAD_SD2_CLK__SD2_CLK,
|
||||
MX51_PAD_SD2_DATA0__SD2_DATA0,
|
||||
MX51_PAD_SD2_DATA1__SD2_DATA1,
|
||||
MX51_PAD_SD2_DATA2__SD2_DATA2,
|
||||
MX51_PAD_SD2_DATA3__SD2_DATA3,
|
||||
|
||||
/* SD/MMC WP/CD */
|
||||
MX51_PAD_GPIO1_0__SD1_CD,
|
||||
MX51_PAD_GPIO1_1__SD1_WP,
|
||||
MX51_PAD_GPIO1_7__SD2_WP,
|
||||
MX51_PAD_GPIO1_8__SD2_CD,
|
||||
|
||||
/* spi */
|
||||
MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
|
||||
MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
|
||||
MX51_PAD_CSPI1_SS0__GPIO4_24,
|
||||
MX51_PAD_CSPI1_SS1__GPIO4_25,
|
||||
MX51_PAD_CSPI1_RDY__ECSPI1_RDY,
|
||||
MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
|
||||
MX51_PAD_GPIO1_6__GPIO1_6,
|
||||
|
||||
/* USB HOST1 */
|
||||
MX51_PAD_USBH1_CLK__USBH1_CLK,
|
||||
MX51_PAD_USBH1_DIR__USBH1_DIR,
|
||||
MX51_PAD_USBH1_NXT__USBH1_NXT,
|
||||
MX51_PAD_USBH1_DATA0__USBH1_DATA0,
|
||||
MX51_PAD_USBH1_DATA1__USBH1_DATA1,
|
||||
MX51_PAD_USBH1_DATA2__USBH1_DATA2,
|
||||
MX51_PAD_USBH1_DATA3__USBH1_DATA3,
|
||||
MX51_PAD_USBH1_DATA4__USBH1_DATA4,
|
||||
MX51_PAD_USBH1_DATA5__USBH1_DATA5,
|
||||
MX51_PAD_USBH1_DATA6__USBH1_DATA6,
|
||||
MX51_PAD_USBH1_DATA7__USBH1_DATA7,
|
||||
|
||||
/* USB HUB RESET */
|
||||
MX51_PAD_GPIO1_5__GPIO1_5,
|
||||
|
||||
/* WLAN */
|
||||
MX51_PAD_EIM_A22__GPIO2_16,
|
||||
MX51_PAD_EIM_A16__GPIO2_10,
|
||||
|
||||
/* USB PHY RESET */
|
||||
MX51_PAD_EIM_D27__GPIO2_9,
|
||||
};
|
||||
|
||||
/* Serial ports */
|
||||
static const struct imxuart_platform_data uart_pdata = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
/* This function is board specific as the bit mask for the plldiv will also
|
||||
* be different for other Freescale SoCs, thus a common bitmask is not
|
||||
* possible and cannot get place in /plat-mxc/ehci.c.
|
||||
*/
|
||||
static int initialize_otg_port(struct platform_device *pdev)
|
||||
{
|
||||
u32 v;
|
||||
void __iomem *usb_base;
|
||||
void __iomem *usbother_base;
|
||||
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
|
||||
if (!usb_base)
|
||||
return -ENOMEM;
|
||||
usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
|
||||
|
||||
/* Set the PHY clock to 19.2MHz */
|
||||
v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
|
||||
v |= MX51_USB_PLL_DIV_19_2_MHZ;
|
||||
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
|
||||
iounmap(usb_base);
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data dr_utmi_config = {
|
||||
.init = initialize_otg_port,
|
||||
.portsc = MXC_EHCI_UTMI_16BIT,
|
||||
};
|
||||
|
||||
static int initialize_usbh1_port(struct platform_device *pdev)
|
||||
{
|
||||
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
|
||||
iomux_v3_cfg_t usbh1gpio = MX51_PAD_USBH1_STP__GPIO1_27;
|
||||
u32 v;
|
||||
void __iomem *usb_base;
|
||||
void __iomem *socregs_base;
|
||||
|
||||
mxc_iomux_v3_setup_pad(usbh1gpio);
|
||||
gpio_request(EFIKAMX_USBH1_STP, "usbh1_stp");
|
||||
gpio_direction_output(EFIKAMX_USBH1_STP, 0);
|
||||
msleep(1);
|
||||
gpio_set_value(EFIKAMX_USBH1_STP, 1);
|
||||
msleep(1);
|
||||
|
||||
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
|
||||
socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
|
||||
|
||||
/* The clock for the USBH1 ULPI port will come externally */
|
||||
/* from the PHY. */
|
||||
v = __raw_readl(socregs_base + MX51_USB_CTRL_1_OFFSET);
|
||||
__raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
|
||||
socregs_base + MX51_USB_CTRL_1_OFFSET);
|
||||
|
||||
iounmap(usb_base);
|
||||
|
||||
gpio_free(EFIKAMX_USBH1_STP);
|
||||
mxc_iomux_v3_setup_pad(usbh1stp);
|
||||
|
||||
mdelay(10);
|
||||
|
||||
return mx51_initialize_usb_hw(0, MXC_EHCI_ITC_NO_THRESHOLD);
|
||||
}
|
||||
|
||||
static struct mxc_usbh_platform_data usbh1_config = {
|
||||
.init = initialize_usbh1_port,
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
};
|
||||
|
||||
static void mx51_efika_hubreset(void)
|
||||
{
|
||||
gpio_request(EFIKAMX_USB_HUB_RESET, "usb_hub_rst");
|
||||
gpio_direction_output(EFIKAMX_USB_HUB_RESET, 1);
|
||||
msleep(1);
|
||||
gpio_set_value(EFIKAMX_USB_HUB_RESET, 0);
|
||||
msleep(1);
|
||||
gpio_set_value(EFIKAMX_USB_HUB_RESET, 1);
|
||||
}
|
||||
|
||||
static void __init mx51_efika_usb(void)
|
||||
{
|
||||
mx51_efika_hubreset();
|
||||
|
||||
/* pulling it low, means no USB at all... */
|
||||
gpio_request(EFIKA_USB_PHY_RESET, "usb_phy_reset");
|
||||
gpio_direction_output(EFIKA_USB_PHY_RESET, 0);
|
||||
msleep(1);
|
||||
gpio_set_value(EFIKA_USB_PHY_RESET, 1);
|
||||
|
||||
usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
|
||||
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
|
||||
|
||||
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
|
||||
if (usbh1_config.otg)
|
||||
mxc_register_device(&mxc_usbh1_device, &usbh1_config);
|
||||
}
|
||||
|
||||
static struct mtd_partition mx51_efika_spi_nor_partitions[] = {
|
||||
{
|
||||
.name = "u-boot",
|
||||
.offset = 0,
|
||||
.size = SZ_256K,
|
||||
},
|
||||
{
|
||||
.name = "config",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = SZ_64K,
|
||||
},
|
||||
};
|
||||
|
||||
static struct flash_platform_data mx51_efika_spi_flash_data = {
|
||||
.name = "spi_flash",
|
||||
.parts = mx51_efika_spi_nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(mx51_efika_spi_nor_partitions),
|
||||
.type = "sst25vf032b",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sw1_consumers[] = {
|
||||
{
|
||||
.supply = "cpu_vcc",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vdig_consumers[] = {
|
||||
/* sgtl5000 */
|
||||
REGULATOR_SUPPLY("VDDA", "1-000a"),
|
||||
REGULATOR_SUPPLY("VDDD", "1-000a"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vvideo_consumers[] = {
|
||||
/* sgtl5000 */
|
||||
REGULATOR_SUPPLY("VDDIO", "1-000a"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply vsd_consumers[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx.0"),
|
||||
REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx.1"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply pwgt1_consumer[] = {
|
||||
{
|
||||
.supply = "pwgt1",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply pwgt2_consumer[] = {
|
||||
{
|
||||
.supply = "pwgt2",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply coincell_consumer[] = {
|
||||
{
|
||||
.supply = "coincell",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data sw1_init = {
|
||||
.constraints = {
|
||||
.name = "SW1",
|
||||
.min_uV = 600000,
|
||||
.max_uV = 1375000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
||||
.valid_modes_mask = 0,
|
||||
.always_on = 1,
|
||||
.boot_on = 1,
|
||||
.state_mem = {
|
||||
.uV = 850000,
|
||||
.mode = REGULATOR_MODE_NORMAL,
|
||||
.enabled = 1,
|
||||
},
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(sw1_consumers),
|
||||
.consumer_supplies = sw1_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_init_data sw2_init = {
|
||||
.constraints = {
|
||||
.name = "SW2",
|
||||
.min_uV = 900000,
|
||||
.max_uV = 1850000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
||||
.always_on = 1,
|
||||
.boot_on = 1,
|
||||
.state_mem = {
|
||||
.uV = 950000,
|
||||
.mode = REGULATOR_MODE_NORMAL,
|
||||
.enabled = 1,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data sw3_init = {
|
||||
.constraints = {
|
||||
.name = "SW3",
|
||||
.min_uV = 1100000,
|
||||
.max_uV = 1850000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
||||
.always_on = 1,
|
||||
.boot_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data sw4_init = {
|
||||
.constraints = {
|
||||
.name = "SW4",
|
||||
.min_uV = 1100000,
|
||||
.max_uV = 1850000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
||||
.always_on = 1,
|
||||
.boot_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data viohi_init = {
|
||||
.constraints = {
|
||||
.name = "VIOHI",
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vusb_init = {
|
||||
.constraints = {
|
||||
.name = "VUSB",
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data swbst_init = {
|
||||
.constraints = {
|
||||
.name = "SWBST",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vdig_init = {
|
||||
.constraints = {
|
||||
.name = "VDIG",
|
||||
.min_uV = 1050000,
|
||||
.max_uV = 1800000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vdig_consumers),
|
||||
.consumer_supplies = vdig_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_init_data vpll_init = {
|
||||
.constraints = {
|
||||
.name = "VPLL",
|
||||
.min_uV = 1050000,
|
||||
.max_uV = 1800000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vusb2_init = {
|
||||
.constraints = {
|
||||
.name = "VUSB2",
|
||||
.min_uV = 2400000,
|
||||
.max_uV = 2775000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vvideo_init = {
|
||||
.constraints = {
|
||||
.name = "VVIDEO",
|
||||
.min_uV = 2775000,
|
||||
.max_uV = 2775000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.apply_uV = 1,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vvideo_consumers),
|
||||
.consumer_supplies = vvideo_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_init_data vaudio_init = {
|
||||
.constraints = {
|
||||
.name = "VAUDIO",
|
||||
.min_uV = 2300000,
|
||||
.max_uV = 3000000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vsd_init = {
|
||||
.constraints = {
|
||||
.name = "VSD",
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 3150000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE,
|
||||
.boot_on = 1,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(vsd_consumers),
|
||||
.consumer_supplies = vsd_consumers,
|
||||
};
|
||||
|
||||
static struct regulator_init_data vcam_init = {
|
||||
.constraints = {
|
||||
.name = "VCAM",
|
||||
.min_uV = 2500000,
|
||||
.max_uV = 3000000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE |
|
||||
REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
|
||||
.valid_modes_mask = REGULATOR_MODE_FAST | REGULATOR_MODE_NORMAL,
|
||||
.boot_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vgen1_init = {
|
||||
.constraints = {
|
||||
.name = "VGEN1",
|
||||
.min_uV = 1200000,
|
||||
.max_uV = 3150000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vgen2_init = {
|
||||
.constraints = {
|
||||
.name = "VGEN2",
|
||||
.min_uV = 1200000,
|
||||
.max_uV = 3150000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data vgen3_init = {
|
||||
.constraints = {
|
||||
.name = "VGEN3",
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 2900000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
.always_on = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data gpo1_init = {
|
||||
.constraints = {
|
||||
.name = "GPO1",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data gpo2_init = {
|
||||
.constraints = {
|
||||
.name = "GPO2",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data gpo3_init = {
|
||||
.constraints = {
|
||||
.name = "GPO3",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data gpo4_init = {
|
||||
.constraints = {
|
||||
.name = "GPO4",
|
||||
}
|
||||
};
|
||||
|
||||
static struct regulator_init_data pwgt1_init = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(pwgt1_consumer),
|
||||
.consumer_supplies = pwgt1_consumer,
|
||||
};
|
||||
|
||||
static struct regulator_init_data pwgt2_init = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
.boot_on = 1,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(pwgt2_consumer),
|
||||
.consumer_supplies = pwgt2_consumer,
|
||||
};
|
||||
|
||||
static struct regulator_init_data vcoincell_init = {
|
||||
.constraints = {
|
||||
.name = "COINCELL",
|
||||
.min_uV = 3000000,
|
||||
.max_uV = 3000000,
|
||||
.valid_ops_mask =
|
||||
REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(coincell_consumer),
|
||||
.consumer_supplies = coincell_consumer,
|
||||
};
|
||||
|
||||
static struct mc13xxx_regulator_init_data mx51_efika_regulators[] = {
|
||||
{ .id = MC13892_SW1, .init_data = &sw1_init },
|
||||
{ .id = MC13892_SW2, .init_data = &sw2_init },
|
||||
{ .id = MC13892_SW3, .init_data = &sw3_init },
|
||||
{ .id = MC13892_SW4, .init_data = &sw4_init },
|
||||
{ .id = MC13892_SWBST, .init_data = &swbst_init },
|
||||
{ .id = MC13892_VIOHI, .init_data = &viohi_init },
|
||||
{ .id = MC13892_VPLL, .init_data = &vpll_init },
|
||||
{ .id = MC13892_VDIG, .init_data = &vdig_init },
|
||||
{ .id = MC13892_VSD, .init_data = &vsd_init },
|
||||
{ .id = MC13892_VUSB2, .init_data = &vusb2_init },
|
||||
{ .id = MC13892_VVIDEO, .init_data = &vvideo_init },
|
||||
{ .id = MC13892_VAUDIO, .init_data = &vaudio_init },
|
||||
{ .id = MC13892_VCAM, .init_data = &vcam_init },
|
||||
{ .id = MC13892_VGEN1, .init_data = &vgen1_init },
|
||||
{ .id = MC13892_VGEN2, .init_data = &vgen2_init },
|
||||
{ .id = MC13892_VGEN3, .init_data = &vgen3_init },
|
||||
{ .id = MC13892_VUSB, .init_data = &vusb_init },
|
||||
{ .id = MC13892_GPO1, .init_data = &gpo1_init },
|
||||
{ .id = MC13892_GPO2, .init_data = &gpo2_init },
|
||||
{ .id = MC13892_GPO3, .init_data = &gpo3_init },
|
||||
{ .id = MC13892_GPO4, .init_data = &gpo4_init },
|
||||
{ .id = MC13892_PWGT1SPI, .init_data = &pwgt1_init },
|
||||
{ .id = MC13892_PWGT2SPI, .init_data = &pwgt2_init },
|
||||
{ .id = MC13892_VCOINCELL, .init_data = &vcoincell_init },
|
||||
};
|
||||
|
||||
static struct mc13xxx_platform_data mx51_efika_mc13892_data = {
|
||||
.flags = MC13XXX_USE_RTC | MC13XXX_USE_REGULATOR,
|
||||
.num_regulators = ARRAY_SIZE(mx51_efika_regulators),
|
||||
.regulators = mx51_efika_regulators,
|
||||
};
|
||||
|
||||
static struct spi_board_info mx51_efika_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "m25p80",
|
||||
.max_speed_hz = 25000000,
|
||||
.bus_num = 0,
|
||||
.chip_select = 1,
|
||||
.platform_data = &mx51_efika_spi_flash_data,
|
||||
.irq = -1,
|
||||
},
|
||||
{
|
||||
.modalias = "mc13892",
|
||||
.max_speed_hz = 1000000,
|
||||
.bus_num = 0,
|
||||
.chip_select = 0,
|
||||
.platform_data = &mx51_efika_mc13892_data,
|
||||
.irq = gpio_to_irq(EFIKAMX_PMIC),
|
||||
},
|
||||
};
|
||||
|
||||
static int mx51_efika_spi_cs[] = {
|
||||
EFIKAMX_SPI_CS0,
|
||||
EFIKAMX_SPI_CS1,
|
||||
};
|
||||
|
||||
static const struct spi_imx_master mx51_efika_spi_pdata __initconst = {
|
||||
.chipselect = mx51_efika_spi_cs,
|
||||
.num_chipselect = ARRAY_SIZE(mx51_efika_spi_cs),
|
||||
};
|
||||
|
||||
void __init efika_board_common_init(void)
|
||||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(mx51efika_pads,
|
||||
ARRAY_SIZE(mx51efika_pads));
|
||||
imx51_add_imx_uart(0, &uart_pdata);
|
||||
mx51_efika_usb();
|
||||
imx51_add_sdhci_esdhc_imx(0, NULL);
|
||||
|
||||
/* FIXME: comes from original code. check this. */
|
||||
if (mx51_revision() < IMX_CHIP_REVISION_2_0)
|
||||
sw2_init.constraints.state_mem.uV = 1100000;
|
||||
else if (mx51_revision() == IMX_CHIP_REVISION_2_0) {
|
||||
sw2_init.constraints.state_mem.uV = 1250000;
|
||||
sw1_init.constraints.state_mem.uV = 1000000;
|
||||
}
|
||||
if (machine_is_mx51_efikasb())
|
||||
vgen1_init.constraints.max_uV = 1200000;
|
||||
|
||||
gpio_request(EFIKAMX_PMIC, "pmic irq");
|
||||
gpio_direction_input(EFIKAMX_PMIC);
|
||||
spi_register_board_info(mx51_efika_spi_board_info,
|
||||
ARRAY_SIZE(mx51_efika_spi_board_info));
|
||||
imx51_add_ecspi(0, &mx51_efika_spi_pdata);
|
||||
|
||||
#if defined(CONFIG_CPU_FREQ_IMX)
|
||||
get_cpu_op = mx51_get_cpu_op;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
|
|||
/*
|
||||
* set the mode for a IOMUX pin.
|
||||
*/
|
||||
int mxc_iomux_mode(const unsigned int pin_mode)
|
||||
int mxc_iomux_mode(unsigned int pin_mode)
|
||||
{
|
||||
u32 side, field, l, mode, ret = 0;
|
||||
void __iomem *reg;
|
||||
|
@ -114,7 +114,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad);
|
|||
* - reserves the pin so that it is not claimed by another driver
|
||||
* - setups the iomux according to the configuration
|
||||
*/
|
||||
int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label)
|
||||
int mxc_iomux_alloc_pin(unsigned int pin_mode, const char *label)
|
||||
{
|
||||
unsigned pad = PIN_GLOBAL_NUM(pin_mode);
|
||||
if (pad >= (PIN_MAX + 1)) {
|
||||
|
@ -134,10 +134,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label)
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_alloc_pin);
|
||||
|
||||
int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
|
||||
int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
|
||||
const char *label)
|
||||
{
|
||||
unsigned int *p = pin_list;
|
||||
const unsigned int *p = pin_list;
|
||||
int i;
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -155,7 +155,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins);
|
||||
|
||||
void mxc_iomux_release_pin(const unsigned int pin_mode)
|
||||
void mxc_iomux_release_pin(unsigned int pin_mode)
|
||||
{
|
||||
unsigned pad = PIN_GLOBAL_NUM(pin_mode);
|
||||
|
||||
|
@ -164,9 +164,9 @@ void mxc_iomux_release_pin(const unsigned int pin_mode)
|
|||
}
|
||||
EXPORT_SYMBOL(mxc_iomux_release_pin);
|
||||
|
||||
void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count)
|
||||
void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count)
|
||||
{
|
||||
unsigned int *p = pin_list;
|
||||
const unsigned int *p = pin_list;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
|
@ -53,9 +53,10 @@ struct sys_timer zn5_timer = {
|
|||
};
|
||||
|
||||
MACHINE_START(MAGX_ZN5, "Motorola Zn5")
|
||||
.boot_params = MXC91231_PHYS_OFFSET + 0x100,
|
||||
.map_io = mxc91231_map_io,
|
||||
.init_irq = mxc91231_init_irq,
|
||||
.timer = &zn5_timer,
|
||||
.init_machine = zn5_init,
|
||||
.boot_params = MXC91231_PHYS_OFFSET + 0x100,
|
||||
.map_io = mxc91231_map_io,
|
||||
.init_early = mxc91231_init_early,
|
||||
.init_irq = mxc91231_init_irq,
|
||||
.timer = &zn5_timer,
|
||||
.init_machine = zn5_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -45,11 +45,14 @@ static struct map_desc mxc91231_io_desc[] __initdata = {
|
|||
*/
|
||||
void __init mxc91231_map_io(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MXC91231);
|
||||
|
||||
iotable_init(mxc91231_io_desc, ARRAY_SIZE(mxc91231_io_desc));
|
||||
}
|
||||
|
||||
void __init mxc91231_init_early(void)
|
||||
{
|
||||
mxc_set_cpu_type(MXC_CPU_MXC91231);
|
||||
}
|
||||
|
||||
int mxc91231_register_gpios(void);
|
||||
|
||||
void __init mxc91231_init_irq(void)
|
||||
|
|
|
@ -2,13 +2,18 @@ if ARCH_MXS
|
|||
|
||||
source "arch/arm/mach-mxs/devices/Kconfig"
|
||||
|
||||
config MXS_OCOTP
|
||||
bool
|
||||
|
||||
config SOC_IMX23
|
||||
bool
|
||||
select CPU_ARM926T
|
||||
select HAVE_PWM
|
||||
|
||||
config SOC_IMX28
|
||||
bool
|
||||
select CPU_ARM926T
|
||||
select HAVE_PWM
|
||||
|
||||
comment "MXS platforms:"
|
||||
|
||||
|
@ -16,6 +21,8 @@ config MACH_MX23EVK
|
|||
bool "Support MX23EVK Platform"
|
||||
select SOC_IMX23
|
||||
select MXS_HAVE_AMBA_DUART
|
||||
select MXS_HAVE_PLATFORM_AUART
|
||||
select MXS_HAVE_PLATFORM_MXSFB
|
||||
default y
|
||||
help
|
||||
Include support for MX23EVK platform. This includes specific
|
||||
|
@ -25,10 +32,27 @@ config MACH_MX28EVK
|
|||
bool "Support MX28EVK Platform"
|
||||
select SOC_IMX28
|
||||
select MXS_HAVE_AMBA_DUART
|
||||
select MXS_HAVE_PLATFORM_AUART
|
||||
select MXS_HAVE_PLATFORM_FEC
|
||||
select MXS_HAVE_PLATFORM_FLEXCAN
|
||||
select MXS_HAVE_PLATFORM_MXSFB
|
||||
select MXS_OCOTP
|
||||
default y
|
||||
help
|
||||
Include support for MX28EVK platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MODULE_TX28
|
||||
bool
|
||||
select SOC_IMX28
|
||||
select MXS_HAVE_AMBA_DUART
|
||||
select MXS_HAVE_PLATFORM_AUART
|
||||
select MXS_HAVE_PLATFORM_FEC
|
||||
select MXS_HAVE_PLATFORM_MXS_I2C
|
||||
select MXS_HAVE_PLATFORM_MXS_PWM
|
||||
|
||||
config MACH_TX28
|
||||
bool "Ka-Ro TX28 module"
|
||||
select MODULE_TX28
|
||||
|
||||
endif
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
# Common support
|
||||
obj-y := clock.o devices.o gpio.o icoll.o iomux.o system.o timer.o
|
||||
|
||||
obj-$(CONFIG_MXS_OCOTP) += ocotp.o
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
|
||||
obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o
|
||||
obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
|
||||
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
|
||||
obj-$(CONFIG_MODULE_TX28) += module-tx28.o
|
||||
obj-$(CONFIG_MACH_TX28) += mach-tx28.o
|
||||
|
||||
obj-y += devices/
|
||||
|
|
|
@ -442,11 +442,18 @@ static struct clk_lookup lookups[] = {
|
|||
_REGISTER_CLOCK("duart", "apb_pclk", xbus_clk)
|
||||
/* for amba-pl011 driver */
|
||||
_REGISTER_CLOCK("duart", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.0", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("rtc", NULL, rtc_clk)
|
||||
_REGISTER_CLOCK(NULL, "hclk", hbus_clk)
|
||||
_REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk)
|
||||
_REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk)
|
||||
_REGISTER_CLOCK(NULL, "usb", usb_clk)
|
||||
_REGISTER_CLOCK(NULL, "audio", audio_clk)
|
||||
_REGISTER_CLOCK(NULL, "pwm", pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("imx23-fb", NULL, lcdif_clk)
|
||||
};
|
||||
|
||||
static int clk_misc_init(void)
|
||||
|
|
|
@ -609,17 +609,30 @@ static struct clk_lookup lookups[] = {
|
|||
_REGISTER_CLOCK("duart", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk)
|
||||
_REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.0", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.1", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.2", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.3", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("mxs-auart.4", NULL, uart_clk)
|
||||
_REGISTER_CLOCK("rtc", NULL, rtc_clk)
|
||||
_REGISTER_CLOCK("pll2", NULL, pll2_clk)
|
||||
_REGISTER_CLOCK(NULL, "hclk", hbus_clk)
|
||||
_REGISTER_CLOCK(NULL, "xclk", xbus_clk)
|
||||
_REGISTER_CLOCK(NULL, "can0", can0_clk)
|
||||
_REGISTER_CLOCK(NULL, "can1", can1_clk)
|
||||
_REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk)
|
||||
_REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk)
|
||||
_REGISTER_CLOCK("flexcan.0", NULL, can0_clk)
|
||||
_REGISTER_CLOCK("flexcan.1", NULL, can1_clk)
|
||||
_REGISTER_CLOCK(NULL, "usb0", usb0_clk)
|
||||
_REGISTER_CLOCK(NULL, "usb1", usb1_clk)
|
||||
_REGISTER_CLOCK(NULL, "pwm", pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.5", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.6", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK("mxs-pwm.7", NULL, pwm_clk)
|
||||
_REGISTER_CLOCK(NULL, "lradc", lradc_clk)
|
||||
_REGISTER_CLOCK(NULL, "spdif", spdif_clk)
|
||||
_REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk)
|
||||
};
|
||||
|
||||
static int clk_misc_init(void)
|
||||
|
@ -737,6 +750,8 @@ int __init mx28_clocks_init(void)
|
|||
clk_enable(&emi_clk);
|
||||
clk_enable(&uart_clk);
|
||||
|
||||
clk_set_parent(&lcdif_clk, &ref_pix_clk);
|
||||
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
mxs_timer_init(&clk32k_clk, MX28_INT_TIMER0);
|
||||
|
|
|
@ -10,7 +10,18 @@
|
|||
*/
|
||||
#include <mach/mx23.h>
|
||||
#include <mach/devices-common.h>
|
||||
#include <mach/mxsfb.h>
|
||||
|
||||
extern const struct amba_device mx23_duart_device __initconst;
|
||||
#define mx23_add_duart() \
|
||||
mxs_add_duart(&mx23_duart_device)
|
||||
|
||||
extern const struct mxs_auart_data mx23_auart_data[] __initconst;
|
||||
#define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id])
|
||||
#define mx23_add_auart0() mx23_add_auart(0)
|
||||
#define mx23_add_auart1() mx23_add_auart(1)
|
||||
|
||||
#define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id)
|
||||
|
||||
struct platform_device *__init mx23_add_mxsfb(
|
||||
const struct mxsfb_platform_data *pdata);
|
||||
|
|
|
@ -10,11 +10,34 @@
|
|||
*/
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
#include <mach/mxsfb.h>
|
||||
|
||||
extern const struct amba_device mx28_duart_device __initconst;
|
||||
#define mx28_add_duart() \
|
||||
mxs_add_duart(&mx28_duart_device)
|
||||
|
||||
extern const struct mxs_auart_data mx28_auart_data[] __initconst;
|
||||
#define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id])
|
||||
#define mx28_add_auart0() mx28_add_auart(0)
|
||||
#define mx28_add_auart1() mx28_add_auart(1)
|
||||
#define mx28_add_auart2() mx28_add_auart(2)
|
||||
#define mx28_add_auart3() mx28_add_auart(3)
|
||||
#define mx28_add_auart4() mx28_add_auart(4)
|
||||
|
||||
extern const struct mxs_fec_data mx28_fec_data[] __initconst;
|
||||
#define mx28_add_fec(id, pdata) \
|
||||
mxs_add_fec(&mx28_fec_data[id], pdata)
|
||||
|
||||
extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst;
|
||||
#define mx28_add_flexcan(id, pdata) \
|
||||
mxs_add_flexcan(&mx28_flexcan_data[id], pdata)
|
||||
#define mx28_add_flexcan0(pdata) mx28_add_flexcan(0, pdata)
|
||||
#define mx28_add_flexcan1(pdata) mx28_add_flexcan(1, pdata)
|
||||
|
||||
extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst;
|
||||
#define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id])
|
||||
|
||||
#define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id)
|
||||
|
||||
struct platform_device *__init mx28_add_mxsfb(
|
||||
const struct mxsfb_platform_data *pdata);
|
||||
|
|
|
@ -66,6 +66,8 @@ struct platform_device *__init mxs_add_platform_device_dmamask(
|
|||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
err:
|
||||
if (dmamask)
|
||||
kfree(pdev->dev.dma_mask);
|
||||
platform_device_put(pdev);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
|
|
@ -2,5 +2,21 @@ config MXS_HAVE_AMBA_DUART
|
|||
bool
|
||||
select ARM_AMBA
|
||||
|
||||
config MXS_HAVE_PLATFORM_AUART
|
||||
bool
|
||||
|
||||
config MXS_HAVE_PLATFORM_FEC
|
||||
bool
|
||||
|
||||
config MXS_HAVE_PLATFORM_FLEXCAN
|
||||
select HAVE_CAN_FLEXCAN if CAN
|
||||
bool
|
||||
|
||||
config MXS_HAVE_PLATFORM_MXS_I2C
|
||||
bool
|
||||
|
||||
config MXS_HAVE_PLATFORM_MXS_PWM
|
||||
bool
|
||||
|
||||
config MXS_HAVE_PLATFORM_MXSFB
|
||||
bool
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o
|
||||
obj-y += platform-dma.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o
|
||||
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o
|
||||
|
|
64
arch/arm/mach-mxs/devices/platform-auart.c
Normal file
64
arch/arm/mach-mxs/devices/platform-auart.c
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Pengutronix
|
||||
* 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 version 2 as published by the
|
||||
* Free Software Foundation.
|
||||
*/
|
||||
#include <asm/sizes.h>
|
||||
#include <mach/mx23.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define mxs_auart_data_entry_single(soc, _id, hwid) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
.iobase = soc ## _AUART ## hwid ## _BASE_ADDR, \
|
||||
.irq = soc ## _INT_AUART ## hwid, \
|
||||
}
|
||||
|
||||
#define mxs_auart_data_entry(soc, _id, hwid) \
|
||||
[_id] = mxs_auart_data_entry_single(soc, _id, hwid)
|
||||
|
||||
#ifdef CONFIG_SOC_IMX23
|
||||
const struct mxs_auart_data mx23_auart_data[] __initconst = {
|
||||
#define mx23_auart_data_entry(_id, hwid) \
|
||||
mxs_auart_data_entry(MX23, _id, hwid)
|
||||
mx23_auart_data_entry(0, 1),
|
||||
mx23_auart_data_entry(1, 2),
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_IMX28
|
||||
const struct mxs_auart_data mx28_auart_data[] __initconst = {
|
||||
#define mx28_auart_data_entry(_id) \
|
||||
mxs_auart_data_entry(MX28, _id, _id)
|
||||
mx28_auart_data_entry(0),
|
||||
mx28_auart_data_entry(1),
|
||||
mx28_auart_data_entry(2),
|
||||
mx28_auart_data_entry(3),
|
||||
mx28_auart_data_entry(4),
|
||||
};
|
||||
#endif
|
||||
|
||||
struct platform_device *__init mxs_add_auart(
|
||||
const struct mxs_auart_data *data)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = data->iobase,
|
||||
.end = data->iobase + SZ_8K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = data->irq,
|
||||
.end = data->irq,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device_dmamask("mxs-auart", data->id,
|
||||
res, ARRAY_SIZE(res), NULL, 0,
|
||||
DMA_BIT_MASK(32));
|
||||
}
|
||||
|
49
arch/arm/mach-mxs/devices/platform-dma.c
Normal file
49
arch/arm/mach-mxs/devices/platform-dma.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
*
|
||||
* 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/compiler.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <mach/mx23.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
static struct platform_device *__init mxs_add_dma(const char *devid,
|
||||
resource_size_t base)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = base,
|
||||
.end = base + SZ_8K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
return mxs_add_platform_device_dmamask(devid, -1,
|
||||
res, ARRAY_SIZE(res), NULL, 0,
|
||||
DMA_BIT_MASK(32));
|
||||
}
|
||||
|
||||
static int __init mxs_add_mxs_dma(void)
|
||||
{
|
||||
char *apbh = "mxs-dma-apbh";
|
||||
char *apbx = "mxs-dma-apbx";
|
||||
|
||||
if (cpu_is_mx23()) {
|
||||
mxs_add_dma(apbh, MX23_APBH_DMA_BASE_ADDR);
|
||||
mxs_add_dma(apbx, MX23_APBX_DMA_BASE_ADDR);
|
||||
}
|
||||
|
||||
if (cpu_is_mx28()) {
|
||||
mxs_add_dma(apbh, MX28_APBH_DMA_BASE_ADDR);
|
||||
mxs_add_dma(apbx, MX28_APBX_DMA_BASE_ADDR);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(mxs_add_mxs_dma);
|
|
@ -45,6 +45,7 @@ struct platform_device *__init mxs_add_fec(
|
|||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device("imx28-fec", data->id,
|
||||
res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
|
||||
return mxs_add_platform_device_dmamask("imx28-fec", data->id,
|
||||
res, ARRAY_SIZE(res), pdata, sizeof(*pdata),
|
||||
DMA_BIT_MASK(32));
|
||||
}
|
||||
|
|
51
arch/arm/mach-mxs/devices/platform-flexcan.c
Normal file
51
arch/arm/mach-mxs/devices/platform-flexcan.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2010, 2011 Pengutronix,
|
||||
* Marc Kleine-Budde <kernel@pengutronix.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 <asm/sizes.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define mxs_flexcan_data_entry_single(soc, _id, _hwid, _size) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
.iobase = soc ## _CAN ## _hwid ## _BASE_ADDR, \
|
||||
.iosize = _size, \
|
||||
.irq = soc ## _INT_CAN ## _hwid, \
|
||||
}
|
||||
|
||||
#define mxs_flexcan_data_entry(soc, _id, _hwid, _size) \
|
||||
[_id] = mxs_flexcan_data_entry_single(soc, _id, _hwid, _size)
|
||||
|
||||
#ifdef CONFIG_SOC_IMX28
|
||||
const struct mxs_flexcan_data mx28_flexcan_data[] __initconst = {
|
||||
#define mx28_flexcan_data_entry(_id, _hwid) \
|
||||
mxs_flexcan_data_entry_single(MX28, _id, _hwid, SZ_8K)
|
||||
mx28_flexcan_data_entry(0, 0),
|
||||
mx28_flexcan_data_entry(1, 1),
|
||||
};
|
||||
#endif /* ifdef CONFIG_SOC_IMX28 */
|
||||
|
||||
struct platform_device *__init mxs_add_flexcan(
|
||||
const struct mxs_flexcan_data *data,
|
||||
const struct flexcan_platform_data *pdata)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = data->iobase,
|
||||
.end = data->iobase + data->iosize - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = data->irq,
|
||||
.end = data->irq,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device("flexcan", data->id,
|
||||
res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
|
||||
}
|
51
arch/arm/mach-mxs/devices/platform-mxs-i2c.c
Normal file
51
arch/arm/mach-mxs/devices/platform-mxs-i2c.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Pengutronix
|
||||
* Wolfram Sang <w.sang@pengutronix.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 <asm/sizes.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define mxs_i2c_data_entry_single(soc, _id) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
.iobase = soc ## _I2C ## _id ## _BASE_ADDR, \
|
||||
.errirq = soc ## _INT_I2C ## _id ## _ERROR, \
|
||||
.dmairq = soc ## _INT_I2C ## _id ## _DMA, \
|
||||
}
|
||||
|
||||
#define mxs_i2c_data_entry(soc, _id) \
|
||||
[_id] = mxs_i2c_data_entry_single(soc, _id)
|
||||
|
||||
#ifdef CONFIG_SOC_IMX28
|
||||
const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst = {
|
||||
mxs_i2c_data_entry(MX28, 0),
|
||||
mxs_i2c_data_entry(MX28, 1),
|
||||
};
|
||||
#endif
|
||||
|
||||
struct platform_device *__init mxs_add_mxs_i2c(const struct mxs_i2c_data *data)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = data->iobase,
|
||||
.end = data->iobase + SZ_8K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = data->errirq,
|
||||
.end = data->errirq,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = data->dmairq,
|
||||
.end = data->dmairq,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device("mxs-i2c", data->id, res,
|
||||
ARRAY_SIZE(res), NULL, 0);
|
||||
}
|
22
arch/arm/mach-mxs/devices/platform-mxs-pwm.c
Normal file
22
arch/arm/mach-mxs/devices/platform-mxs-pwm.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Pengutronix
|
||||
* 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 version 2 as published by the
|
||||
* Free Software Foundation.
|
||||
*/
|
||||
#include <asm/sizes.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
struct platform_device *__init mxs_add_mxs_pwm(resource_size_t iobase, int id)
|
||||
{
|
||||
struct resource res = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
res.start = iobase + 0x10 + 0x20 * id;
|
||||
res.end = res.start + 0x1f;
|
||||
|
||||
return mxs_add_platform_device("mxs-pwm", id, &res, 1, NULL, 0);
|
||||
}
|
46
arch/arm/mach-mxs/devices/platform-mxsfb.c
Normal file
46
arch/arm/mach-mxs/devices/platform-mxsfb.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Pengutronix, 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 version 2 as published by the
|
||||
* Free Software Foundation.
|
||||
*/
|
||||
#include <asm/sizes.h>
|
||||
#include <mach/mx23.h>
|
||||
#include <mach/mx28.h>
|
||||
#include <mach/devices-common.h>
|
||||
#include <mach/mxsfb.h>
|
||||
|
||||
#ifdef CONFIG_SOC_IMX23
|
||||
struct platform_device *__init mx23_add_mxsfb(
|
||||
const struct mxsfb_platform_data *pdata)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = MX23_LCDIF_BASE_ADDR,
|
||||
.end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device_dmamask("imx23-fb", -1,
|
||||
res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
|
||||
}
|
||||
#endif /* ifdef CONFIG_SOC_IMX23 */
|
||||
|
||||
#ifdef CONFIG_SOC_IMX28
|
||||
struct platform_device *__init mx28_add_mxsfb(
|
||||
const struct mxsfb_platform_data *pdata)
|
||||
{
|
||||
struct resource res[] = {
|
||||
{
|
||||
.start = MX28_LCDIF_BASE_ADDR,
|
||||
.end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
return mxs_add_platform_device_dmamask("imx28-fb", -1,
|
||||
res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
|
||||
}
|
||||
#endif /* ifdef CONFIG_SOC_IMX28 */
|
|
@ -182,6 +182,7 @@ static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
|
|||
}
|
||||
|
||||
static struct irq_chip gpio_irq_chip = {
|
||||
.name = "mxs gpio",
|
||||
.ack = mxs_gpio_ack_irq,
|
||||
.mask = mxs_gpio_mask_irq,
|
||||
.unmask = mxs_gpio_unmask_irq,
|
||||
|
@ -289,39 +290,42 @@ int __init mxs_gpio_init(struct mxs_gpio_port *port, int cnt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define DEFINE_MXS_GPIO_PORT(soc, _id) \
|
||||
#define MX23_GPIO_BASE MX23_IO_ADDRESS(MX23_PINCTRL_BASE_ADDR)
|
||||
#define MX28_GPIO_BASE MX28_IO_ADDRESS(MX28_PINCTRL_BASE_ADDR)
|
||||
|
||||
#define DEFINE_MXS_GPIO_PORT(_base, _irq, _id) \
|
||||
{ \
|
||||
.chip.label = "gpio-" #_id, \
|
||||
.id = _id, \
|
||||
.irq = soc ## _INT_GPIO ## _id, \
|
||||
.base = soc ## _IO_ADDRESS( \
|
||||
soc ## _PINCTRL ## _BASE_ADDR), \
|
||||
.irq = _irq, \
|
||||
.base = _base, \
|
||||
.virtual_irq_start = MXS_GPIO_IRQ_START + (_id) * 32, \
|
||||
}
|
||||
|
||||
#define DEFINE_REGISTER_FUNCTION(prefix) \
|
||||
int __init prefix ## _register_gpios(void) \
|
||||
{ \
|
||||
return mxs_gpio_init(prefix ## _gpio_ports, \
|
||||
ARRAY_SIZE(prefix ## _gpio_ports)); \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOC_IMX23
|
||||
static struct mxs_gpio_port mx23_gpio_ports[] = {
|
||||
DEFINE_MXS_GPIO_PORT(MX23, 0),
|
||||
DEFINE_MXS_GPIO_PORT(MX23, 1),
|
||||
DEFINE_MXS_GPIO_PORT(MX23, 2),
|
||||
DEFINE_MXS_GPIO_PORT(MX23_GPIO_BASE, MX23_INT_GPIO0, 0),
|
||||
DEFINE_MXS_GPIO_PORT(MX23_GPIO_BASE, MX23_INT_GPIO1, 1),
|
||||
DEFINE_MXS_GPIO_PORT(MX23_GPIO_BASE, MX23_INT_GPIO2, 2),
|
||||
};
|
||||
DEFINE_REGISTER_FUNCTION(mx23)
|
||||
|
||||
int __init mx23_register_gpios(void)
|
||||
{
|
||||
return mxs_gpio_init(mx23_gpio_ports, ARRAY_SIZE(mx23_gpio_ports));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_IMX28
|
||||
static struct mxs_gpio_port mx28_gpio_ports[] = {
|
||||
DEFINE_MXS_GPIO_PORT(MX28, 0),
|
||||
DEFINE_MXS_GPIO_PORT(MX28, 1),
|
||||
DEFINE_MXS_GPIO_PORT(MX28, 2),
|
||||
DEFINE_MXS_GPIO_PORT(MX28, 3),
|
||||
DEFINE_MXS_GPIO_PORT(MX28, 4),
|
||||
DEFINE_MXS_GPIO_PORT(MX28_GPIO_BASE, MX28_INT_GPIO0, 0),
|
||||
DEFINE_MXS_GPIO_PORT(MX28_GPIO_BASE, MX28_INT_GPIO1, 1),
|
||||
DEFINE_MXS_GPIO_PORT(MX28_GPIO_BASE, MX28_INT_GPIO2, 2),
|
||||
DEFINE_MXS_GPIO_PORT(MX28_GPIO_BASE, MX28_INT_GPIO3, 3),
|
||||
DEFINE_MXS_GPIO_PORT(MX28_GPIO_BASE, MX28_INT_GPIO4, 4),
|
||||
};
|
||||
DEFINE_REGISTER_FUNCTION(mx28)
|
||||
|
||||
int __init mx28_register_gpios(void)
|
||||
{
|
||||
return mxs_gpio_init(mx28_gpio_ports, ARRAY_SIZE(mx28_gpio_ports));
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
struct clk;
|
||||
|
||||
extern const u32 *mxs_get_ocotp(void);
|
||||
extern int mxs_reset_block(void __iomem *);
|
||||
extern void mxs_timer_init(struct clk *, int);
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ int __init mxs_add_amba_device(const struct amba_device *dev);
|
|||
/* duart */
|
||||
int __init mxs_add_duart(const struct amba_device *dev);
|
||||
|
||||
/* auart */
|
||||
struct mxs_auart_data {
|
||||
int id;
|
||||
resource_size_t iobase;
|
||||
resource_size_t iosize;
|
||||
resource_size_t irq;
|
||||
};
|
||||
struct platform_device *__init mxs_add_auart(
|
||||
const struct mxs_auart_data *data);
|
||||
|
||||
/* fec */
|
||||
#include <linux/fec.h>
|
||||
struct mxs_fec_data {
|
||||
|
@ -41,3 +51,28 @@ struct mxs_fec_data {
|
|||
struct platform_device *__init mxs_add_fec(
|
||||
const struct mxs_fec_data *data,
|
||||
const struct fec_platform_data *pdata);
|
||||
|
||||
/* flexcan */
|
||||
#include <linux/can/platform/flexcan.h>
|
||||
struct mxs_flexcan_data {
|
||||
int id;
|
||||
resource_size_t iobase;
|
||||
resource_size_t iosize;
|
||||
resource_size_t irq;
|
||||
};
|
||||
struct platform_device *__init mxs_add_flexcan(
|
||||
const struct mxs_flexcan_data *data,
|
||||
const struct flexcan_platform_data *pdata);
|
||||
|
||||
/* i2c */
|
||||
struct mxs_i2c_data {
|
||||
int id;
|
||||
resource_size_t iobase;
|
||||
resource_size_t errirq;
|
||||
resource_size_t dmairq;
|
||||
};
|
||||
struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data);
|
||||
|
||||
/* pwm */
|
||||
struct platform_device *__init mxs_add_mxs_pwm(
|
||||
resource_size_t iobase, int id);
|
||||
|
|
|
@ -254,102 +254,102 @@
|
|||
#define MX23_PAD_ROTARYB__GPMI_CE3N MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_2)
|
||||
|
||||
/* MUXSEL_GPIO */
|
||||
#define MX23_PAD_GPMI_D00__GPO_0_0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D01__GPO_0_1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D02__GPO_0_2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D03__GPO_0_3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D04__GPO_0_4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D05__GPO_0_5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D06__GPO_0_6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D07__GPO_0_7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D08__GPO_0_8 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D09__GPO_0_9 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D10__GPO_0_10 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D11__GPO_0_11 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D12__GPO_0_12 MXS_IOMUX_PAD_NAKED(0, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D13__GPO_0_13 MXS_IOMUX_PAD_NAKED(0, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D14__GPO_0_14 MXS_IOMUX_PAD_NAKED(0, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D15__GPO_0_15 MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CLE__GPO_0_16 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_ALE__GPO_0_17 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE2N__GPO_0_18 MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY0__GPO_0_19 MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY1__GPO_0_20 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY2__GPO_0_21 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY3__GPO_0_22 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_WPN__GPO_0_23 MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_WRN__GPO_0_24 MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDN__GPO_0_25 MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_CTS__GPO_0_26 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_RTS__GPO_0_27 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_RX__GPO_0_28 MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_TX__GPO_0_29 MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_I2C_SCL__GPO_0_30 MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_I2C_SDA__GPO_0_31 MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D00__GPIO_0_0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D01__GPIO_0_1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D02__GPIO_0_2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D03__GPIO_0_3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D04__GPIO_0_4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D05__GPIO_0_5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D06__GPIO_0_6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D07__GPIO_0_7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D08__GPIO_0_8 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D09__GPIO_0_9 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D10__GPIO_0_10 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D11__GPIO_0_11 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D12__GPIO_0_12 MXS_IOMUX_PAD_NAKED(0, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D13__GPIO_0_13 MXS_IOMUX_PAD_NAKED(0, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D14__GPIO_0_14 MXS_IOMUX_PAD_NAKED(0, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_D15__GPIO_0_15 MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CLE__GPIO_0_16 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_ALE__GPIO_0_17 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE2N__GPIO_0_18 MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY0__GPIO_0_19 MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY1__GPIO_0_20 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY2__GPIO_0_21 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDY3__GPIO_0_22 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_WPN__GPIO_0_23 MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_WRN__GPIO_0_24 MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_RDN__GPIO_0_25 MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_CTS__GPIO_0_26 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_RTS__GPIO_0_27 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_RX__GPIO_0_28 MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_AUART1_TX__GPIO_0_29 MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_I2C_SCL__GPIO_0_30 MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_I2C_SDA__GPIO_0_31 MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_GPIO)
|
||||
|
||||
#define MX23_PAD_LCD_D00__GPO_1_0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D01__GPO_1_1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D02__GPO_1_2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D03__GPO_1_3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D04__GPO_1_4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D05__GPO_1_5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D06__GPO_1_6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D07__GPO_1_7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D08__GPO_1_8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D09__GPO_1_9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D10__GPO_1_10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D11__GPO_1_11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D12__GPO_1_12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D13__GPO_1_13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D14__GPO_1_14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D15__GPO_1_15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D16__GPO_1_16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D17__GPO_1_17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_RESET__GPO_1_18 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_RS__GPO_1_19 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_WR__GPO_1_20 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_CS__GPO_1_21 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_DOTCK__GPO_1_22 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_ENABLE__GPO_1_23 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_HSYNC__GPO_1_24 MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_VSYNC__GPO_1_25 MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM0__GPO_1_26 MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM1__GPO_1_27 MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM2__GPO_1_28 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM3__GPO_1_29 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM4__GPO_1_30 MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D00__GPIO_1_0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D01__GPIO_1_1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D02__GPIO_1_2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D03__GPIO_1_3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D04__GPIO_1_4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D05__GPIO_1_5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D06__GPIO_1_6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D07__GPIO_1_7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D08__GPIO_1_8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D09__GPIO_1_9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D10__GPIO_1_10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D11__GPIO_1_11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D12__GPIO_1_12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D13__GPIO_1_13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D14__GPIO_1_14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D15__GPIO_1_15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D16__GPIO_1_16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_D17__GPIO_1_17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_RESET__GPIO_1_18 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_RS__GPIO_1_19 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_WR__GPIO_1_20 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_CS__GPIO_1_21 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_DOTCK__GPIO_1_22 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_ENABLE__GPIO_1_23 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_HSYNC__GPIO_1_24 MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_LCD_VSYNC__GPIO_1_25 MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM0__GPIO_1_26 MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM1__GPIO_1_27 MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM2__GPIO_1_28 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM3__GPIO_1_29 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_PWM4__GPIO_1_30 MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_GPIO)
|
||||
|
||||
#define MX23_PAD_SSP1_CMD__GPO_2_0 MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DETECT__GPO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA0__GPO_2_2 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA1__GPO_2_3 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA2__GPO_2_4 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA3__GPO_2_5 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_SCK__GPO_2_6 MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_ROTARYA__GPO_2_7 MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_ROTARYB__GPO_2_8 MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A00__GPO_2_9 MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A01__GPO_2_10 MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A02__GPO_2_11 MXS_IOMUX_PAD_NAKED(2, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A03__GPO_2_12 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A04__GPO_2_13 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A05__GPO_2_14 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A06__GPO_2_15 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A07__GPO_2_16 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A08__GPO_2_17 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A09__GPO_2_18 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A10__GPO_2_19 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A11__GPO_2_20 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A12__GPO_2_21 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_BA0__GPO_2_22 MXS_IOMUX_PAD_NAKED(2, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_BA1__GPO_2_23 MXS_IOMUX_PAD_NAKED(2, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CASN__GPO_2_24 MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CE0N__GPO_2_25 MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CE1N__GPO_2_26 MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE1N__GPO_2_27 MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE0N__GPO_2_28 MXS_IOMUX_PAD_NAKED(2, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CKE__GPO_2_29 MXS_IOMUX_PAD_NAKED(2, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_RASN__GPO_2_30 MXS_IOMUX_PAD_NAKED(2, 30, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_WEN__GPO_2_31 MXS_IOMUX_PAD_NAKED(2, 31, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_CMD__GPIO_2_0 MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DETECT__GPIO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA0__GPIO_2_2 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA1__GPIO_2_3 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA2__GPIO_2_4 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_DATA3__GPIO_2_5 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_SSP1_SCK__GPIO_2_6 MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_ROTARYA__GPIO_2_7 MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_ROTARYB__GPIO_2_8 MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A00__GPIO_2_9 MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A01__GPIO_2_10 MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A02__GPIO_2_11 MXS_IOMUX_PAD_NAKED(2, 11, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A03__GPIO_2_12 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A04__GPIO_2_13 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A05__GPIO_2_14 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A06__GPIO_2_15 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A07__GPIO_2_16 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A08__GPIO_2_17 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A09__GPIO_2_18 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A10__GPIO_2_19 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A11__GPIO_2_20 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_A12__GPIO_2_21 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_BA0__GPIO_2_22 MXS_IOMUX_PAD_NAKED(2, 22, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_BA1__GPIO_2_23 MXS_IOMUX_PAD_NAKED(2, 23, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CASN__GPIO_2_24 MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CE0N__GPIO_2_25 MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CE1N__GPIO_2_26 MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE1N__GPIO_2_27 MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_GPMI_CE0N__GPIO_2_28 MXS_IOMUX_PAD_NAKED(2, 28, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_CKE__GPIO_2_29 MXS_IOMUX_PAD_NAKED(2, 29, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_RASN__GPIO_2_30 MXS_IOMUX_PAD_NAKED(2, 30, PAD_MUXSEL_GPIO)
|
||||
#define MX23_PAD_EMI_WEN__GPIO_2_31 MXS_IOMUX_PAD_NAKED(2, 31, PAD_MUXSEL_GPIO)
|
||||
|
||||
#endif /* __MACH_IOMUX_MX23_H__ */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue