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

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

parents 1df4bb4a f9ffaa9c
...@@ -58,21 +58,6 @@ static unsigned int mxt_td60_pins[] __initdata = { ...@@ -58,21 +58,6 @@ static unsigned int mxt_td60_pins[] __initdata = {
PE9_PF_UART3_RXD, PE9_PF_UART3_RXD,
PE10_PF_UART3_CTS, PE10_PF_UART3_CTS,
PE11_PF_UART3_RTS, PE11_PF_UART3_RTS,
/* UART3 */
PB26_AF_UART4_RTS,
PB28_AF_UART4_TXD,
PB29_AF_UART4_CTS,
PB31_AF_UART4_RXD,
/* UART4 */
PB18_AF_UART5_TXD,
PB19_AF_UART5_RXD,
PB20_AF_UART5_CTS,
PB21_AF_UART5_RTS,
/* UART5 */
PB10_AF_UART6_TXD,
PB12_AF_UART6_CTS,
PB11_AF_UART6_RXD,
PB13_AF_UART6_RTS,
/* FEC */ /* FEC */
PD0_AIN_FEC_TXD0, PD0_AIN_FEC_TXD0,
PD1_AIN_FEC_TXD1, PD1_AIN_FEC_TXD1,
...@@ -261,12 +246,6 @@ static struct imxuart_platform_data uart_pdata[] = { ...@@ -261,12 +246,6 @@ static struct imxuart_platform_data uart_pdata[] = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}, { }, {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, },
}; };
...@@ -278,9 +257,6 @@ static void __init mxt_td60_board_init(void) ...@@ -278,9 +257,6 @@ static void __init mxt_td60_board_init(void)
mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);
mxc_register_device(&mxc_uart_device3, &uart_pdata[3]);
mxc_register_device(&mxc_uart_device4, &uart_pdata[4]);
mxc_register_device(&mxc_uart_device5, &uart_pdata[5]);
mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info); mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info);
i2c_register_board_info(0, mxt_td60_i2c_devices, i2c_register_board_info(0, mxt_td60_i2c_devices,
......
...@@ -173,6 +173,7 @@ DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL); ...@@ -173,6 +173,7 @@ DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL);
DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL);
DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL);
DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL);
DEFINE_CLOCK(fec_clk, 0, CCM_CGCR0, 23, get_rate_ipg, NULL);
#define _REGISTER_CLOCK(d, n, c) \ #define _REGISTER_CLOCK(d, n, c) \
{ \ { \
...@@ -204,6 +205,7 @@ static struct clk_lookup lookups[] = { ...@@ -204,6 +205,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk)
_REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk)
_REGISTER_CLOCK("fec.0", NULL, fec_clk)
}; };
int __init mx25_clocks_init(unsigned long fref) int __init mx25_clocks_init(unsigned long fref)
......
...@@ -419,3 +419,22 @@ int __init mxc_register_gpios(void) ...@@ -419,3 +419,22 @@ int __init mxc_register_gpios(void)
return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
} }
static struct resource mx25_fec_resources[] = {
{
.start = MX25_FEC_BASE_ADDR,
.end = MX25_FEC_BASE_ADDR + 0xfff,
.flags = IORESOURCE_MEM,
},
{
.start = MX25_INT_FEC,
.end = MX25_INT_FEC,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mx25_fec_device = {
.name = "fec",
.id = 0,
.num_resources = ARRAY_SIZE(mx25_fec_resources),
.resource = mx25_fec_resources,
};
...@@ -17,3 +17,4 @@ extern struct platform_device mxc_keypad_device; ...@@ -17,3 +17,4 @@ extern struct platform_device mxc_keypad_device;
extern struct platform_device mxc_i2c_device0; extern struct platform_device mxc_i2c_device0;
extern struct platform_device mxc_i2c_device1; extern struct platform_device mxc_i2c_device1;
extern struct platform_device mxc_i2c_device2; extern struct platform_device mxc_i2c_device2;
extern struct platform_device mx25_fec_device;
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/delay.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/smsc911x.h> #include <linux/fec.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -35,16 +36,57 @@ ...@@ -35,16 +36,57 @@
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/mxc_nand.h> #include <mach/mxc_nand.h>
#include "devices.h" #include "devices.h"
#include <mach/iomux-v3.h> #include <mach/iomux.h>
static struct imxuart_platform_data uart_pdata = { static struct imxuart_platform_data uart_pdata = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static struct pad_desc mx25pdk_pads[] = {
MX25_PAD_FEC_MDC__FEC_MDC,
MX25_PAD_FEC_MDIO__FEC_MDIO,
MX25_PAD_FEC_TDATA0__FEC_TDATA0,
MX25_PAD_FEC_TDATA1__FEC_TDATA1,
MX25_PAD_FEC_TX_EN__FEC_TX_EN,
MX25_PAD_FEC_RDATA0__FEC_RDATA0,
MX25_PAD_FEC_RDATA1__FEC_RDATA1,
MX25_PAD_FEC_RX_DV__FEC_RX_DV,
MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */
MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
};
static struct fec_platform_data mx25_fec_pdata = {
.phy = PHY_INTERFACE_MODE_RMII,
};
#define FEC_ENABLE_GPIO 35
#define FEC_RESET_B_GPIO 104
static void __init mx25pdk_fec_reset(void)
{
gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable");
gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset");
gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */
gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */
udelay(2);
/* turn on PHY power and lift reset */
gpio_set_value(FEC_ENABLE_GPIO, 1);
gpio_set_value(FEC_RESET_B_GPIO, 1);
}
static void __init mx25pdk_init(void) static void __init mx25pdk_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
ARRAY_SIZE(mx25pdk_pads));
mxc_register_device(&mxc_uart_device0, &uart_pdata); mxc_register_device(&mxc_uart_device0, &uart_pdata);
mxc_register_device(&mxc_usbh2, NULL); mxc_register_device(&mxc_usbh2, NULL);
mx25pdk_fec_reset();
mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
} }
static void __init mx25pdk_timer_init(void) static void __init mx25pdk_timer_init(void)
......
...@@ -49,6 +49,7 @@ config MACH_PCM037_EET ...@@ -49,6 +49,7 @@ config MACH_PCM037_EET
config MACH_MX31LITE config MACH_MX31LITE
bool "Support MX31 LITEKIT (LogicPD)" bool "Support MX31 LITEKIT (LogicPD)"
select ARCH_MX31 select ARCH_MX31
select MXC_ULPI if USB_ULPI
help help
Include support for MX31 LITEKIT platform. This includes specific Include support for MX31 LITEKIT platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
...@@ -63,7 +64,7 @@ config MACH_MX31_3DS ...@@ -63,7 +64,7 @@ config MACH_MX31_3DS
config MACH_MX31MOBOARD config MACH_MX31MOBOARD
bool "Support mx31moboard platforms (EPFL Mobots group)" bool "Support mx31moboard platforms (EPFL Mobots group)"
select ARCH_MX31 select ARCH_MX31
select MXC_ULPI select MXC_ULPI if USB_ULPI
help help
Include support for mx31moboard platform. This includes specific Include support for mx31moboard platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
......
...@@ -65,6 +65,11 @@ static struct map_desc mxc_io_desc[] __initdata = { ...@@ -65,6 +65,11 @@ static struct map_desc mxc_io_desc[] __initdata = {
.pfn = __phys_to_pfn(AIPS2_BASE_ADDR), .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
.length = AIPS2_SIZE, .length = AIPS2_SIZE,
.type = MT_DEVICE_NONSHARED .type = MT_DEVICE_NONSHARED
}, {
.virtual = SPBA0_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
.length = SPBA0_SIZE,
.type = MT_DEVICE_NONSHARED
}, },
}; };
......
...@@ -494,11 +494,6 @@ static void mxc_init_i2c(void) ...@@ -494,11 +494,6 @@ static void mxc_init_i2c(void)
*/ */
static struct map_desc mx31ads_io_desc[] __initdata = { static struct map_desc mx31ads_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
.length = SPBA0_SIZE,
.type = MT_DEVICE_NONSHARED
}, {
.virtual = CS4_BASE_ADDR_VIRT, .virtual = CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS4_BASE_ADDR), .pfn = __phys_to_pfn(CS4_BASE_ADDR),
.length = CS4_SIZE / 2, .length = CS4_SIZE / 2,
......
...@@ -135,6 +135,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { ...@@ -135,6 +135,7 @@ 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)
...@@ -180,6 +181,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { ...@@ -180,6 +181,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED, .flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
#endif
/* /*
* NOR flash * NOR flash
...@@ -212,11 +214,6 @@ static struct platform_device physmap_flash_device = { ...@@ -212,11 +214,6 @@ static struct platform_device physmap_flash_device = {
*/ */
static struct map_desc mx31lite_io_desc[] __initdata = { static struct map_desc mx31lite_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
.length = SPBA0_SIZE,
.type = MT_DEVICE_NONSHARED
}, {
.virtual = CS4_BASE_ADDR_VIRT, .virtual = CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS4_BASE_ADDR), .pfn = __phys_to_pfn(CS4_BASE_ADDR),
.length = CS4_SIZE, .length = CS4_SIZE,
...@@ -261,11 +258,13 @@ static void __init mxc_board_init(void) ...@@ -261,11 +258,13 @@ static void __init mxc_board_init(void)
mxc_register_device(&mxc_spi_device1, &spi1_pdata); mxc_register_device(&mxc_spi_device1, &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 = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
mxc_register_device(&mxc_usbh2, &usbh2_pdata); mxc_register_device(&mxc_usbh2, &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");
......
...@@ -179,7 +179,7 @@ static int __init devboard_usbh1_init(void) ...@@ -179,7 +179,7 @@ static int __init devboard_usbh1_init(void)
usbh1_pdata.otg = otg; usbh1_pdata.otg = otg;
return mxc_register_device(&mx31_usbh1, &usbh1_pdata); return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
} }
/* /*
......
...@@ -294,7 +294,7 @@ static int __init marxbot_usbh1_init(void) ...@@ -294,7 +294,7 @@ static int __init marxbot_usbh1_init(void)
usbh1_pdata.otg = otg; usbh1_pdata.otg = otg;
return mxc_register_device(&mx31_usbh1, &usbh1_pdata); return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
} }
/* /*
......
...@@ -346,6 +346,8 @@ static struct fsl_usb2_platform_data usb_pdata = { ...@@ -346,6 +346,8 @@ static struct fsl_usb2_platform_data usb_pdata = {
.phy_mode = FSL_USB2_PHY_ULPI, .phy_mode = FSL_USB2_PHY_ULPI,
}; };
#if defined(CONFIG_USB_ULPI)
#define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6) #define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6)
static int moboard_usbh2_hw_init(struct platform_device *pdev) static int moboard_usbh2_hw_init(struct platform_device *pdev)
...@@ -392,8 +394,11 @@ static int __init moboard_usbh2_init(void) ...@@ -392,8 +394,11 @@ static int __init moboard_usbh2_init(void)
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
return mxc_register_device(&mx31_usbh2, &usbh2_pdata); return mxc_register_device(&mxc_usbh2, &usbh2_pdata);
} }
#else
static inline int moboard_usbh2_init(void) { return 0; }
#endif
static struct gpio_led mx31moboard_leds[] = { static struct gpio_led mx31moboard_leds[] = {
......
...@@ -211,11 +211,6 @@ static int __init mx31pdk_init_expio(void) ...@@ -211,11 +211,6 @@ static int __init mx31pdk_init_expio(void)
*/ */
static struct map_desc mx31pdk_io_desc[] __initdata = { static struct map_desc mx31pdk_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
.length = SPBA0_SIZE,
.type = MT_DEVICE_NONSHARED,
}, {
.virtual = CS5_BASE_ADDR_VIRT, .virtual = CS5_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS5_BASE_ADDR), .pfn = __phys_to_pfn(CS5_BASE_ADDR),
.length = CS5_SIZE, .length = CS5_SIZE,
......
...@@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on) ...@@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on)
return 0; return 0;
} }
static struct i2c_board_info pcm037_i2c_2_devices[] = { static struct i2c_board_info pcm037_i2c_camera[] = {
{ {
I2C_BOARD_INFO("mt9t031", 0x5d), I2C_BOARD_INFO("mt9t031", 0x5d),
}, {
I2C_BOARD_INFO("mt9v022", 0x48),
}, },
}; };
static struct soc_camera_link iclink = { static struct soc_camera_link iclink_mt9v022 = {
.bus_id = 0, /* Must match with the camera ID */
.board_info = &pcm037_i2c_camera[1],
.i2c_adapter_id = 2,
.module_name = "mt9v022",
};
static struct soc_camera_link iclink_mt9t031 = {
.bus_id = 0, /* Must match with the camera ID */ .bus_id = 0, /* Must match with the camera ID */
.power = pcm037_camera_power, .power = pcm037_camera_power,
.board_info = &pcm037_i2c_2_devices[0], .board_info = &pcm037_i2c_camera[0],
.i2c_adapter_id = 2, .i2c_adapter_id = 2,
.module_name = "mt9t031", .module_name = "mt9t031",
}; };
...@@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = { ...@@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
} }
}; };
static struct platform_device pcm037_camera = { static struct platform_device pcm037_mt9t031 = {
.name = "soc-camera-pdrv", .name = "soc-camera-pdrv",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &iclink, .platform_data = &iclink_mt9t031,
},
};
static struct platform_device pcm037_mt9v022 = {
.name = "soc-camera-pdrv",
.id = 1,
.dev = {
.platform_data = &iclink_mt9v022,
}, },
}; };
...@@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size) ...@@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size)
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pcm037_flash, &pcm037_flash,
&pcm037_sram_device, &pcm037_sram_device,
&pcm037_camera, &pcm037_mt9t031,
&pcm037_mt9v022,
}; };
static struct ipu_platform_data mx3_ipu_data = { static struct ipu_platform_data mx3_ipu_data = {
...@@ -599,7 +617,7 @@ static void __init mxc_board_init(void) ...@@ -599,7 +617,7 @@ static void __init mxc_board_init(void)
if (!ret) if (!ret)
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
else else
iclink.power = NULL; iclink_mt9t031.power = NULL;
if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
mxc_register_device(&mx3_camera, &camera_pdata); mxc_register_device(&mx3_camera, &camera_pdata);
......
This diff is collapsed.
...@@ -41,4 +41,8 @@ ...@@ -41,4 +41,8 @@
#define UART1_BASE_ADDR 0x43f90000 #define UART1_BASE_ADDR 0x43f90000
#define UART2_BASE_ADDR 0x43f94000 #define UART2_BASE_ADDR 0x43f94000
#define MX25_FEC_BASE_ADDR 0x50038000
#define MX25_INT_FEC 57
#endif /* __MACH_MX25_H__ */ #endif /* __MACH_MX25_H__ */
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