summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentine Barshak <valentine.barshak@cogentembedded.com>2014-02-14 12:29:48 +0900
committerSimon Horman <horms+renesas@verge.net.au>2014-02-17 11:51:57 +0900
commit849f7b6c10d8016b55e13b7ad2e9f299e2da817b (patch)
tree122f89b1c42c1de2e28d337f6234e67d4e6f6724
parent248deabbd4a2f4c696338536fdaad3a01f66bee7 (diff)
downloadlinux-849f7b6c10d8016b55e13b7ad2e9f299e2da817b.tar.gz
linux-849f7b6c10d8016b55e13b7ad2e9f299e2da817b.tar.bz2
linux-849f7b6c10d8016b55e13b7ad2e9f299e2da817b.zip
ARM: shmobile: lager: Add internal USB PCI support
This adds internal PCI USB host devices to R-Car H2 Lager board. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> [damm@opensource.se: Rebased and reworked to only include USB1 and USB2] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/board-lager.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 72886af7b737..193dff0267d8 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -638,6 +638,48 @@ static struct resource sdhi2_resources[] __initdata = {
DEFINE_RES_IRQ(gic_spi(167)),
};
+/* Internal PCI1 */
+static const struct resource pci1_resources[] __initconst = {
+ DEFINE_RES_MEM(0xee0b0000, 0x10000), /* CFG */
+ DEFINE_RES_MEM(0xee0a0000, 0x10000), /* MEM */
+ DEFINE_RES_IRQ(gic_spi(112)),
+};
+
+static const struct platform_device_info pci1_info __initconst = {
+ .parent = &platform_bus,
+ .name = "pci-rcar-gen2",
+ .id = 1,
+ .res = pci1_resources,
+ .num_res = ARRAY_SIZE(pci1_resources),
+ .dma_mask = DMA_BIT_MASK(32),
+};
+
+static void __init lager_add_usb1_device(void)
+{
+ platform_device_register_full(&pci1_info);
+}
+
+/* Internal PCI2 */
+static const struct resource pci2_resources[] __initconst = {
+ DEFINE_RES_MEM(0xee0d0000, 0x10000), /* CFG */
+ DEFINE_RES_MEM(0xee0c0000, 0x10000), /* MEM */
+ DEFINE_RES_IRQ(gic_spi(113)),
+};
+
+static const struct platform_device_info pci2_info __initconst = {
+ .parent = &platform_bus,
+ .name = "pci-rcar-gen2",
+ .id = 2,
+ .res = pci2_resources,
+ .num_res = ARRAY_SIZE(pci2_resources),
+ .dma_mask = DMA_BIT_MASK(32),
+};
+
+static void __init lager_add_usb2_device(void)
+{
+ platform_device_register_full(&pci2_info);
+}
+
static const struct pinctrl_map lager_pinctrl_map[] = {
/* DU (CN10: ARGB0, CN13: LVDS) */
PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
@@ -716,6 +758,12 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
/* USB0 */
PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790",
"usb0_ovc_vbus", "usb0"),
+ /* USB1 */
+ PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.1", "pfc-r8a7790",
+ "usb1", "usb1"),
+ /* USB2 */
+ PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.2", "pfc-r8a7790",
+ "usb2", "usb2"),
};
static void __init lager_add_standard_devices(void)
@@ -776,6 +824,8 @@ static void __init lager_add_standard_devices(void)
&usbhs_phy_pdata,
sizeof(usbhs_phy_pdata));
lager_register_usbhs();
+ lager_add_usb1_device();
+ lager_add_usb2_device();
lager_add_rsnd_device();