Commit 3afdb0f3 authored by Russell King's avatar Russell King

Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable

parents 71d8c5b1 f7fdaca9
...@@ -110,7 +110,7 @@ CONFIG_MMC=y ...@@ -110,7 +110,7 @@ CONFIG_MMC=y
CONFIG_MMC_BLOCK=m CONFIG_MMC_BLOCK=m
CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI=m
CONFIG_NEW_LEDS=y CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=m CONFIG_LEDS_CLASS=y
CONFIG_RTC_CLASS=y CONFIG_RTC_CLASS=y
CONFIG_RTC_INTF_DEV_UIE_EMUL=y CONFIG_RTC_INTF_DEV_UIE_EMUL=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=y
......
...@@ -100,6 +100,7 @@ config MACH_MX25_3DS ...@@ -100,6 +100,7 @@ config MACH_MX25_3DS
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMXDI_RTC select IMX_HAVE_PLATFORM_IMXDI_RTC
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_FB select IMX_HAVE_PLATFORM_IMX_FB
select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
...@@ -238,6 +239,7 @@ config MACH_MX27_3DS ...@@ -238,6 +239,7 @@ config MACH_MX27_3DS
select SOC_IMX27 select SOC_IMX27
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_EHCI
...@@ -265,6 +267,7 @@ config MACH_IMX27LITE ...@@ -265,6 +267,7 @@ config MACH_IMX27LITE
bool "LogicPD MX27 LITEKIT platform" bool "LogicPD MX27 LITEKIT platform"
select SOC_IMX27 select SOC_IMX27
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_SSI
help help
Include support for MX27 LITEKIT platform. This includes specific Include support for MX27 LITEKIT platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
...@@ -300,4 +303,13 @@ config MACH_MXT_TD60 ...@@ -300,4 +303,13 @@ config MACH_MXT_TD60
Include support for i-MXT (aka td60) platform. This Include support for i-MXT (aka td60) platform. This
includes specific configurations for the module and its peripherals. 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 endif
...@@ -9,10 +9,10 @@ obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o ...@@ -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_ARCH_MX1) += clock-imx1.o mm-imx1.o
obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.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) += 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 # Support for CMOS sensor interface
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
...@@ -36,3 +36,4 @@ obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.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_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
obj-$(CONFIG_MACH_PCA100) += mach-pca100.o obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.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 = { ...@@ -592,6 +592,7 @@ static struct clk_lookup lookups[] __initdata = {
_REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk)
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
_REGISTER_CLOCK("imx1-cspi.0", NULL, spi_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-mmc.0", NULL, sdhc_clk)
_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
_REGISTER_CLOCK(NULL, "mshc", mshc_clk) _REGISTER_CLOCK(NULL, "mshc", mshc_clk)
......
...@@ -228,6 +228,7 @@ DEFINE_CLOCK(esdhc1_per_clk, 0, CCM_CGCR0, 3, get_rate_esdhc1, NULL, ...@@ -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_ahb_clk, 0, CCM_CGCR0, 22, get_rate_esdhc2, NULL, NULL);
DEFINE_CLOCK(esdhc2_per_clk, 0, CCM_CGCR0, 4, get_rate_esdhc2, NULL, DEFINE_CLOCK(esdhc2_per_clk, 0, CCM_CGCR0, 4, get_rate_esdhc2, NULL,
&esdhc2_ahb_clk); &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(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_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL);
DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); 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); ...@@ -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(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(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(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, DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGCR1, 13, get_rate_esdhc1, NULL,
&esdhc1_per_clk); &esdhc1_per_clk);
DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGCR1, 14, get_rate_esdhc2, NULL, DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGCR1, 14, get_rate_esdhc2, NULL,
...@@ -304,6 +306,7 @@ static struct clk_lookup lookups[] = { ...@@ -304,6 +306,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "audmux", audmux_clk) _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
_REGISTER_CLOCK("flexcan.0", NULL, can1_clk) _REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
_REGISTER_CLOCK("flexcan.1", NULL, can2_clk) _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
_REGISTER_CLOCK("imx-sdma", NULL, sdma_clk)
}; };
int __init mx25_clocks_init(void) int __init mx25_clocks_init(void)
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
#include <mach/mx1.h> #include <mach/mx1.h>
#include <mach/devices-common.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; extern const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst;
#define imx1_add_imx_i2c(pdata) \ #define imx1_add_imx_i2c(pdata) \
imx_add_imx_i2c(&imx1_imx_i2c_data, 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; ...@@ -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) 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_uart0(pdata) imx1_add_imx_uart(0, pdata)
#define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, 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; ...@@ -81,7 +81,11 @@ imx25_sdhci_esdhc_imx_data[] __initconst;
extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst;
#define imx25_add_spi_imx(id, pdata) \ #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_imx0(pdata) imx25_add_spi_imx(0, pdata)
#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, 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) #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) ...@@ -699,7 +699,7 @@ int imx_dma_request(int channel, const char *name)
local_irq_restore(flags); local_irq_restore(flags);
return -EBUSY; return -EBUSY;
} }
memset(imxdma, 0, sizeof(imxdma)); memset(imxdma, 0, sizeof(*imxdma));
imxdma->name = name; imxdma->name = name;
local_irq_restore(flags); /* request_irq() can block */ local_irq_restore(flags); /* request_irq() can block */
......
/*
* 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;
}
/*
* 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 = { ...@@ -249,7 +249,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
#define ADS7846_PENDOWN (GPIO_PORTD | 25) #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) { if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
printk(KERN_ERR "can't get ads746 pen down GPIO\n"); printk(KERN_ERR "can't get ads746 pen down GPIO\n");
...@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = { ...@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
.keep_vref_on = 1, .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] = { [0] = {
.modalias = "ads7846", .modalias = "ads7846",
.bus_num = 0, .bus_num = 0,
...@@ -357,13 +358,11 @@ void __init eukrea_mbimx27_baseboard_init(void) ...@@ -357,13 +358,11 @@ void __init eukrea_mbimx27_baseboard_init(void)
ads7846_dev_init(); ads7846_dev_init();
#endif #endif
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
/* SPI_CS0 init */ /* SPI_CS0 init */
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
spi_register_board_info(eukrea_mbimx27_spi_board_info, spi_register_board_info(eukrea_mbimx27_spi_board_info,
ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
#endif
/* Leds configuration */ /* Leds configuration */
mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT); mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
......
...@@ -209,17 +209,25 @@ static struct platform_device serial_device = { ...@@ -209,17 +209,25 @@ static struct platform_device serial_device = {
}; };
#endif #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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = eukrea_cpuimx27_otg_init,
.portsc = MXC_EHCI_MODE_ULPI, .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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = eukrea_cpuimx27_usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
#endif
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
...@@ -273,21 +281,19 @@ static void __init eukrea_cpuimx27_init(void) ...@@ -273,21 +281,19 @@ static void __init eukrea_cpuimx27_init(void)
platform_device_register(&serial_device); platform_device_register(&serial_device);
#endif #endif
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (otg_pdata.otg)
imx27_add_mxc_ehci_otg(&otg_pdata); 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, usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (usbh2_pdata.otg)
imx27_add_mxc_ehci_hs(2, &usbh2_pdata); imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
#endif
if (!otg_mode_host)
imx27_add_fsl_usb2_udc(&otg_device_pdata);
#ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD #ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD
eukrea_mbimx27_baseboard_init(); eukrea_mbimx27_baseboard_init();
...@@ -304,9 +310,10 @@ static struct sys_timer eukrea_cpuimx27_timer = { ...@@ -304,9 +310,10 @@ static struct sys_timer eukrea_cpuimx27_timer = {
}; };
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = eukrea_cpuimx27_init, .init_irq = mx27_init_irq,
.timer = &eukrea_cpuimx27_timer, .timer = &eukrea_cpuimx27_timer,
.init_machine = eukrea_cpuimx27_init,
MACHINE_END MACHINE_END
...@@ -84,15 +84,25 @@ static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = { ...@@ -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 = { static const struct mxc_usbh_platform_data otg_pdata __initconst = {
.init = eukrea_cpuimx25_otg_init,
.portsc = MXC_EHCI_MODE_UTMI, .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 = { static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
.init = eukrea_cpuimx25_usbh2_init,
.portsc = MXC_EHCI_MODE_SERIAL, .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 = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
...@@ -153,9 +163,10 @@ static struct sys_timer eukrea_cpuimx25_timer = { ...@@ -153,9 +163,10 @@ static struct sys_timer eukrea_cpuimx25_timer = {
MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX25_PHYS_OFFSET + 0x100, .boot_params = MX25_PHYS_OFFSET + 0x100,
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_irq = mx25_init_irq, .init_early = imx25_init_early,
.init_machine = eukrea_cpuimx25_init, .init_irq = mx25_init_irq,
.timer = &eukrea_cpuimx25_timer, .timer = &eukrea_cpuimx25_timer,
.init_machine = eukrea_cpuimx25_init,
MACHINE_END MACHINE_END
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
...@@ -66,6 +67,11 @@ static const int visstrim_m10_pins[] __initconst = { ...@@ -66,6 +67,11 @@ static const int visstrim_m10_pins[] __initconst = {
PD15_AOUT_FEC_COL, PD15_AOUT_FEC_COL,
PD16_AIN_FEC_TX_ER, PD16_AIN_FEC_TX_ER,
PF23_AIN_FEC_TX_EN, PF23_AIN_FEC_TX_EN,
/* SSI1 */
PC20_PF_SSI1_FS,
PC21_PF_SSI1_RXD,
PC22_PF_SSI1_TXD,
PC23_PF_SSI1_CLK,
/* SDHC1 */ /* SDHC1 */
PE18_PF_SD1_D0, PE18_PF_SD1_D0,
PE19_PF_SD1_D1, PE19_PF_SD1_D1,
...@@ -204,20 +210,30 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { ...@@ -204,20 +210,30 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
I2C_BOARD_INFO("pca9555", 0x20), I2C_BOARD_INFO("pca9555", 0x20),
.platform_data = &visstrim_m10_pca9555_pdata, .platform_data = &visstrim_m10_pca9555_pdata,
}, },
{
I2C_BOARD_INFO("tlv320aic32x4", 0x18),
}
}; };
/* USB OTG */ /* USB OTG */
static int otg_phy_init(struct platform_device *pdev) static int otg_phy_init(struct platform_device *pdev)
{ {
gpio_set_value(OTG_PHY_CS_GPIO, 0); 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 static const struct mxc_usbh_platform_data
visstrim_m10_usbotg_pdata __initconst = { visstrim_m10_usbotg_pdata __initconst = {
.init = otg_phy_init, .init = otg_phy_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .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) static void __init visstrim_m10_board_init(void)
...@@ -229,6 +245,7 @@ static void __init visstrim_m10_board_init(void) ...@@ -229,6 +245,7 @@ static void __init visstrim_m10_board_init(void)
if (ret) if (ret)
pr_err("Failed to setup pins (%d)\n", 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); imx27_add_imx_uart0(&uart_pdata);
i2c_register_board_info(0, visstrim_m10_i2c_devices, i2c_register_board_info(0, visstrim_m10_i2c_devices,
...@@ -251,9 +268,10 @@ static struct sys_timer visstrim_m10_timer = { ...@@ -251,9 +268,10 @@ static struct sys_timer visstrim_m10_timer = {
}; };
MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = visstrim_m10_board_init, .init_irq = mx27_init_irq,
.timer = &visstrim_m10_timer, .timer = &visstrim_m10_timer,
.init_machine = visstrim_m10_board_init,
MACHINE_END MACHINE_END
/*
* 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 = { ...@@ -75,9 +75,10 @@ static struct sys_timer mx27lite_timer = {
}; };
MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = mx27lite_init, .init_irq = mx27_init_irq,
.timer = &mx27lite_timer, .timer = &mx27lite_timer,
.init_machine = mx27lite_init,
MACHINE_END MACHINE_END
...@@ -144,17 +144,19 @@ struct sys_timer mx1ads_timer = { ...@@ -144,17 +144,19 @@ struct sys_timer mx1ads_timer = {
MACHINE_START(MX1ADS, "Freescale MX1ADS") MACHINE_START(MX1ADS, "Freescale MX1ADS")
/* Maintainer: Sascha Hauer, Pengutronix */ /* Maintainer: Sascha Hauer, Pengutronix */
.boot_params = MX1_PHYS_OFFSET + 0x100, .boot_params = MX1_PHYS_OFFSET + 0x100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_irq = mx1_init_irq, .init_early = imx1_init_early,
.timer = &mx1ads_timer, .init_irq = mx1_init_irq,
.init_machine = mx1ads_init, .timer = &mx1ads_timer,
.init_machine = mx1ads_init,
MACHINE_END MACHINE_END
MACHINE_START(MXLADS, "Freescale MXLADS") MACHINE_START(MXLADS, "Freescale MXLADS")
.boot_params = MX1_PHYS_OFFSET + 0x100, .boot_params = MX1_PHYS_OFFSET + 0x100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_irq = mx1_init_irq, .init_early = imx1_init_early,
.timer = &mx1ads_timer, .init_irq = mx1_init_irq,
.init_machine = mx1ads_init, .timer = &mx1ads_timer,
.init_machine = mx1ads_init,
MACHINE_END MACHINE_END
...@@ -304,9 +304,10 @@ static struct sys_timer mx21ads_timer = { ...@@ -304,9 +304,10 @@ static struct sys_timer mx21ads_timer = {
MACHINE_START(MX21ADS, "Freescale i.MX21ADS") MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX21_PHYS_OFFSET + 0x100, .boot_params = MX21_PHYS_OFFSET + 0x100,
.map_io = mx21ads_map_io, .map_io = mx21ads_map_io,
.init_irq = mx21_init_irq, .init_early = imx21_init_early,
.init_machine = mx21ads_board_init, .init_irq = mx21_init_irq,
.timer = &mx21ads_timer, .timer = &mx21ads_timer,
.init_machine = mx21ads_board_init,
MACHINE_END MACHINE_END
...@@ -103,14 +103,18 @@ static iomux_v3_cfg_t mx25pdk_pads[] = { ...@@ -103,14 +103,18 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
MX25_PAD_SD1_DATA1__SD1_DATA1, MX25_PAD_SD1_DATA1__SD1_DATA1,
MX25_PAD_SD1_DATA2__SD1_DATA2, MX25_PAD_SD1_DATA2__SD1_DATA2,
MX25_PAD_SD1_DATA3__SD1_DATA3, 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 = { static const struct fec_platform_data mx25_fec_pdata __initconst = {
.phy = PHY_INTERFACE_MODE_RMII, .phy = PHY_INTERFACE_MODE_RMII,
}; };
#define FEC_ENABLE_GPIO 35 #define FEC_ENABLE_GPIO IMX_GPIO_NR(2, 3)
#define FEC_RESET_B_GPIO 104 #define FEC_RESET_B_GPIO IMX_GPIO_NR(4, 8)
static void __init mx25pdk_fec_reset(void) static void __init mx25pdk_fec_reset(void)
{ {
...@@ -185,9 +189,14 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = { ...@@ -185,9 +189,14 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = {
.keymap_size = ARRAY_SIZE(mx25pdk_keymap), .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 = { static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
.init = mx25pdk_usbh2_init,
.portsc = MXC_EHCI_MODE_SERIAL, .portsc = MXC_EHCI_MODE_SERIAL,
.flags = MXC_EHCI_INTERNAL_PHY,
}; };
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 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 = { ...@@ -195,6 +204,10 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.phy_mode = FSL_USB2_PHY_UTMI, .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) static void __init mx25pdk_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
...@@ -213,6 +226,7 @@ static void __init mx25pdk_init(void) ...@@ -213,6 +226,7 @@ static void __init mx25pdk_init(void)
imx25_add_imx_keypad(&mx25pdk_keymap_data); imx25_add_imx_keypad(&mx25pdk_keymap_data);
imx25_add_sdhci_esdhc_imx(0, NULL); imx25_add_sdhci_esdhc_imx(0, NULL);
imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
} }
static void __init mx25pdk_timer_init(void) static void __init mx25pdk_timer_init(void)
...@@ -226,10 +240,10 @@ static struct sys_timer mx25pdk_timer = { ...@@ -226,10 +240,10 @@ static struct sys_timer mx25pdk_timer = {
MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX25_PHYS_OFFSET + 0x100, .boot_params = MX25_PHYS_OFFSET + 0x100,
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_irq = mx25_init_irq, .init_early = imx25_init_early,
.init_machine = mx25pdk_init, .init_irq = mx25_init_irq,
.timer = &mx25pdk_timer, .timer = &mx25pdk_timer,
.init_machine = mx25pdk_init,
MACHINE_END MACHINE_END
...@@ -98,6 +98,9 @@ static const int mx27pdk_pins[] __initconst = { ...@@ -98,6 +98,9 @@ static const int mx27pdk_pins[] __initconst = {
PD22_PF_CSPI2_SCLK, PD22_PF_CSPI2_SCLK,
PD23_PF_CSPI2_MISO, PD23_PF_CSPI2_MISO,
PD24_PF_CSPI2_MOSI, PD24_PF_CSPI2_MOSI,
/* I2C1 */
PD17_PF_I2C_DATA,
PD18_PF_I2C_CLK,
}; };
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
...@@ -159,13 +162,15 @@ static int otg_phy_init(void) ...@@ -159,13 +162,15 @@ static int otg_phy_init(void)
return 0; 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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = mx27_3ds_otg_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
#endif
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
...@@ -216,7 +221,7 @@ static struct regulator_init_data vgen_init = { ...@@ -216,7 +221,7 @@ static struct regulator_init_data vgen_init = {
.consumer_supplies = vgen_consumers, .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, .id = MC13783_REG_VMMC1,
.init_data = &vmmc1_init, .init_data = &vmmc1_init,
...@@ -227,10 +232,10 @@ static struct mc13783_regulator_init_data mx27_3ds_regulators[] = { ...@@ -227,10 +232,10 @@ static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
}; };
/* MC13783 */ /* MC13783 */
static struct mc13783_platform_data mc13783_pdata __initdata = { static struct mc13xxx_platform_data mc13783_pdata __initdata = {
.regulators = mx27_3ds_regulators, .regulators = mx27_3ds_regulators,
.num_regulators = ARRAY_SIZE(mx27_3ds_regulators), .num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
.flags = MC13783_USE_REGULATOR, .flags = MC13XXX_USE_REGULATOR,
}; };
/* SPI */ /* SPI */
...@@ -253,6 +258,9 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { ...@@ -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) static void __init mx27pdk_init(void)
{ {
...@@ -265,14 +273,15 @@ 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_mxc_mmc(0, &sdhc1_pdata);
imx27_add_imx2_wdt(NULL); imx27_add_imx2_wdt(NULL);
otg_phy_init(); otg_phy_init();
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
imx27_add_mxc_ehci_otg(&otg_pdata); if (otg_pdata.otg)
imx27_add_mxc_ehci_otg(&otg_pdata);
} }
#endif
if (!otg_mode_host) if (!otg_mode_host)
imx27_add_fsl_usb2_udc(&otg_device_pdata); imx27_add_fsl_usb2_udc(&otg_device_pdata);
...@@ -282,6 +291,7 @@ static void __init mx27pdk_init(void) ...@@ -282,6 +291,7 @@ static void __init mx27pdk_init(void)
if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) 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"); 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) static void __init mx27pdk_timer_init(void)
...@@ -295,9 +305,10 @@ static struct sys_timer mx27pdk_timer = { ...@@ -295,9 +305,10 @@ static struct sys_timer mx27pdk_timer = {
MACHINE_START(MX27_3DS, "Freescale MX27PDK") MACHINE_START(MX27_3DS, "Freescale MX27PDK")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = mx27pdk_init, .init_irq = mx27_init_irq,
.timer = &mx27pdk_timer, .timer = &mx27pdk_timer,
.init_machine = mx27pdk_init,
MACHINE_END MACHINE_END
...@@ -344,9 +344,10 @@ static void __init mx27ads_map_io(void) ...@@ -344,9 +344,10 @@ static void __init mx27ads_map_io(void)
MACHINE_START(MX27ADS, "Freescale i.MX27ADS") MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27ads_map_io, .map_io = mx27ads_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = mx27ads_board_init, .init_irq = mx27_init_irq,
.timer = &mx27ads_timer, .timer = &mx27ads_timer,
.init_machine = mx27ads_board_init,
MACHINE_END MACHINE_END
...@@ -266,10 +266,10 @@ static struct sys_timer mxt_td60_timer = { ...@@ -266,10 +266,10 @@ static struct sys_timer mxt_td60_timer = {
MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
/* maintainer: Maxtrack Industrial */ /* maintainer: Maxtrack Industrial */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = mxt_td60_board_init, .init_irq = mx27_init_irq,
.timer = &mxt_td60_timer, .timer = &mxt_td60_timer,
.init_machine = mxt_td60_board_init,
MACHINE_END MACHINE_END
...@@ -187,7 +187,6 @@ static struct i2c_board_info pca100_i2c_devices[] = { ...@@ -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 = { static struct spi_eeprom at25320 = {
.name = "at25320an", .name = "at25320an",
.byte_len = 4096, .byte_len = 4096,
...@@ -211,7 +210,6 @@ static const struct spi_imx_master pca100_spi0_data __initconst = { ...@@ -211,7 +210,6 @@ static const struct spi_imx_master pca100_spi0_data __initconst = {
.chipselect = pca100_spi_cs, .chipselect = pca100_spi_cs,
.num_chipselect = ARRAY_SIZE(pca100_spi_cs), .num_chipselect = ARRAY_SIZE(pca100_spi_cs),
}; };
#endif
static void pca100_ac97_warm_reset(struct snd_ac97 *ac97) static void pca100_ac97_warm_reset(struct snd_ac97 *ac97)
{ {
...@@ -269,31 +267,33 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = { ...@@ -269,31 +267,33 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
.exit = pca100_sdhc2_exit, .exit = pca100_sdhc2_exit,
}; };
#if defined(CONFIG_USB_ULPI)
static int otg_phy_init(struct platform_device *pdev) static int otg_phy_init(struct platform_device *pdev)
{ {
gpio_set_value(OTG_PHY_CS_GPIO, 0); 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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = otg_phy_init, .init = otg_phy_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
static int usbh2_phy_init(struct platform_device *pdev) static int usbh2_phy_init(struct platform_device *pdev)
{ {
gpio_set_value(USBH2_PHY_CS_GPIO, 0); 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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = usbh2_phy_init, .init = usbh2_phy_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
#endif
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
...@@ -389,36 +389,33 @@ static void __init pca100_init(void) ...@@ -389,36 +389,33 @@ static void __init pca100_init(void)
imx27_add_imx_i2c(1, &pca100_i2c1_data); 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 | 28 | GPIO_GPIO | GPIO_IN);
mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN); mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN);
spi_register_board_info(pca100_spi_board_info, spi_register_board_info(pca100_spi_board_info,
ARRAY_SIZE(pca100_spi_board_info)); ARRAY_SIZE(pca100_spi_board_info));
imx27_add_spi_imx0(&pca100_spi0_data); imx27_add_spi_imx0(&pca100_spi0_data);
#endif
gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs");
gpio_direction_output(OTG_PHY_CS_GPIO, 1); gpio_direction_output(OTG_PHY_CS_GPIO, 1);
gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs");
gpio_direction_output(USBH2_PHY_CS_GPIO, 1); gpio_direction_output(USBH2_PHY_CS_GPIO, 1);
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 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, usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
imx27_add_mxc_ehci_hs(2, &usbh2_pdata); if (usbh2_pdata.otg)
#endif imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
if (!otg_mode_host) {
gpio_set_value(OTG_PHY_CS_GPIO, 0);
imx27_add_fsl_usb2_udc(&otg_device_pdata);
}
imx27_add_imx_fb(&pca100_fb_data); imx27_add_imx_fb(&pca100_fb_data);
...@@ -437,10 +434,10 @@ static struct sys_timer pca100_timer = { ...@@ -437,10 +434,10 @@ static struct sys_timer pca100_timer = {
}; };
MACHINE_START(PCA100, "phyCARD-i.MX27") MACHINE_START(PCA100, "phyCARD-i.MX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = pca100_init, .init_irq = mx27_init_irq,
.timer = &pca100_timer, .init_machine = pca100_init,
.timer = &pca100_timer,
MACHINE_END MACHINE_END
...@@ -252,7 +252,7 @@ static struct regulator_init_data cam_data = { ...@@ -252,7 +252,7 @@ static struct regulator_init_data cam_data = {
.consumer_supplies = cam_consumers, .consumer_supplies = cam_consumers,
}; };
static struct mc13783_regulator_init_data pcm038_regulators[] = { static struct mc13xxx_regulator_init_data pcm038_regulators[] = {
{ {
.id = MC13783_REG_VCAM, .id = MC13783_REG_VCAM,
.init_data = &cam_data, .init_data = &cam_data,
...@@ -262,11 +262,11 @@ static struct mc13783_regulator_init_data pcm038_regulators[] = { ...@@ -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, .regulators = pcm038_regulators,
.num_regulators = ARRAY_SIZE(pcm038_regulators), .num_regulators = ARRAY_SIZE(pcm038_regulators),
.flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | .flags = MC13XXX_USE_ADC | MC13XXX_USE_REGULATOR |
MC13783_USE_TOUCHSCREEN, MC13XXX_USE_TOUCHSCREEN,
}; };
static struct spi_board_info pcm038_spi_board_info[] __initdata = { static struct spi_board_info pcm038_spi_board_info[] __initdata = {
...@@ -281,9 +281,15 @@ 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 = { static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
.init = pcm038_usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
static void __init pcm038_init(void) static void __init pcm038_init(void)
...@@ -340,9 +346,10 @@ static struct sys_timer pcm038_timer = { ...@@ -340,9 +346,10 @@ static struct sys_timer pcm038_timer = {
}; };
MACHINE_START(PCM038, "phyCORE-i.MX27") MACHINE_START(PCM038, "phyCORE-i.MX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_early = imx27_init_early,
.init_machine = pcm038_init, .init_irq = mx27_init_irq,
.timer = &pcm038_timer, .timer = &pcm038_timer,
.init_machine = pcm038_init,
MACHINE_END MACHINE_END
...@@ -145,10 +145,11 @@ static struct sys_timer scb9328_timer = { ...@@ -145,10 +145,11 @@ static struct sys_timer scb9328_timer = {
}; };
MACHINE_START(SCB9328, "Synertronixx scb9328") MACHINE_START(SCB9328, "Synertronixx scb9328")
/* Sascha Hauer */ /* Sascha Hauer */
.boot_params = 0x08000100, .boot_params = 0x08000100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_irq = mx1_init_irq, .init_early = imx1_init_early,
.timer = &scb9328_timer, .init_irq = mx1_init_irq,
.init_machine = scb9328_init, .timer = &scb9328_timer,
.init_machine = scb9328_init,
MACHINE_END MACHINE_END
...@@ -23,23 +23,36 @@ ...@@ -23,23 +23,36 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.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 = { static struct map_desc imx_io_desc[] __initdata = {
imx_map_entry(MX1, IO, MT_DEVICE), imx_map_entry(MX1, IO, MT_DEVICE),
}; };
void __init mx1_map_io(void) void __init mx1_map_io(void)
{
iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
}
void __init imx1_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX1); mxc_set_cpu_type(MXC_CPU_MX1);
mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
imx_iomuxv1_init(MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); MX1_NUM_GPIO_PORT);
} }
int imx1_register_gpios(void); 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) void __init mx1_init_irq(void)
{ {
mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); 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 @@ ...@@ -24,6 +24,9 @@
#include <mach/common.h> #include <mach/common.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/gpio.h>
#include <mach/irqs.h>
#include <mach/iomux-v1.h>
/* MX21 memory map definition */ /* MX21 memory map definition */
static struct map_desc imx21_io_desc[] __initdata = { static struct map_desc imx21_io_desc[] __initdata = {
...@@ -55,17 +58,29 @@ static struct map_desc imx21_io_desc[] __initdata = { ...@@ -55,17 +58,29 @@ static struct map_desc imx21_io_desc[] __initdata = {
* memory map for the IO modules. * memory map for the IO modules.
*/ */
void __init mx21_map_io(void) void __init mx21_map_io(void)
{
iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
}
void __init imx21_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX21); mxc_set_cpu_type(MXC_CPU_MX21);
mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
imx_iomuxv1_init(MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR),
iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); MX21_NUM_GPIO_PORT);
} }
int imx21_register_gpios(void); 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) void __init mx21_init_irq(void)
{ {
mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); 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 @@ ...@@ -27,6 +27,8 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/iomux-v3.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. * This table defines static virtual address mappings for I/O regions.
...@@ -44,19 +46,27 @@ static struct map_desc mx25_io_desc[] __initdata = { ...@@ -44,19 +46,27 @@ static struct map_desc mx25_io_desc[] __initdata = {
* for the IO modules. * for the IO modules.
*/ */
void __init mx25_map_io(void) void __init mx25_map_io(void)
{
iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
}
void __init imx25_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX25); mxc_set_cpu_type(MXC_CPU_MX25);
mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_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); 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) void __init mx25_init_irq(void)
{ {
mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR)); 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 @@ ...@@ -24,6 +24,9 @@
#include <mach/common.h> #include <mach/common.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/gpio.h>
#include <mach/irqs.h>
#include <mach/iomux-v1.h>
/* MX27 memory map definition */ /* MX27 memory map definition */
static struct map_desc imx27_io_desc[] __initdata = { static struct map_desc imx27_io_desc[] __initdata = {
...@@ -55,17 +58,29 @@ static struct map_desc imx27_io_desc[] __initdata = { ...@@ -55,17 +58,29 @@ static struct map_desc imx27_io_desc[] __initdata = {
* memory map for the IO modules. * memory map for the IO modules.
*/ */
void __init mx27_map_io(void) void __init mx27_map_io(void)
{
iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
}
void __init imx27_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX27); mxc_set_cpu_type(MXC_CPU_MX27);
mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR),
iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); MX27_NUM_GPIO_PORT);
} }
int imx27_register_gpios(void); 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) void __init mx27_init_irq(void)
{ {
mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); 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 ...@@ -94,6 +94,7 @@ config MACH_MX31_3DS
select MXC_DEBUG_BOARD select MXC_DEBUG_BOARD
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_EHCI
...@@ -183,6 +184,7 @@ config MACH_MX35_3DS ...@@ -183,6 +184,7 @@ config MACH_MX35_3DS
select MXC_DEBUG_BOARD select MXC_DEBUG_BOARD
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_MXC_NAND
...@@ -199,6 +201,15 @@ config MACH_KZM_ARM11_01 ...@@ -199,6 +201,15 @@ config MACH_KZM_ARM11_01
Include support for KZM-ARM11-01. This includes specific Include support for KZM-ARM11-01. This includes specific
configurations for the board and its peripherals. 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 config MACH_EUKREA_CPUIMX35
bool "Support Eukrea CPUIMX35 Platform" bool "Support Eukrea CPUIMX35 Platform"
select SOC_IMX35 select SOC_IMX35
...@@ -229,4 +240,18 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD ...@@ -229,4 +240,18 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD
endchoice 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 endif
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# Object file lists. # Object file lists.
obj-y := mm.o devices.o cpu.o obj-y := mm.o devices.o cpu.o
obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += clock-imx35.o obj-$(CONFIG_SOC_IMX35) += clock-imx35.o ehci-imx35.o
obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
...@@ -20,5 +20,7 @@ obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o ...@@ -20,5 +20,7 @@ obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.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_CPUIMX35) += mach-cpuimx35.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd-baseboard.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; ...@@ -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) #define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata)
extern const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst; 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) imx_add_imx_keypad(&imx35_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst;
......
/*
* 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;
}
/*
* 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[] = { ...@@ -165,8 +165,8 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
MX35_PAD_SD1_DATA3__ESDHC1_DAT3, MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
}; };
#define GPIO_LED1 (2 * 32 + 29) #define GPIO_LED1 IMX_GPIO_NR(3, 29)
#define GPIO_SWITCH1 (2 * 32 + 25) #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25)
#define GPIO_LCDPWR (4) #define GPIO_LCDPWR (4)
static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd,
......
...@@ -97,7 +97,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad); ...@@ -97,7 +97,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad);
* - reserves the pin so that it is not claimed by another driver * - reserves the pin so that it is not claimed by another driver
* - setups the iomux according to the configuration * - 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; unsigned pad = pin & IOMUX_PADNUM_MASK;
...@@ -118,10 +118,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin, const char *label) ...@@ -118,10 +118,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin, const char *label)
} }
EXPORT_SYMBOL(mxc_iomux_alloc_pin); 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) const char *label)
{ {
unsigned int *p = pin_list; const unsigned int *p = pin_list;
int i; int i;
int ret = -EINVAL; int ret = -EINVAL;
...@@ -139,7 +139,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, ...@@ -139,7 +139,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
} }
EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins); 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; unsigned pad = pin & IOMUX_PADNUM_MASK;
...@@ -148,9 +148,9 @@ void mxc_iomux_release_pin(const unsigned int pin) ...@@ -148,9 +148,9 @@ void mxc_iomux_release_pin(const unsigned int pin)
} }
EXPORT_SYMBOL(mxc_iomux_release_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; int i;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
......
...@@ -133,7 +133,6 @@ static int armadillo5x0_pins[] = { ...@@ -133,7 +133,6 @@ static int armadillo5x0_pins[] = {
}; };
/* USB */ /* USB */
#if defined(CONFIG_USB_ULPI)
#define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4)
#define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6)
...@@ -176,8 +175,10 @@ static int usbotg_init(struct platform_device *pdev) ...@@ -176,8 +175,10 @@ static int usbotg_init(struct platform_device *pdev)
gpio_set_value(OTG_RESET, 0/*LOW*/); gpio_set_value(OTG_RESET, 0/*LOW*/);
mdelay(5); mdelay(5);
gpio_set_value(OTG_RESET, 1/*HIGH*/); 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: otg_free_reset:
gpio_free(OTG_RESET); gpio_free(OTG_RESET);
...@@ -233,8 +234,10 @@ static int usbh2_init(struct platform_device *pdev) ...@@ -233,8 +234,10 @@ static int usbh2_init(struct platform_device *pdev)
gpio_set_value(USBH2_RESET, 0/*LOW*/); gpio_set_value(USBH2_RESET, 0/*LOW*/);
mdelay(5); mdelay(5);
gpio_set_value(USBH2_RESET, 1/*HIGH*/); 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: h2_free_reset:
gpio_free(USBH2_RESET); gpio_free(USBH2_RESET);
...@@ -246,15 +249,12 @@ static int usbh2_init(struct platform_device *pdev) ...@@ -246,15 +249,12 @@ static int usbh2_init(struct platform_device *pdev)
static struct mxc_usbh_platform_data usbotg_pdata __initdata = { static struct mxc_usbh_platform_data usbotg_pdata __initdata = {
.init = usbotg_init, .init = usbotg_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = usbh2_init, .init = usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .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*/ /* RTC over I2C*/
#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)
...@@ -547,15 +547,15 @@ static void __init armadillo5x0_init(void) ...@@ -547,15 +547,15 @@ static void __init armadillo5x0_init(void)
i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1);
/* USB */ /* USB */
#if defined(CONFIG_USB_ULPI)
usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, if (usbotg_pdata.otg)
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); imx31_add_mxc_ehci_otg(&usbotg_pdata);
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
imx31_add_mxc_ehci_otg(&usbotg_pdata); ULPI_OTG_DRVVBUS_EXT);
imx31_add_mxc_ehci_hs(2, &usbh2_pdata); if (usbh2_pdata.otg)
#endif imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
} }
static void __init armadillo5x0_timer_init(void) static void __init armadillo5x0_timer_init(void)
...@@ -569,9 +569,10 @@ static struct sys_timer armadillo5x0_timer = { ...@@ -569,9 +569,10 @@ static struct sys_timer armadillo5x0_timer = {
MACHINE_START(ARMADILLO5X0, "Armadillo-500") MACHINE_START(ARMADILLO5X0, "Armadillo-500")
/* Maintainer: Alberto Panizzo */ /* Maintainer: Alberto Panizzo */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.timer = &armadillo5x0_timer, .init_irq = mx31_init_irq,
.init_machine = armadillo5x0_init, .timer = &armadillo5x0_timer,
.init_machine = armadillo5x0_init,
MACHINE_END MACHINE_END
/*
* 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 = { ...@@ -60,7 +60,7 @@ static struct tsc2007_platform_data tsc2007_info = {
.x_plate_ohms = 180, .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[] = { static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
{ {
I2C_BOARD_INFO("pcf8563", 0x51), I2C_BOARD_INFO("pcf8563", 0x51),
...@@ -111,15 +111,25 @@ static const struct mxc_nand_platform_data ...@@ -111,15 +111,25 @@ static const struct mxc_nand_platform_data
.flash_bbt = 1, .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 = { static const struct mxc_usbh_platform_data otg_pdata __initconst = {
.init = eukrea_cpuimx35_otg_init,
.portsc = MXC_EHCI_MODE_UTMI, .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 = { static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
.init = eukrea_cpuimx35_usbh1_init,
.portsc = MXC_EHCI_MODE_SERIAL, .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 = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
...@@ -146,7 +156,7 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode); ...@@ -146,7 +156,7 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode);
/* /*
* Board specific initialization. * 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, mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
ARRAY_SIZE(eukrea_cpuimx35_pads)); ARRAY_SIZE(eukrea_cpuimx35_pads));
...@@ -184,9 +194,10 @@ struct sys_timer eukrea_cpuimx35_timer = { ...@@ -184,9 +194,10 @@ struct sys_timer eukrea_cpuimx35_timer = {
MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_irq = mx35_init_irq, .init_early = imx35_init_early,
.init_machine = mxc_board_init, .init_irq = mx35_init_irq,
.timer = &eukrea_cpuimx35_timer, .timer = &eukrea_cpuimx35_timer,
.init_machine = eukrea_cpuimx35_init,
MACHINE_END MACHINE_END
...@@ -266,17 +266,14 @@ static void __init kzm_timer_init(void) ...@@ -266,17 +266,14 @@ static void __init kzm_timer_init(void)
} }
static struct sys_timer kzm_timer = { 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") MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = kzm_map_io, .map_io = kzm_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = kzm_board_init, .init_irq = mx31_init_irq,
.timer = &kzm_timer, .timer = &kzm_timer,
.init_machine = kzm_board_init,
MACHINE_END MACHINE_END
This diff is collapsed.
...@@ -69,12 +69,8 @@ ...@@ -69,12 +69,8 @@
#define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11)
#define MXC_MAX_EXP_IO_LINES 16 #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. * The serial port definition structure.
*/ */
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
...@@ -110,14 +106,7 @@ static int __init mxc_init_extuart(void) ...@@ -110,14 +106,7 @@ static int __init mxc_init_extuart(void)
{ {
return platform_device_register(&serial_device); 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 = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
...@@ -134,11 +123,6 @@ static inline void mxc_init_imx_uart(void) ...@@ -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"); mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0");
imx31_add_imx_uart0(&uart_pdata); 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) 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) ...@@ -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. * 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) static void expio_mask_irq(struct irq_data *d)
{ {
...@@ -172,7 +156,7 @@ 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. * 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) static void expio_ack_irq(struct irq_data *d)
{ {
...@@ -183,7 +167,7 @@ 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. * 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) static void expio_unmask_irq(struct irq_data *d)
{ {
...@@ -476,7 +460,6 @@ static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { ...@@ -476,7 +460,6 @@ static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
}; };
#endif #endif
#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE)
static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = {
#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
{ {
...@@ -497,11 +480,6 @@ static void mxc_init_i2c(void) ...@@ -497,11 +480,6 @@ static void mxc_init_i2c(void)
imx31_add_imx_i2c1(NULL); imx31_add_imx_i2c1(NULL);
} }
#else
static void mxc_init_i2c(void)
{
}
#endif
static unsigned int ssi_pins[] = { static unsigned int ssi_pins[] = {
MX31_PIN_SFS5__SFS5, MX31_PIN_SFS5__SFS5,
...@@ -516,9 +494,7 @@ static void mxc_init_audio(void) ...@@ -516,9 +494,7 @@ static void mxc_init_audio(void)
mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi");
} }
/*! /* static mappings */
* This structure defines static mappings for the i.MX31ADS board.
*/
static struct map_desc mx31ads_io_desc[] __initdata = { static struct map_desc mx31ads_io_desc[] __initdata = {
{ {
.virtual = MX31_CS4_BASE_ADDR_VIRT, .virtual = MX31_CS4_BASE_ADDR_VIRT,
...@@ -528,9 +504,6 @@ static struct map_desc mx31ads_io_desc[] __initdata = { ...@@ -528,9 +504,6 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
}, },
}; };
/*!
* Set up static virtual mappings.
*/
static void __init mx31ads_map_io(void) static void __init mx31ads_map_io(void)
{ {
mx31_map_io(); mx31_map_io();
...@@ -543,10 +516,7 @@ static void __init mx31ads_init_irq(void) ...@@ -543,10 +516,7 @@ static void __init mx31ads_init_irq(void)
mx31ads_init_expio(); mx31ads_init_expio();
} }
/*! static void __init mx31ads_init(void)
* Board specific initialization.
*/
static void __init mxc_board_init(void)
{ {
mxc_init_extuart(); mxc_init_extuart();
mxc_init_imx_uart(); mxc_init_imx_uart();
...@@ -563,15 +533,12 @@ static struct sys_timer mx31ads_timer = { ...@@ -563,15 +533,12 @@ static struct sys_timer mx31ads_timer = {
.init = mx31ads_timer_init, .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") MACHINE_START(MX31ADS, "Freescale MX31ADS")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31ads_map_io, .map_io = mx31ads_map_io,
.init_irq = mx31ads_init_irq, .init_early = imx31_init_early,
.init_machine = mxc_board_init, .init_irq = mx31ads_init_irq,
.timer = &mx31ads_timer, .timer = &mx31ads_timer,
.init_machine = mx31ads_init,
MACHINE_END MACHINE_END
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
...@@ -110,55 +111,9 @@ static struct platform_device physmap_flash_device = { ...@@ -110,55 +111,9 @@ static struct platform_device physmap_flash_device = {
/* USB */ /* USB */
#if defined(CONFIG_USB_ULPI)
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) 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) static int usbh1_init(struct platform_device *pdev)
{ {
int pins[] = { int pins[] = {
...@@ -183,7 +138,10 @@ static int usbh1_init(struct platform_device *pdev) ...@@ -183,7 +138,10 @@ static int usbh1_init(struct platform_device *pdev)
mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true); 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) static int usbh2_init(struct platform_device *pdev)
...@@ -220,41 +178,30 @@ 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_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0); gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
return 0; mdelay(10);
}
static struct mxc_usbh_platform_data usbotg_pdata = { return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
.init = usbotg_init, }
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED,
};
static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
.init = usbh1_init, .init = usbh1_init,
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, .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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = usbh2_init, .init = usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
static void lilly1131_usb_init(void) 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(1, &usbh1_pdata);
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
}
#else usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
static inline void lilly1131_usb_init(void) {} ULPI_OTG_DRVVBUS_EXT);
#endif /* CONFIG_USB_ULPI */ if (usbh2_pdata.otg)
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
}
/* SPI */ /* SPI */
...@@ -274,8 +221,8 @@ static const struct spi_imx_master spi1_pdata __initconst = { ...@@ -274,8 +221,8 @@ static const struct spi_imx_master spi1_pdata __initconst = {
.num_chipselect = ARRAY_SIZE(spi_internal_chipselect), .num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
}; };
static struct mc13783_platform_data mc13783_pdata __initdata = { static struct mc13xxx_platform_data mc13783_pdata __initdata = {
.flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN, .flags = MC13XXX_USE_RTC | MC13XXX_USE_TOUCHSCREEN,
}; };
static struct spi_board_info mc13783_dev __initdata = { static struct spi_board_info mc13783_dev __initdata = {
...@@ -347,10 +294,10 @@ static struct sys_timer mx31lilly_timer = { ...@@ -347,10 +294,10 @@ static struct sys_timer mx31lilly_timer = {
}; };
MACHINE_START(LILLY1131, "INCO startec LILLY-1131") MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = mx31lilly_board_init, .init_irq = mx31_init_irq,
.timer = &mx31lilly_timer, .timer = &mx31lilly_timer,
.init_machine = mx31lilly_board_init,
MACHINE_END MACHINE_END
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/delay.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -111,9 +112,9 @@ static const struct spi_imx_master spi1_pdata __initconst = { ...@@ -111,9 +112,9 @@ static const struct spi_imx_master spi1_pdata __initconst = {
.num_chipselect = ARRAY_SIZE(spi_internal_chipselect), .num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
}; };
static struct mc13783_platform_data mc13783_pdata __initdata = { static struct mc13xxx_platform_data mc13783_pdata __initdata = {
.flags = MC13783_USE_RTC | .flags = MC13XXX_USE_RTC |
MC13783_USE_REGULATOR, MC13XXX_USE_REGULATOR,
}; };
static struct spi_board_info mc13783_spi_dev __initdata = { static struct spi_board_info mc13783_spi_dev __initdata = {
...@@ -129,7 +130,6 @@ static struct spi_board_info mc13783_spi_dev __initdata = { ...@@ -129,7 +130,6 @@ static struct spi_board_info mc13783_spi_dev __initdata = {
* USB * USB
*/ */
#if defined(CONFIG_USB_ULPI)
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
...@@ -167,15 +167,15 @@ static int usbh2_init(struct platform_device *pdev) ...@@ -167,15 +167,15 @@ static int usbh2_init(struct platform_device *pdev)
gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS"); gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0); 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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = usbh2_init, .init = usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
#endif
/* /*
* NOR flash * NOR flash
...@@ -227,7 +227,7 @@ void __init mx31lite_map_io(void) ...@@ -227,7 +227,7 @@ void __init mx31lite_map_io(void)
static int mx31lite_baseboard; static int mx31lite_baseboard;
core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444); core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
static void __init mxc_board_init(void) static void __init mx31lite_init(void)
{ {
int ret; int ret;
...@@ -252,13 +252,11 @@ static void __init mxc_board_init(void) ...@@ -252,13 +252,11 @@ static void __init mxc_board_init(void)
imx31_add_spi_imx1(&spi1_pdata); imx31_add_spi_imx1(&spi1_pdata);
spi_register_board_info(&mc13783_spi_dev, 1); spi_register_board_info(&mc13783_spi_dev, 1);
#if defined(CONFIG_USB_ULPI)
/* USB */ /* USB */
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 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
/* SMSC9117 IRQ pin */ /* SMSC9117 IRQ pin */
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
...@@ -281,9 +279,10 @@ struct sys_timer mx31lite_timer = { ...@@ -281,9 +279,10 @@ struct sys_timer mx31lite_timer = {
MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31lite_map_io, .map_io = mx31lite_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = mxc_board_init, .init_irq = mx31_init_irq,
.timer = &mx31lite_timer, .timer = &mx31lite_timer,
.init_machine = mx31lite_init,
MACHINE_END MACHINE_END
...@@ -214,7 +214,7 @@ static struct regulator_init_data cam_vreg_data = { ...@@ -214,7 +214,7 @@ static struct regulator_init_data cam_vreg_data = {
.consumer_supplies = cam_consumers, .consumer_supplies = cam_consumers,
}; };
static struct mc13783_regulator_init_data moboard_regulators[] = { static struct mc13xxx_regulator_init_data moboard_regulators[] = {
{ {
.id = MC13783_REG_VMMC1, .id = MC13783_REG_VMMC1,
.init_data = &sdhc_vreg_data, .init_data = &sdhc_vreg_data,
...@@ -267,12 +267,12 @@ static struct mc13783_leds_platform_data moboard_leds = { ...@@ -267,12 +267,12 @@ static struct mc13783_leds_platform_data moboard_leds = {
.tc2_period = MC13783_LED_PERIOD_10MS, .tc2_period = MC13783_LED_PERIOD_10MS,
}; };
static struct mc13783_platform_data moboard_pmic = { static struct mc13xxx_platform_data moboard_pmic = {
.regulators = moboard_regulators, .regulators = moboard_regulators,
.num_regulators = ARRAY_SIZE(moboard_regulators), .num_regulators = ARRAY_SIZE(moboard_regulators),
.leds = &moboard_leds, .leds = &moboard_leds,
.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC | .flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC |
MC13783_USE_ADC | MC13783_USE_LED, MC13XXX_USE_ADC | MC13XXX_USE_LED,
}; };
static struct spi_board_info moboard_spi_board_info[] __initdata = { static struct spi_board_info moboard_spi_board_info[] __initdata = {
...@@ -400,19 +400,24 @@ static void usb_xcvr_reset(void) ...@@ -400,19 +400,24 @@ static void usb_xcvr_reset(void)
mdelay(1); 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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = moboard_usbh2_init_hw,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
static int __init moboard_usbh2_init(void) static int __init moboard_usbh2_init(void)
{ {
struct platform_device *pdev; struct platform_device *pdev;
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (!usbh2_pdata.otg)
return -ENODEV;
pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata); pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
if (IS_ERR(pdev)) if (IS_ERR(pdev))
...@@ -420,10 +425,6 @@ static int __init moboard_usbh2_init(void) ...@@ -420,10 +425,6 @@ static int __init moboard_usbh2_init(void)
return 0; return 0;
} }
#else
static inline int moboard_usbh2_init(void) { return 0; }
#endif
static struct gpio_led mx31moboard_leds[] = { static struct gpio_led mx31moboard_leds[] = {
{ {
...@@ -503,7 +504,7 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); ...@@ -503,7 +504,7 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
/* /*
* Board specific initialization. * 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), mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins),
"moboard"); "moboard");
...@@ -564,10 +565,10 @@ struct sys_timer mx31moboard_timer = { ...@@ -564,10 +565,10 @@ struct sys_timer mx31moboard_timer = {
MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
/* Maintainer: Valentin Longchamp, EPFL Mobots group */ /* Maintainer: Valentin Longchamp, EPFL Mobots group */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = mxc_board_init, .init_irq = mx31_init_irq,
.timer = &mx31moboard_timer, .timer = &mx31moboard_timer,
.init_machine = mx31moboard_init,
MACHINE_END MACHINE_END
...@@ -118,24 +118,42 @@ static iomux_v3_cfg_t mx35pdk_pads[] = { ...@@ -118,24 +118,42 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
MX35_PAD_SD1_DATA1__ESDHC1_DAT1, MX35_PAD_SD1_DATA1__ESDHC1_DAT1,
MX35_PAD_SD1_DATA2__ESDHC1_DAT2, MX35_PAD_SD1_DATA2__ESDHC1_DAT2,
MX35_PAD_SD1_DATA3__ESDHC1_DAT3, 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 */ /* OTG config */
static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = { static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = mx35_3ds_otg_init,
.portsc = MXC_EHCI_MODE_UTMI, .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 */ /* USB HOST config */
static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
.init = mx35_3ds_usbh_init,
.portsc = MXC_EHCI_MODE_SERIAL, .portsc = MXC_EHCI_MODE_SERIAL,
.flags = MXC_EHCI_INTERFACE_SINGLE_UNI |
MXC_EHCI_INTERNAL_PHY,
}; };
static int otg_mode_host; static int otg_mode_host;
...@@ -153,10 +171,14 @@ static int __init mx35_3ds_otg_mode(char *options) ...@@ -153,10 +171,14 @@ static int __init mx35_3ds_otg_mode(char *options)
} }
__setup("otg_mode=", mx35_3ds_otg_mode); __setup("otg_mode=", mx35_3ds_otg_mode);
static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = {
.bitrate = 100000,
};
/* /*
* Board specific initialization. * 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)); mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
...@@ -180,6 +202,7 @@ static void __init mxc_board_init(void) ...@@ -180,6 +202,7 @@ static void __init mxc_board_init(void)
if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
pr_warn("Init of the debugboard failed, all " pr_warn("Init of the debugboard failed, all "
"devices on the debugboard are unusable.\n"); "devices on the debugboard are unusable.\n");
imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
} }
static void __init mx35pdk_timer_init(void) static void __init mx35pdk_timer_init(void)
...@@ -193,9 +216,10 @@ struct sys_timer mx35pdk_timer = { ...@@ -193,9 +216,10 @@ struct sys_timer mx35pdk_timer = {
MACHINE_START(MX35_3DS, "Freescale MX35PDK") MACHINE_START(MX35_3DS, "Freescale MX35PDK")
/* Maintainer: Freescale Semiconductor, Inc */ /* Maintainer: Freescale Semiconductor, Inc */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_irq = mx35_init_irq, .init_early = imx35_init_early,
.init_machine = mxc_board_init, .init_irq = mx35_init_irq,
.timer = &mx35pdk_timer, .timer = &mx35pdk_timer,
.init_machine = mx35_3ds_init,
MACHINE_END MACHINE_END
...@@ -533,17 +533,25 @@ static struct platform_device pcm970_sja1000 = { ...@@ -533,17 +533,25 @@ static struct platform_device pcm970_sja1000 = {
.num_resources = ARRAY_SIZE(pcm970_sja1000_resources), .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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = pcm037_otg_init,
.portsc = MXC_EHCI_MODE_ULPI, .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 = { static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.init = pcm037_usbh2_init,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
}; };
#endif
static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
...@@ -568,7 +576,7 @@ __setup("otg_mode=", pcm037_otg_mode); ...@@ -568,7 +576,7 @@ __setup("otg_mode=", pcm037_otg_mode);
/* /*
* Board specific initialization. * Board specific initialization.
*/ */
static void __init mxc_board_init(void) static void __init pcm037_init(void)
{ {
int ret; int ret;
...@@ -646,19 +654,18 @@ static void __init mxc_board_init(void) ...@@ -646,19 +654,18 @@ static void __init mxc_board_init(void)
platform_device_register(&pcm970_sja1000); platform_device_register(&pcm970_sja1000);
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (otg_pdata.otg)
imx31_add_mxc_ehci_otg(&otg_pdata); imx31_add_mxc_ehci_otg(&otg_pdata);
} }
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 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) if (!otg_mode_host)
imx31_add_fsl_usb2_udc(&otg_device_pdata); imx31_add_fsl_usb2_udc(&otg_device_pdata);
...@@ -675,9 +682,10 @@ struct sys_timer pcm037_timer = { ...@@ -675,9 +682,10 @@ struct sys_timer pcm037_timer = {
MACHINE_START(PCM037, "Phytec Phycore pcm037") MACHINE_START(PCM037, "Phytec Phycore pcm037")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = mxc_board_init, .init_irq = mx31_init_irq,
.timer = &pcm037_timer, .timer = &pcm037_timer,
.init_machine = pcm037_init,
MACHINE_END MACHINE_END
...@@ -180,9 +180,7 @@ static int __init eet_init_devices(void) ...@@ -180,9 +180,7 @@ static int __init eet_init_devices(void)
/* SPI */ /* SPI */
spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); 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); imx31_add_spi_imx0(&pcm037_spi1_pdata);
#endif
platform_device_register(&pcm037_gpio_keys_device); platform_device_register(&pcm037_gpio_keys_device);
......
...@@ -115,7 +115,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -115,7 +115,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = { static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = {
.bitrate = 50000, .bitrate = 50000,
}; };
...@@ -134,7 +133,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = { ...@@ -134,7 +133,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
I2C_BOARD_INFO("pcf8563", 0x51), I2C_BOARD_INFO("pcf8563", 0x51),
} }
}; };
#endif
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pcm043_flash, &pcm043_flash,
...@@ -221,9 +219,9 @@ static iomux_v3_cfg_t pcm043_pads[] = { ...@@ -221,9 +219,9 @@ static iomux_v3_cfg_t pcm043_pads[] = {
MX35_PAD_SD1_DATA3__ESDHC1_DAT3, MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
}; };
#define AC97_GPIO_TXFS (1 * 32 + 31) #define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31)
#define AC97_GPIO_TXD (1 * 32 + 28) #define AC97_GPIO_TXD IMX_GPIO_NR(2, 28)
#define AC97_GPIO_RESET (1 * 32 + 0) #define AC97_GPIO_RESET IMX_GPIO_NR(2, 0)
static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97)
{ {
...@@ -307,18 +305,26 @@ pcm037_nand_board_info __initconst = { ...@@ -307,18 +305,26 @@ pcm037_nand_board_info __initconst = {
.hw_ecc = 1, .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 = { static struct mxc_usbh_platform_data otg_pdata __initdata = {
.init = pcm043_otg_init,
.portsc = MXC_EHCI_MODE_UTMI, .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 = { static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
.init = pcm043_usbh1_init,
.portsc = MXC_EHCI_MODE_SERIAL, .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 = { static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
...@@ -343,7 +349,7 @@ __setup("otg_mode=", pcm043_otg_mode); ...@@ -343,7 +349,7 @@ __setup("otg_mode=", pcm043_otg_mode);
/* /*
* Board specific initialization. * 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)); mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
...@@ -369,26 +375,22 @@ static void __init mxc_board_init(void) ...@@ -369,26 +375,22 @@ static void __init mxc_board_init(void)
imx35_add_imx_uart1(&uart_pdata); imx35_add_imx_uart1(&uart_pdata);
#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
i2c_register_board_info(0, pcm043_i2c_devices, i2c_register_board_info(0, pcm043_i2c_devices,
ARRAY_SIZE(pcm043_i2c_devices)); ARRAY_SIZE(pcm043_i2c_devices));
imx35_add_imx_i2c0(&pcm043_i2c0_data); imx35_add_imx_i2c0(&pcm043_i2c0_data);
#endif
mxc_register_device(&mx3_ipu, &mx3_ipu_data); mxc_register_device(&mx3_ipu, &mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); mxc_register_device(&mx3_fb, &mx3fb_pdata);
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (otg_pdata.otg)
imx35_add_mxc_ehci_otg(&otg_pdata); imx35_add_mxc_ehci_otg(&otg_pdata);
} }
imx35_add_mxc_ehci_hs(&usbh1_pdata); imx35_add_mxc_ehci_hs(&usbh1_pdata);
#endif
if (!otg_mode_host) if (!otg_mode_host)
imx35_add_fsl_usb2_udc(&otg_device_pdata); imx35_add_fsl_usb2_udc(&otg_device_pdata);
...@@ -407,10 +409,10 @@ struct sys_timer pcm043_timer = { ...@@ -407,10 +409,10 @@ struct sys_timer pcm043_timer = {
MACHINE_START(PCM043, "Phytec Phycore pcm043") MACHINE_START(PCM043, "Phytec Phycore pcm043")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_irq = mx35_init_irq, .init_early = imx35_init_early,
.init_machine = mxc_board_init, .init_irq = mx35_init_irq,
.timer = &pcm043_timer, .timer = &pcm043_timer,
.init_machine = pcm043_init,
MACHINE_END MACHINE_END
...@@ -54,10 +54,6 @@ ...@@ -54,10 +54,6 @@
#define QONG_FPGA_IRQ IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1) #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 = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
...@@ -247,7 +243,7 @@ static void __init qong_init_fpga(void) ...@@ -247,7 +243,7 @@ static void __init qong_init_fpga(void)
/* /*
* Board specific initialization. * Board specific initialization.
*/ */
static void __init mxc_board_init(void) static void __init qong_init(void)
{ {
mxc_init_imx_uart(); mxc_init_imx_uart();
qong_init_nor_mtd(); qong_init_nor_mtd();
...@@ -263,16 +259,12 @@ static struct sys_timer qong_timer = { ...@@ -263,16 +259,12 @@ static struct sys_timer qong_timer = {
.init = qong_timer_init, .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") MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
/* Maintainer: DENX Software Engineering GmbH */ /* Maintainer: DENX Software Engineering GmbH */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_early = imx31_init_early,
.init_machine = mxc_board_init, .init_irq = mx31_init_irq,
.timer = &qong_timer, .timer = &qong_timer,
.init_machine = qong_init,
MACHINE_END MACHINE_END
/*
* 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 @@ ...@@ -27,14 +27,8 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-v3.h> #include <mach/iomux-v3.h>
#include <mach/gpio.h>
/*! #include <mach/irqs.h>
* @file mm.c
*
* @brief This file creates static virtual to physical mappings, common to all MX3 boards.
*
* @ingroup Memory
*/
#ifdef CONFIG_SOC_IMX31 #ifdef CONFIG_SOC_IMX31
static struct map_desc mx31_io_desc[] __initdata = { static struct map_desc mx31_io_desc[] __initdata = {
...@@ -51,18 +45,26 @@ static struct map_desc mx31_io_desc[] __initdata = { ...@@ -51,18 +45,26 @@ static struct map_desc mx31_io_desc[] __initdata = {
* for the IO modules. * for the IO modules.
*/ */
void __init mx31_map_io(void) void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
void __init imx31_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX31); mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); 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); 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) void __init mx31_init_irq(void)
{ {
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); 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 */ #endif /* ifdef CONFIG_SOC_IMX31 */
...@@ -76,19 +78,27 @@ static struct map_desc mx35_io_desc[] __initdata = { ...@@ -76,19 +78,27 @@ static struct map_desc mx35_io_desc[] __initdata = {
}; };
void __init mx35_map_io(void) void __init mx35_map_io(void)
{
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
}
void __init imx35_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX35); mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_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); 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) void __init mx35_init_irq(void)
{ {
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); 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 */ #endif /* ifdef CONFIG_SOC_IMX35 */
...@@ -129,4 +139,3 @@ static int mxc_init_l2x0(void) ...@@ -129,4 +139,3 @@ static int mxc_init_l2x0(void)
arch_initcall(mxc_init_l2x0); arch_initcall(mxc_init_l2x0);
#endif #endif
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -149,7 +150,10 @@ static int devboard_usbh1_hw_init(struct platform_device *pdev) ...@@ -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_CSPI1_SPI_RDY, USB_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SFS6, 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) #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) ...@@ -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 = { static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
.init = devboard_usbh1_hw_init, .init = devboard_usbh1_hw_init,
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, .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) static int __init devboard_usbh1_init(void)
......
...@@ -265,7 +265,10 @@ static int marxbot_usbh1_hw_init(struct platform_device *pdev) ...@@ -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_CSPI1_SPI_RDY, USB_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SFS6, 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) #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) ...@@ -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 = { static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
.init = marxbot_usbh1_hw_init, .init = marxbot_usbh1_hw_init,
.portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, .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) static int __init marxbot_usbh1_init(void)
......
...@@ -123,17 +123,24 @@ static const struct fsl_usb2_platform_data usb_pdata __initconst = { ...@@ -123,17 +123,24 @@ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
#if defined(CONFIG_USB_ULPI) #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 = { static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
.init = smartbot_otg_init,
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
static int __init smartbot_otg_host_init(void) static int __init smartbot_otg_host_init(void)
{ {
struct platform_device *pdev; struct platform_device *pdev;
otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, otg_host_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); ULPI_OTG_DRVVBUS_EXT);
if (!otg_host_pdata.otg)
return -ENODEV;
pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata); pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
if (IS_ERR(pdev)) if (IS_ERR(pdev))
......
if ARCH_MX5 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 config ARCH_MX50
bool bool
...@@ -50,6 +51,7 @@ config MACH_MX51_BABBAGE ...@@ -50,6 +51,7 @@ config MACH_MX51_BABBAGE
config MACH_MX51_3DS config MACH_MX51_3DS
bool "Support MX51PDK (3DS)" bool "Support MX51PDK (3DS)"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
...@@ -112,19 +114,32 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD ...@@ -112,19 +114,32 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD
endchoice endchoice
config MACH_MX51_EFIKAMX config MX51_EFIKA_COMMON
bool "Support MX51 Genesi Efika MX nettop" bool
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_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 help
Include support for Genesi Efika MX nettop. This includes specific Include support for Genesi Efika MX nettop. This includes specific
configurations for the board and its peripherals. 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 config MACH_MX53_EVK
bool "Support MX53 EVK platforms" bool "Support MX53 EVK platforms"
select SOC_IMX53 select SOC_IMX53
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
...@@ -136,6 +151,8 @@ config MACH_MX53_EVK ...@@ -136,6 +151,8 @@ config MACH_MX53_EVK
config MACH_MX53_SMD config MACH_MX53_SMD
bool "Support MX53 SMD platforms" bool "Support MX53 SMD platforms"
select SOC_IMX53 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_IMX_UART
help help
Include support for MX53 SMD platform. This includes specific Include support for MX53 SMD platform. This includes specific
...@@ -144,7 +161,10 @@ config MACH_MX53_SMD ...@@ -144,7 +161,10 @@ config MACH_MX53_SMD
config MACH_MX53_LOCO config MACH_MX53_LOCO
bool "Support MX53 LOCO platforms" bool "Support MX53 LOCO platforms"
select SOC_IMX53 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_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
help help
Include support for MX53 LOCO platform. This includes specific Include support for MX53 LOCO platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
...@@ -157,6 +177,7 @@ config MACH_MX50_RDP ...@@ -157,6 +177,7 @@ config MACH_MX50_RDP
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_FEC
help help
Include support for MX50 reference design platform (RDP) board. This Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals. includes specific configurations for the board and its peripherals.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Object file lists. # 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_SOC_IMX50) += mm-mx50.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
...@@ -16,5 +16,7 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.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_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.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_EFIKAMX) += board-mx51_efikamx.o
obj-$(CONFIG_MACH_MX51_EFIKASB) += board-mx51_efikasb.o
obj-$(CONFIG_MACH_MX50_RDP) += board-mx50_rdp.o obj-$(CONFIG_MACH_MX50_RDP) += board-mx50_rdp.o
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#define MX51_USB_PLL_DIV_19_2_MHZ 0x01 #define MX51_USB_PLL_DIV_19_2_MHZ 0x01
#define MX51_USB_PLL_DIV_24_MHZ 0x02 #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[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
...@@ -105,12 +104,9 @@ static struct platform_device serial_device = { ...@@ -105,12 +104,9 @@ static struct platform_device serial_device = {
.platform_data = serial_platform_data, .platform_data = serial_platform_data,
}, },
}; };
#endif
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
&serial_device, &serial_device,
#endif
}; };
static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = { static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = {
...@@ -188,7 +184,10 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -188,7 +184,10 @@ static int initialize_otg_port(struct platform_device *pdev)
v |= MX51_USB_PLL_DIV_19_2_MHZ; v |= MX51_USB_PLL_DIV_19_2_MHZ;
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
iounmap(usb_base); 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) static int initialize_usbh1_port(struct platform_device *pdev)
...@@ -206,13 +205,16 @@ 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); 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); __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
iounmap(usb_base); 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 = { static struct mxc_usbh_platform_data dr_utmi_config = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
.flags = MXC_EHCI_INTERNAL_PHY,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static struct fsl_usb2_platform_data usb_pdata = {
...@@ -223,7 +225,6 @@ 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 = { static struct mxc_usbh_platform_data usbh1_config = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
}; };
static int otg_mode_host; static int otg_mode_host;
...@@ -298,7 +299,8 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") ...@@ -298,7 +299,8 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
/* Maintainer: Eric Bénard <eric@eukrea.com> */ /* Maintainer: Eric Bénard <eric@eukrea.com> */
.boot_params = MX51_PHYS_OFFSET + 0x100, .boot_params = MX51_PHYS_OFFSET + 0x100,
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.init_machine = eukrea_cpuimx51_init,
.timer = &mxc_timer, .timer = &mxc_timer,
.init_machine = eukrea_cpuimx51_init,
MACHINE_END MACHINE_END
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h" #include "devices.h"
#include "cpu_op-mx51.h"
#define USBH1_RST IMX_GPIO_NR(2, 28) #define USBH1_RST IMX_GPIO_NR(2, 28)
#define ETH_RST IMX_GPIO_NR(2, 31) #define ETH_RST IMX_GPIO_NR(2, 31)
...@@ -109,7 +110,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { ...@@ -109,7 +110,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
/* Touchscreen */ /* Touchscreen */
/* IRQ */ /* 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_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
}; };
...@@ -118,15 +119,9 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -118,15 +119,9 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .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 = { static struct tsc2007_platform_data tsc2007_info = {
.model = 2007, .model = 2007,
.x_plate_ohms = 180, .x_plate_ohms = 180,
.get_pendown_state = ts_get_pendown_state,
}; };
static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
...@@ -167,7 +162,10 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -167,7 +162,10 @@ static int initialize_otg_port(struct platform_device *pdev)
v |= MX51_USB_PLL_DIV_19_2_MHZ; v |= MX51_USB_PLL_DIV_19_2_MHZ;
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
iounmap(usb_base); 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) static int initialize_usbh1_port(struct platform_device *pdev)
...@@ -186,13 +184,16 @@ 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, __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
usbother_base + MX51_USB_CTRL_1_OFFSET); usbother_base + MX51_USB_CTRL_1_OFFSET);
iounmap(usb_base); 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 = { static struct mxc_usbh_platform_data dr_utmi_config = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
.flags = MXC_EHCI_INTERNAL_PHY,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static struct fsl_usb2_platform_data usb_pdata = {
...@@ -203,7 +204,6 @@ 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 = { static struct mxc_usbh_platform_data usbh1_config = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
}; };
static int otg_mode_host; static int otg_mode_host;
...@@ -242,7 +242,7 @@ static struct mcp251x_platform_data mcp251x_info = { ...@@ -242,7 +242,7 @@ static struct mcp251x_platform_data mcp251x_info = {
static struct spi_board_info cpuimx51sd_spi_device[] = { static struct spi_board_info cpuimx51sd_spi_device[] = {
{ {
.modalias = "mcp2515", .modalias = "mcp2515",
.max_speed_hz = 6500000, .max_speed_hz = 10000000,
.bus_num = 0, .bus_num = 0,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
.chip_select = 0, .chip_select = 0,
...@@ -269,6 +269,10 @@ static void __init eukrea_cpuimx51sd_init(void) ...@@ -269,6 +269,10 @@ static void __init eukrea_cpuimx51sd_init(void)
mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads, mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads,
ARRAY_SIZE(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_imx_uart(0, &uart_pdata);
imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info); imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info);
...@@ -329,7 +333,8 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") ...@@ -329,7 +333,8 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
/* Maintainer: Eric Bénard <eric@eukrea.com> */ /* Maintainer: Eric Bénard <eric@eukrea.com> */
.boot_params = MX51_PHYS_OFFSET + 0x100, .boot_params = MX51_PHYS_OFFSET + 0x100,
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.init_machine = eukrea_cpuimx51sd_init,
.timer = &mxc_timer, .timer = &mxc_timer,
.init_machine = eukrea_cpuimx51sd_init,
MACHINE_END MACHINE_END
...@@ -35,7 +35,10 @@ ...@@ -35,7 +35,10 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.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 = { static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
/* SD1 */ /* SD1 */
...@@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { ...@@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
MX50_PAD_I2C3_SCL__USBOTG_OC, MX50_PAD_I2C3_SCL__USBOTG_OC,
MX50_PAD_SSI_RXC__FEC_MDIO, 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_D0__FEC_TXCLK,
MX50_PAD_DISP_D1__FEC_RX_ER, MX50_PAD_DISP_D1__FEC_RX_ER,
MX50_PAD_DISP_D2__FEC_RX_DV, MX50_PAD_DISP_D2__FEC_RX_DV,
...@@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { ...@@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
MX50_PAD_DISP_D5__FEC_TX_EN, MX50_PAD_DISP_D5__FEC_TX_EN,
MX50_PAD_DISP_D6__FEC_TXD1, MX50_PAD_DISP_D6__FEC_TXD1,
MX50_PAD_DISP_D7__FEC_TXD0, MX50_PAD_DISP_D7__FEC_TXD0,
MX50_PAD_SSI_RXFS__FEC_MDC,
MX50_PAD_I2C3_SDA__GPIO_6_23, MX50_PAD_I2C3_SDA__GPIO_6_23,
MX50_PAD_ECSPI1_SCLK__GPIO_4_12, MX50_PAD_ECSPI1_SCLK__GPIO_4_12,
...@@ -168,6 +170,24 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -168,6 +170,24 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .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. * Board specific initialization.
*/ */
...@@ -178,6 +198,11 @@ static void __init mx50_rdp_board_init(void) ...@@ -178,6 +198,11 @@ static void __init mx50_rdp_board_init(void)
imx50_add_imx_uart(0, &uart_pdata); imx50_add_imx_uart(0, &uart_pdata);
imx50_add_imx_uart(1, &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) static void __init mx50_rdp_timer_init(void)
...@@ -191,7 +216,8 @@ static struct sys_timer mx50_rdp_timer = { ...@@ -191,7 +216,8 @@ static struct sys_timer mx50_rdp_timer = {
MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
.map_io = mx50_map_io, .map_io = mx50_map_io,
.init_early = imx50_init_early,
.init_irq = mx50_init_irq, .init_irq = mx50_init_irq,
.init_machine = mx50_rdp_board_init,
.timer = &mx50_rdp_timer, .timer = &mx50_rdp_timer,
.init_machine = mx50_rdp_board_init,
MACHINE_END MACHINE_END
...@@ -71,24 +71,10 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = { ...@@ -71,24 +71,10 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = {
}; };
/* Serial ports */ /* Serial ports */
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .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[] = { static int mx51_3ds_board_keymap[] = {
KEY(0, 0, KEY_1), KEY(0, 0, KEY_1),
KEY(0, 1, KEY_2), KEY(0, 1, KEY_2),
...@@ -124,16 +110,6 @@ static const struct matrix_keymap_data mx51_3ds_map_data __initconst = { ...@@ -124,16 +110,6 @@ static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
.keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), .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[] = { static int mx51_3ds_spi2_cs[] = {
MXC_SPI_CS(0), MXC_SPI_CS(0),
MX51_3DS_ECSPI2_CS, MX51_3DS_ECSPI2_CS,
...@@ -157,11 +133,14 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = { ...@@ -157,11 +133,14 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = {
/* /*
* Board specific initialization. * 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, mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
ARRAY_SIZE(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); imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
spi_register_board_info(mx51_3ds_spi_nor_device, spi_register_board_info(mx51_3ds_spi_nor_device,
...@@ -172,7 +151,8 @@ static void __init mxc_board_init(void) ...@@ -172,7 +151,8 @@ static void __init mxc_board_init(void)
"devices on the board are unusable.\n"); "devices on the board are unusable.\n");
imx51_add_sdhci_esdhc_imx(0, NULL); 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) static void __init mx51_3ds_timer_init(void)
...@@ -180,15 +160,16 @@ 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); mx51_clocks_init(32768, 24000000, 22579200, 0);
} }
static struct sys_timer mxc_timer = { static struct sys_timer mx51_3ds_timer = {
.init = mx51_3ds_timer_init, .init = mx51_3ds_timer_init,
}; };
MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX51_PHYS_OFFSET + 0x100, .boot_params = MX51_PHYS_OFFSET + 0x100,
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.init_machine = mxc_board_init, .timer = &mx51_3ds_timer,
.timer = &mxc_timer, .init_machine = mx51_3ds_init,
MACHINE_END MACHINE_END
...@@ -161,23 +161,10 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { ...@@ -161,23 +161,10 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
}; };
/* Serial ports */ /* Serial ports */
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .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 = { static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
.bitrate = 100000, .bitrate = 100000,
}; };
...@@ -272,7 +259,10 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -272,7 +259,10 @@ static int initialize_otg_port(struct platform_device *pdev)
v |= MX51_USB_PLL_DIV_19_2_MHZ; v |= MX51_USB_PLL_DIV_19_2_MHZ;
__raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
iounmap(usb_base); 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) static int initialize_usbh1_port(struct platform_device *pdev)
...@@ -290,13 +280,16 @@ 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); 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); __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
iounmap(usb_base); 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 = { static struct mxc_usbh_platform_data dr_utmi_config = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
.flags = MXC_EHCI_INTERNAL_PHY,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static struct fsl_usb2_platform_data usb_pdata = {
...@@ -307,7 +300,6 @@ 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 = { static struct mxc_usbh_platform_data usbh1_config = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
.flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
}; };
static int otg_mode_host; static int otg_mode_host;
...@@ -349,7 +341,7 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { ...@@ -349,7 +341,7 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
/* /*
* Board specific initialization. * 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 usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
...@@ -360,7 +352,11 @@ static void __init mxc_board_init(void) ...@@ -360,7 +352,11 @@ static void __init mxc_board_init(void)
#endif #endif
mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads, mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
ARRAY_SIZE(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(); babbage_fec_reset();
imx51_add_fec(NULL); imx51_add_fec(NULL);
...@@ -399,15 +395,16 @@ static void __init mx51_babbage_timer_init(void) ...@@ -399,15 +395,16 @@ static void __init mx51_babbage_timer_init(void)
mx51_clocks_init(32768, 24000000, 22579200, 0); mx51_clocks_init(32768, 24000000, 22579200, 0);
} }
static struct sys_timer mxc_timer = { static struct sys_timer mx51_babbage_timer = {
.init = mx51_babbage_timer_init, .init = mx51_babbage_timer_init,
}; };
MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
/* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
.boot_params = MX51_PHYS_OFFSET + 0x100, .boot_params = MX51_PHYS_OFFSET + 0x100,
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.init_machine = mxc_board_init, .timer = &mx51_babbage_timer,
.timer = &mxc_timer, .init_machine = mx51_babbage_init,
MACHINE_END MACHINE_END
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include <linux/fsl_devices.h> #include <linux/fsl_devices.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/spi/spi.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/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -40,8 +43,7 @@ ...@@ -40,8 +43,7 @@
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h" #include "devices.h"
#include "efika.h"
#define MX51_USB_PLL_DIV_24_MHZ 0x01
#define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16)
#define EFIKAMX_PCBID1 IMX_GPIO_NR(3, 17) #define EFIKAMX_PCBID1 IMX_GPIO_NR(3, 17)
...@@ -53,13 +55,14 @@ ...@@ -53,13 +55,14 @@
#define EFIKAMX_POWER_KEY IMX_GPIO_NR(2, 31) #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 */ /* board 1.1 doesn't have same reset gpio */
#define EFIKAMX_RESET1_1 IMX_GPIO_NR(3, 2) #define EFIKAMX_RESET1_1 IMX_GPIO_NR(3, 2)
#define EFIKAMX_RESET IMX_GPIO_NR(1, 4) #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 */ /* 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_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) #define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
...@@ -67,38 +70,11 @@ ...@@ -67,38 +70,11 @@
#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) #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[] = { 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 */ /* board id */
MX51_PAD_PCBID0, MX51_PAD_PCBID0,
MX51_PAD_PCBID1, MX51_PAD_PCBID1,
MX51_PAD_PCBID2, 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 */ /* leds */
MX51_PAD_CSI1_D9__GPIO3_13, MX51_PAD_CSI1_D9__GPIO3_13,
MX51_PAD_CSI1_VSYNC__GPIO3_14, MX51_PAD_CSI1_VSYNC__GPIO3_14,
...@@ -107,64 +83,12 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = { ...@@ -107,64 +83,12 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
/* power key */ /* power key */
MX51_PAD_PWRKEY, 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 */ /* reset */
MX51_PAD_DI1_PIN13__GPIO3_2, MX51_PAD_DI1_PIN13__GPIO3_2,
MX51_PAD_GPIO1_4__GPIO1_4, MX51_PAD_GPIO1_4__GPIO1_4,
};
/* Serial ports */ /* power off */
#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) MX51_PAD_CSI2_VSYNC__GPIO4_13,
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,
}; };
/* PCBID2 PCBID1 PCBID0 STATE /* PCBID2 PCBID1 PCBID0 STATE
...@@ -265,47 +189,6 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon ...@@ -265,47 +189,6 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon
.nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey), .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) void mx51_efikamx_reset(void)
{ {
if (system_rev == 0x11) if (system_rev == 0x11)
...@@ -314,14 +197,53 @@ void mx51_efikamx_reset(void) ...@@ -314,14 +197,53 @@ void mx51_efikamx_reset(void)
gpio_direction_output(EFIKAMX_RESET, 0); 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, mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
ARRAY_SIZE(mx51efikamx_pads)); ARRAY_SIZE(mx51efikamx_pads));
efika_board_common_init();
mx51_efikamx_board_id(); 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 */ /* on < 1.2 boards both SD controllers are used */
if (system_rev < 0x12) { if (system_rev < 0x12) {
...@@ -332,10 +254,6 @@ static void __init mxc_board_init(void) ...@@ -332,10 +254,6 @@ static void __init mxc_board_init(void)
platform_device_register(&mx51_efikamx_leds_device); platform_device_register(&mx51_efikamx_leds_device);
imx51_add_gpio_keys(&mx51_efikamx_powerkey_data); 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) { if (system_rev == 0x11) {
gpio_request(EFIKAMX_RESET1_1, "reset"); gpio_request(EFIKAMX_RESET1_1, "reset");
gpio_direction_output(EFIKAMX_RESET1_1, 1); gpio_direction_output(EFIKAMX_RESET1_1, 1);
...@@ -343,6 +261,20 @@ static void __init mxc_board_init(void) ...@@ -343,6 +261,20 @@ static void __init mxc_board_init(void)
gpio_request(EFIKAMX_RESET, "reset"); gpio_request(EFIKAMX_RESET, "reset");
gpio_direction_output(EFIKAMX_RESET, 1); 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) static void __init mx51_efikamx_timer_init(void)
...@@ -350,15 +282,16 @@ 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); mx51_clocks_init(32768, 24000000, 22579200, 24576000);
} }
static struct sys_timer mxc_timer = { static struct sys_timer mx51_efikamx_timer = {
.init = mx51_efikamx_timer_init, .init = mx51_efikamx_timer_init,
}; };
MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
/* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */ /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
.boot_params = MX51_PHYS_OFFSET + 0x100, .boot_params = MX51_PHYS_OFFSET + 0x100,
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.init_machine = mxc_board_init, .timer = &mx51_efikamx_timer,
.timer = &mxc_timer, .init_machine = mx51_efikamx_init,
MACHINE_END MACHINE_END
/*
* 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
/* /*
* 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> * Copyright (C) 2010 Yong Shen. <Yong.Shen@linaro.org>
*/ */
...@@ -42,28 +42,24 @@ ...@@ -42,28 +42,24 @@
#include "devices-imx53.h" #include "devices-imx53.h"
static iomux_v3_cfg_t mx53_evk_pads[] = { static iomux_v3_cfg_t mx53_evk_pads[] = {
MX53_PAD_CSI0_D10__UART1_TXD, MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
MX53_PAD_CSI0_D11__UART1_RXD, MX53_PAD_CSI0_DAT11__UART1_RXD_MUX,
MX53_PAD_ATA_DIOW__UART1_TXD,
MX53_PAD_ATA_DMACK__UART1_RXD,
MX53_PAD_ATA_BUFFER_EN__UART2_RXD, MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
MX53_PAD_ATA_DMARQ__UART2_TXD, MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
MX53_PAD_ATA_DIOR__UART2_RTS, MX53_PAD_PATA_DIOR__UART2_RTS,
MX53_PAD_ATA_INTRQ__UART2_CTS, MX53_PAD_PATA_INTRQ__UART2_CTS,
MX53_PAD_ATA_CS_0__UART3_TXD, MX53_PAD_PATA_CS_0__UART3_TXD_MUX,
MX53_PAD_ATA_CS_1__UART3_RXD, MX53_PAD_PATA_CS_1__UART3_RXD_MUX,
MX53_PAD_ATA_DA_1__UART3_CTS,
MX53_PAD_ATA_DA_2__UART3_RTS,
MX53_PAD_EIM_D16__CSPI1_SCLK, MX53_PAD_EIM_D16__ECSPI1_SCLK,
MX53_PAD_EIM_D17__CSPI1_MISO, MX53_PAD_EIM_D17__ECSPI1_MISO,
MX53_PAD_EIM_D18__CSPI1_MOSI, MX53_PAD_EIM_D18__ECSPI1_MOSI,
/* ecspi chip select lines */ /* ecspi chip select lines */
MX53_PAD_EIM_EB2__GPIO_2_30, MX53_PAD_EIM_EB2__GPIO2_30,
MX53_PAD_EIM_D19__GPIO_3_19, MX53_PAD_EIM_D19__GPIO3_19,
}; };
static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { 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 = { ...@@ -72,9 +68,9 @@ static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
static inline void mx53_evk_init_uart(void) 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(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 = { static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = {
...@@ -139,6 +135,7 @@ static void __init mx53_evk_board_init(void) ...@@ -139,6 +135,7 @@ static void __init mx53_evk_board_init(void)
spi_register_board_info(mx53_evk_spi_board_info, spi_register_board_info(mx53_evk_spi_board_info,
ARRAY_SIZE(mx53_evk_spi_board_info)); ARRAY_SIZE(mx53_evk_spi_board_info));
imx53_add_ecspi(0, &mx53_evk_spi_data); imx53_add_ecspi(0, &mx53_evk_spi_data);
imx53_add_imx2_wdt(0, NULL);
} }
static void __init mx53_evk_timer_init(void) static void __init mx53_evk_timer_init(void)
...@@ -152,7 +149,8 @@ static struct sys_timer mx53_evk_timer = { ...@@ -152,7 +149,8 @@ static struct sys_timer mx53_evk_timer = {
MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.init_machine = mx53_evk_board_init,
.timer = &mx53_evk_timer, .timer = &mx53_evk_timer,
.init_machine = mx53_evk_board_init,
MACHINE_END MACHINE_END
...@@ -39,33 +39,147 @@ ...@@ -39,33 +39,147 @@
#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6)
static iomux_v3_cfg_t mx53_loco_pads[] = { static iomux_v3_cfg_t mx53_loco_pads[] = {
MX53_PAD_CSI0_D10__UART1_TXD, /* FEC */
MX53_PAD_CSI0_D11__UART1_RXD, MX53_PAD_FEC_MDC__FEC_MDC,
MX53_PAD_ATA_DIOW__UART1_TXD, MX53_PAD_FEC_MDIO__FEC_MDIO,
MX53_PAD_ATA_DMACK__UART1_RXD, MX53_PAD_FEC_REF_CLK__FEC_TX_CLK,
MX53_PAD_FEC_RX_ER__FEC_RX_ER,
MX53_PAD_ATA_BUFFER_EN__UART2_RXD, MX53_PAD_FEC_CRS_DV__FEC_RX_DV,
MX53_PAD_ATA_DMARQ__UART2_TXD, MX53_PAD_FEC_RXD1__FEC_RDATA_1,
MX53_PAD_ATA_DIOR__UART2_RTS, MX53_PAD_FEC_RXD0__FEC_RDATA_0,
MX53_PAD_ATA_INTRQ__UART2_CTS, MX53_PAD_FEC_TX_EN__FEC_TX_EN,
MX53_PAD_FEC_TXD1__FEC_TDATA_1,
MX53_PAD_ATA_CS_0__UART3_TXD, MX53_PAD_FEC_TXD0__FEC_TDATA_0,
MX53_PAD_ATA_CS_1__UART3_RXD, /* FEC_nRST */
MX53_PAD_ATA_DA_1__UART3_CTS, MX53_PAD_PATA_DA_0__GPIO7_6,
MX53_PAD_ATA_DA_2__UART3_RTS, /* 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) static inline void mx53_loco_fec_reset(void)
{ {
int ret; int ret;
...@@ -85,13 +199,22 @@ static struct fec_platform_data mx53_loco_fec_data = { ...@@ -85,13 +199,22 @@ static struct fec_platform_data mx53_loco_fec_data = {
.phy = PHY_INTERFACE_MODE_RMII, .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) static void __init mx53_loco_board_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
ARRAY_SIZE(mx53_loco_pads)); ARRAY_SIZE(mx53_loco_pads));
mx53_loco_init_uart(); imx53_add_imx_uart(0, NULL);
mx53_loco_fec_reset(); mx53_loco_fec_reset();
imx53_add_fec(&mx53_loco_fec_data); 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) static void __init mx53_loco_timer_init(void)
...@@ -105,7 +228,8 @@ static struct sys_timer mx53_loco_timer = { ...@@ -105,7 +228,8 @@ static struct sys_timer mx53_loco_timer = {
MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.init_machine = mx53_loco_board_init,
.timer = &mx53_loco_timer, .timer = &mx53_loco_timer,
.init_machine = mx53_loco_board_init,
MACHINE_END MACHINE_END
...@@ -39,20 +39,19 @@ ...@@ -39,20 +39,19 @@
#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
static iomux_v3_cfg_t mx53_smd_pads[] = { static iomux_v3_cfg_t mx53_smd_pads[] = {
MX53_PAD_CSI0_D10__UART1_TXD, MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
MX53_PAD_CSI0_D11__UART1_RXD, MX53_PAD_CSI0_DAT11__UART1_RXD_MUX,
MX53_PAD_ATA_DIOW__UART1_TXD,
MX53_PAD_ATA_DMACK__UART1_RXD, MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
MX53_PAD_ATA_DMARQ__UART2_TXD, MX53_PAD_PATA_CS_0__UART3_TXD_MUX,
MX53_PAD_ATA_DIOR__UART2_RTS, MX53_PAD_PATA_CS_1__UART3_RXD_MUX,
MX53_PAD_ATA_INTRQ__UART2_CTS, MX53_PAD_PATA_DA_1__UART3_CTS,
MX53_PAD_PATA_DA_2__UART3_RTS,
MX53_PAD_ATA_CS_0__UART3_TXD, /* I2C1 */
MX53_PAD_ATA_CS_1__UART3_RXD, MX53_PAD_CSI0_DAT8__I2C1_SDA,
MX53_PAD_ATA_DA_1__UART3_CTS, MX53_PAD_CSI0_DAT9__I2C1_SCL,
MX53_PAD_ATA_DA_2__UART3_RTS,
}; };
static const struct imxuart_platform_data mx53_smd_uart_data __initconst = { 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 = { ...@@ -61,8 +60,8 @@ static const struct imxuart_platform_data mx53_smd_uart_data __initconst = {
static inline void mx53_smd_init_uart(void) static inline void mx53_smd_init_uart(void)
{ {
imx53_add_imx_uart(0, &mx53_smd_uart_data); imx53_add_imx_uart(0, NULL);
imx53_add_imx_uart(1, &mx53_smd_uart_data); imx53_add_imx_uart(1, NULL);
imx53_add_imx_uart(2, &mx53_smd_uart_data); imx53_add_imx_uart(2, &mx53_smd_uart_data);
} }
...@@ -85,6 +84,10 @@ static struct fec_platform_data mx53_smd_fec_data = { ...@@ -85,6 +84,10 @@ static struct fec_platform_data mx53_smd_fec_data = {
.phy = PHY_INTERFACE_MODE_RMII, .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) static void __init mx53_smd_board_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads, mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads,
...@@ -92,6 +95,8 @@ static void __init mx53_smd_board_init(void) ...@@ -92,6 +95,8 @@ static void __init mx53_smd_board_init(void)
mx53_smd_init_uart(); mx53_smd_init_uart();
mx53_smd_fec_reset(); mx53_smd_fec_reset();
imx53_add_fec(&mx53_smd_fec_data); 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) static void __init mx53_smd_timer_init(void)
...@@ -105,7 +110,8 @@ static struct sys_timer mx53_smd_timer = { ...@@ -105,7 +110,8 @@ static struct sys_timer mx53_smd_timer = {
MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.init_machine = mx53_smd_board_init,
.timer = &mx53_smd_timer, .timer = &mx53_smd_timer,
.init_machine = mx53_smd_board_init,
MACHINE_END MACHINE_END
This diff is collapsed.
...@@ -78,11 +78,16 @@ static int get_mx53_srev(void) ...@@ -78,11 +78,16 @@ static int get_mx53_srev(void)
void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR); void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR);
u32 rev = readl(iim_base + IIM_SREV) & 0xff; u32 rev = readl(iim_base + IIM_SREV) & 0xff;
if (rev == 0x0) switch (rev) {
case 0x0:
return IMX_CHIP_REVISION_1_0; return IMX_CHIP_REVISION_1_0;
else if (rev == 0x10) case 0x2:
return IMX_CHIP_REVISION_2_0; 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 @@ ...@@ -217,9 +217,12 @@
#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET (20) #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_ESDHC1_MSHC1_CLK_SEL_MASK (0x3 << 20)
#define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL (0x1 << 19) #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_ESDHC4_CLK_SEL (0x1 << 18)
#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET (16) #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_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_OFFSET (14)
#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14) #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14)
#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12) #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12)
...@@ -271,6 +274,10 @@ ...@@ -271,6 +274,10 @@
#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK (0x7 << 22) #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_OFFSET (19)
#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK (0x7 << 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_OFFSET (16)
#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16) #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16)
#define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14) #define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment