Commit fb2e7394 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Paul Mundt

sh: ecovec: Add renesas_usbhs support

Signed-off-by: default avatarKuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 201fbceb
......@@ -20,6 +20,7 @@
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/usb/r8a66597.h>
#include <linux/usb/renesas_usbhs.h>
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>
#include <linux/spi/spi.h>
......@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = {
.resource = usb1_common_resources,
};
/*
* USBHS
*/
static int usbhs_get_id(struct platform_device *pdev)
{
return gpio_get_value(GPIO_PTB3);
}
static struct renesas_usbhs_platform_info usbhs_info = {
.platform_callback = {
.get_id = usbhs_get_id,
},
.driver_param = {
.buswait_bwait = 4,
.detection_delay = 5,
},
};
static struct resource usbhs_resources[] = {
[0] = {
.start = 0xa4d90000,
.end = 0xa4d90124 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 66,
.end = 66,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device usbhs_device = {
.name = "renesas_usbhs",
.id = 1,
.dev = {
.dma_mask = NULL, /* not use dma */
.coherent_dma_mask = 0xffffffff,
.platform_data = &usbhs_info,
},
.num_resources = ARRAY_SIZE(usbhs_resources),
.resource = usbhs_resources,
.archdata = {
.hwblk_id = HWBLK_USB1,
},
};
/* LCDC */
const static struct fb_videomode ecovec_lcd_modes[] = {
{
......@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
&sh_eth_device,
&usb0_host_device,
&usb1_common_device,
&usbhs_device,
&lcdc_device,
&ceu0_device,
&ceu1_device,
......
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