[PATCH v2 18/23] ARM: OMAP3: overo: Adapt to ehci-omap changes
Roger Quadros
rogerq at ti.com
Sat Mar 16 02:16:39 EST 2013
Add platform device for 'nop-usb-xceiv'. This will be used as a
PHY for HS USB Port 2, so provide binding information for it.
Use usbhs_init_phys() to register the PHY's RESET regulator.
Signed-off-by: Roger Quadros <rogerq at ti.com>
---
arch/arm/mach-omap2/board-overo.c | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 86bab51..024cc25 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -31,6 +31,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/spi/spi.h>
+#include <linux/usb/phy.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
@@ -458,14 +459,27 @@ static int __init overo_spi_init(void)
return 0;
}
+/* PHY device on HS USB Port 2 i.e. nop_usb_xceiv.2 */
+static struct platform_device hsusb2_phy_device = {
+ .name = "nop_usb_xceiv",
+ .id = 2,
+};
+
+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = OVERO_GPIO_USBH_NRESET,
+ .vcc_gpio = -EINVAL,
+ .phy_id = "nop_usb_xceiv.2",
+ },
+};
+
+static struct platform_device *overo_devices[] __initdata = {
+ &hsusb2_phy_device,
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
- .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
- .phy_reset = true,
- .reset_gpio_port[0] = -EINVAL,
- .reset_gpio_port[1] = OVERO_GPIO_USBH_NRESET,
- .reset_gpio_port[2] = -EINVAL
};
#ifdef CONFIG_OMAP_MUX
@@ -502,6 +516,12 @@ static void __init overo_init(void)
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
+
+ platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
+ /* PHY on HSUSB Port 2 i.e. index 1 */
+ usb_bind_phy("ehci-omap.0", 1, "nop_usb_xceiv.2");
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
overo_spi_init();
overo_init_smsc911x();
--
1.7.4.1
More information about the devicetree-discuss
mailing list