2013-03-20 15:45:22

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

Hi Tony,

These patches provide the SoC side code required to support
the changes in the OMAP USB Host drivers done in [1], [2] & [3].

Device tree support is added for Beagleboard only. I've removed
Panda device tree support till we have resolved the AUXCLK issue.

NOTE: The first patch needs to be shared between the
OMAP tree and Felipe's USB tree.

v4:
- Some more cleanup to usbhs_init_phys(). Moved repeated code into
another helper function usbhs_add_regulator().
- Removed patch for Panda device tree support for USB host since
it is non functional.

v3:
- Moved more functionality into usbhs_init_phys().

v2:
- Added helper function usbhs_init_phys() that can be used by board files
to simplify adding of PHY regulators for USB host ports.

[1] MFD side changes to omap-usb-host and omap-usb-tll
https://lkml.org/lkml/2013/3/12/179
[2] USB EHCI side changes to ehci-omap
http://www.mail-archive.com/[email protected]/msg86265.html
[3] USB PHY driver changes
http://www.mail-archive.com/[email protected]/msg86293.html

The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9:

Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)

are available in the git repository at:
git://github.com/rogerq/linux.git usbhost-arm-next

Roger Quadros (21):
usb: phy: nop: Add some parameters to platform data
ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
ARM: OMAP3: Beagle: Adapt to ehci-omap changes
ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
ARM: OMAP: AM3517crane: Adapt to ehci-omap changes
ARM: OMAP: AM3517evm: Adapt to ehci-omap changes
ARM: OMAP3: cm-t35: Adapt to ehci-omap changes
ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
ARM: OMAP: devkit8000: Adapt to ehci-omap changes
ARM: OMAP3: igep0020: Adapt to ehci-omap changes
ARM: OMAP3: omap3evm: Adapt to ehci-omap changes
ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
ARM: OMAP3: overo: Adapt to ehci-omap changes
ARM: OMAP: zoom: Adapt to ehci-omap changes
ARM: dts: OMAP4: Add HS USB Host IP nodes
ARM: dts: OMAP3: Add HS USB Host IP nodes
ARM: dts: omap3-beagle: Add USB Host support

arch/arm/boot/dts/omap3-beagle.dts | 71 ++++++++++++
arch/arm/boot/dts/omap3.dtsi | 31 ++++++
arch/arm/boot/dts/omap4.dtsi | 30 +++++
arch/arm/mach-omap2/board-3430sdp.c | 21 +++-
arch/arm/mach-omap2/board-3630sdp.c | 21 +++-
arch/arm/mach-omap2/board-am3517crane.c | 24 ++---
arch/arm/mach-omap2/board-am3517evm.c | 17 ++--
arch/arm/mach-omap2/board-cm-t35.c | 20 +++-
arch/arm/mach-omap2/board-cm-t3517.c | 20 +++-
arch/arm/mach-omap2/board-devkit8000.c | 8 --
arch/arm/mach-omap2/board-igep0020.c | 32 +++---
arch/arm/mach-omap2/board-omap3beagle.c | 32 ++++--
arch/arm/mach-omap2/board-omap3evm.c | 25 +++--
arch/arm/mach-omap2/board-omap3pandora.c | 21 ++--
arch/arm/mach-omap2/board-omap3stalker.c | 17 ++--
arch/arm/mach-omap2/board-omap3touchbook.c | 17 ++--
arch/arm/mach-omap2/board-omap4panda.c | 55 ++++------
arch/arm/mach-omap2/board-overo.c | 16 ++-
arch/arm/mach-omap2/board-zoom.c | 16 ++-
arch/arm/mach-omap2/usb-host.c | 160 +++++++++++++++++++++++++++-
arch/arm/mach-omap2/usb.h | 9 ++
include/linux/usb/nop-usb-xceiv.h | 5 +
22 files changed, 508 insertions(+), 160 deletions(-)

--
1.7.4.1


2013-03-20 15:45:25

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 04/21] ARM: OMAP3: Beagle: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap3beagle.c | 32 +++++++++++++++++++++---------
1 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index c3558f9..5382215 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,6 +33,7 @@
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
#include <linux/usb/phy.h>
+#include <linux/usb/nop-usb-xceiv.h>

#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -277,6 +278,21 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {

static struct gpio_led gpio_leds[];

+/* PHY's VCC regulator might be added later, so flag that we need it */
+static struct nop_usb_xceiv_platform_data hsusb2_phy_data = {
+ .needs_vcc = true,
+};
+
+static struct usbhs_phy_data phy_data[] = {
+ {
+ .port = 2,
+ .reset_gpio = 147,
+ .vcc_gpio = -1, /* updated in beagle_twl_gpio_setup */
+ .vcc_polarity = 1, /* updated in beagle_twl_gpio_setup */
+ .platform_data = &hsusb2_phy_data,
+ },
+};
+
static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
@@ -318,9 +334,11 @@ static int beagle_twl_gpio_setup(struct device *dev,
}
dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio;

- gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
- "nEN_USB_PWR");
+ /* TWL4030_GPIO_MAX i.e. LED_GPO controls HS USB Port 2 power */
+ phy_data[0].vcc_gpio = gpio + TWL4030_GPIO_MAX;
+ phy_data[0].vcc_polarity = beagle_config.usb_pwr_level;

+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
return 0;
}

@@ -453,15 +471,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
};

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] = 147,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -543,7 +553,9 @@ static void __init omap3_beagle_init(void)

usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
+
usbhs_init(&usbhs_bdata);
+
board_nand_init(omap3beagle_nand_partitions,
ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS,
NAND_BUSWIDTH_16, NULL);
--
1.7.4.1

2013-03-20 15:45:28

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 09/21] ARM: OMAP3: cm-t35: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-cm-t35.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index af2bb21..7fda3f5 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -419,15 +419,22 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */
};

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = OMAP_MAX_GPIO_LINES + 6,
+ .vcc_gpio = -EINVAL,
+ },
+ {
+ .port = 2,
+ .reset_gpio = OMAP_MAX_GPIO_LINES + 7,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = OMAP_MAX_GPIO_LINES + 6,
- .reset_gpio_port[1] = OMAP_MAX_GPIO_LINES + 7,
- .reset_gpio_port[2] = -EINVAL
};

static void __init cm_t35_init_usbh(void)
@@ -444,6 +451,7 @@ static void __init cm_t35_init_usbh(void)
msleep(1);
}

+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
}

--
1.7.4.1

2013-03-20 15:45:34

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 11/21] ARM: OMAP: devkit8000: Adapt to ehci-omap changes

Remove deprecated USBHS platform data.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-devkit8000.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 53056c3..42fbf1e 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -437,15 +437,7 @@ static struct platform_device *devkit8000_devices[] __initdata = {
};

static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = -EINVAL,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
--
1.7.4.1

2013-03-20 15:45:44

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 17/21] ARM: OMAP3: overo: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-overo.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 86bab51..ab79a44 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -458,14 +458,16 @@ static int __init overo_spi_init(void)
return 0;
}

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = OVERO_GPIO_USBH_NRESET,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
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 +504,8 @@ 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);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
overo_spi_init();
overo_init_smsc911x();
--
1.7.4.1

2013-03-20 15:45:39

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 14/21] ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap3pandora.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 2bba362..1004d2a 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -346,7 +346,7 @@ static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
};

static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
- REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+ REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"), /* hsusb port 2 */
};

/* ads7846 on SPI and 2 nub controllers on I2C */
@@ -561,6 +561,14 @@ fail:
printk(KERN_ERR "wl1251 board initialisation failed\n");
}

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = 16,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct platform_device *omap3pandora_devices[] __initdata = {
&pandora_leds_gpio,
&pandora_keys_gpio,
@@ -569,15 +577,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
};

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] = 16,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -601,7 +601,10 @@ static void __init omap3pandora_init(void)
spi_register_board_info(omap3pandora_spi_board_info,
ARRAY_SIZE(omap3pandora_spi_board_info));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
+
usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
gpmc_nand_init(&pandora_nand_data, NULL);
--
1.7.4.1

2013-03-20 15:45:50

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 18/21] ARM: OMAP: zoom: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-zoom.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 5e4d4c9..1a3dd86 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -92,14 +92,16 @@ static struct mtd_partition zoom_nand_partitions[] = {
},
};

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = ZOOM3_EHCI_RESET_GPIO,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
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] = ZOOM3_EHCI_RESET_GPIO,
- .reset_gpio_port[2] = -EINVAL,
};

static void __init omap_zoom_init(void)
@@ -109,6 +111,8 @@ static void __init omap_zoom_init(void)
} else if (machine_is_omap_zoom3()) {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
}

--
1.7.4.1

2013-03-20 15:45:53

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 21/21] ARM: dts: omap3-beagle: Add USB Host support

Provide RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.

Also provide pin multiplexer information for USB host
pins.

CC: Benoît Cousson <[email protected]>
Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/boot/dts/omap3-beagle.dts | 71 ++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index f624dc8..02d23f1 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -38,6 +38,57 @@
};
};

+ /* HS USB Port 2 RESET */
+ hsusb2_reset: hsusb2_reset_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "hsusb2_reset";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio5 19 0>; /* gpio_147 */
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ /* HS USB Port 2 Power */
+ hsusb2_power: hsusb2_power_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "hsusb2_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&twl_gpio 18 0>; /* GPIO LEDA */
+ startup-delay-us = <70000>;
+ };
+
+ /* HS USB Host PHY on PORT 2 */
+ hsusb2_phy: hsusb2_phy {
+ compatible = "usb-nop-xceiv";
+ reset-supply = <&hsusb2_reset>;
+ vcc-supply = <&hsusb2_power>;
+ };
+};
+
+&omap3_pmx_core {
+ pinctrl-names = "default";
+ pinctrl-0 = <
+ &hsusbb2_pins
+ >;
+
+ hsusbb2_pins: pinmux_hsusbb2_pins {
+ pinctrl-single,pins = <
+ 0x5c0 0x3 /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_clk OUTPUT */
+ 0x5c2 0x3 /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_stp OUTPUT */
+ 0x5c4 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dir INPUT | PULLDOWN */
+ 0x5c6 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_nxt INPUT | PULLDOWN */
+ 0x5c8 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat0 INPUT | PULLDOWN */
+ 0x5cA 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat1 INPUT | PULLDOWN */
+ 0x1a4 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat2 INPUT | PULLDOWN */
+ 0x1a6 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat3 INPUT | PULLDOWN */
+ 0x1a8 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat4 INPUT | PULLDOWN */
+ 0x1aa 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat5 INPUT | PULLDOWN */
+ 0x1ac 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat6 INPUT | PULLDOWN */
+ 0x1ae 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat7 INPUT | PULLDOWN */
+ >;
+ };
};

&i2c1 {
@@ -65,3 +116,23 @@
&mmc3 {
status = "disabled";
};
+
+&usbhshost {
+ port2-mode = "ehci-phy";
+};
+
+&usbhsehci {
+ phys = <0 &hsusb2_phy>;
+};
+
+&twl_gpio {
+ ti,use-leds;
+ /* pullups: BIT(1) */
+ ti,pullups = <0x000002>;
+ /*
+ * pulldowns:
+ * BIT(2), BIT(6), BIT(7), BIT(8), BIT(13)
+ * BIT(15), BIT(16), BIT(17)
+ */
+ ti,pulldowns = <0x03a1c4>;
+};
--
1.7.4.1

2013-03-20 15:46:09

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 19/21] ARM: dts: OMAP4: Add HS USB Host IP nodes

Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson <[email protected]>
Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/boot/dts/omap4.dtsi | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 739bb79..b7db1a2 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -529,5 +529,35 @@
ti,hwmods = "timer11";
ti,timer-pwm;
};
+
+ usbhstll: usbhstll@4a062000 {
+ compatible = "ti,usbhs-tll";
+ reg = <0x4a062000 0x1000>;
+ interrupts = <0 78 0x4>;
+ ti,hwmods = "usb_tll_hs";
+ };
+
+ usbhshost: usbhshost@4a064000 {
+ compatible = "ti,usbhs-host";
+ reg = <0x4a064000 0x800>;
+ ti,hwmods = "usb_host_hs";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ usbhsohci: ohci@4a064800 {
+ compatible = "ti,ohci-omap3", "usb-ohci";
+ reg = <0x4a064800 0x400>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 76 0x4>;
+ };
+
+ usbhsehci: ehci@4a064c00 {
+ compatible = "ti,ehci-omap", "usb-ehci";
+ reg = <0x4a064c00 0x400>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 77 0x4>;
+ };
+ };
};
};
--
1.7.4.1

2013-03-20 15:45:59

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 20/21] ARM: dts: OMAP3: Add HS USB Host IP nodes

Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson <[email protected]>
Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/boot/dts/omap3.dtsi | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 1acc261..a14f74b 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -397,5 +397,36 @@
ti,timer-alwon;
ti,timer-secure;
};
+
+ usbhstll: usbhstll@48062000 {
+ compatible = "ti,usbhs-tll";
+ reg = <0x48062000 0x1000>;
+ interrupts = <78>;
+ ti,hwmods = "usb_tll_hs";
+ };
+
+ usbhshost: usbhshost@48064000 {
+ compatible = "ti,usbhs-host";
+ reg = <0x48064000 0x400>;
+ ti,hwmods = "usb_host_hs";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ usbhsohci: ohci@48064400 {
+ compatible = "ti,ohci-omap3", "usb-ohci";
+ reg = <0x48064400 0x400>;
+ interrupt-parent = <&intc>;
+ interrupts = <76>;
+ };
+
+ usbhsehci: ehci@48064800 {
+ compatible = "ti,ehci-omap", "usb-ehci";
+ reg = <0x48064800 0x400>;
+ interrupt-parent = <&intc>;
+ interrupts = <77>;
+ };
+ };
+
};
};
--
1.7.4.1

2013-03-20 15:46:20

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 02/21] ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()

This helper allows board support code to add the PHY's
VCC and RESET regulators which are GPIO controlled as well
as the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/usb-host.c | 160 +++++++++++++++++++++++++++++++++++++++-
arch/arm/mach-omap2/usb.h | 9 ++
2 files changed, 167 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 5706bdc..aa27d7f 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -22,8 +22,12 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
-
-#include <asm/io.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/string.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/usb/phy.h>

#include "soc.h"
#include "omap_device.h"
@@ -526,3 +530,155 @@ void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
}

#endif
+
+/* Template for PHY regulators */
+static struct fixed_voltage_config hsusb_reg_config = {
+ /* .supply_name filled later */
+ .microvolts = 3300000,
+ .gpio = -1, /* updated later */
+ .startup_delay = 70000, /* 70msec */
+ .enable_high = 1, /* updated later */
+ .enabled_at_boot = 0, /* keep in RESET */
+ /* .init_data filled later */
+};
+
+static const char *nop_name = "nop_usb_xceiv"; /* NOP PHY driver */
+static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */
+
+/**
+ * usbhs_add_regulator - Add a gpio based fixed voltage regulator device
+ * @name: name for the regulator
+ * @dev_id: device id of the device this regulator supplies power to
+ * @dev_supply: supply name that the device expects
+ * @gpio: GPIO number
+ * @polarity: 1 - Active high, 0 - Active low
+ */
+static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
+ int gpio, int polarity)
+{
+ struct regulator_consumer_supply *supplies;
+ struct regulator_init_data *reg_data;
+ struct fixed_voltage_config *config;
+ struct platform_device *pdev;
+ int ret;
+
+ supplies = kzalloc(sizeof(*supplies), GFP_KERNEL);
+ if (!supplies)
+ return -ENOMEM;
+
+ supplies->supply = dev_supply;
+ supplies->dev_name = dev_id;
+
+ reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL);
+ if (!reg_data)
+ return -ENOMEM;
+
+ reg_data->constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
+ reg_data->consumer_supplies = supplies;
+ reg_data->num_consumer_supplies = 1;
+
+ config = kmemdup(&hsusb_reg_config, sizeof(hsusb_reg_config),
+ GFP_KERNEL);
+ if (!config)
+ return -ENOMEM;
+
+ config->supply_name = name;
+ config->gpio = gpio;
+ config->enable_high = polarity;
+ config->init_data = reg_data;
+
+ /* create a regulator device */
+ pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
+ if (!pdev)
+ return -ENOMEM;
+
+ pdev->id = PLATFORM_DEVID_AUTO;
+ pdev->name = reg_name;
+ pdev->dev.platform_data = config;
+
+ ret = platform_device_register(pdev);
+ if (ret)
+ pr_err("%s: Failed registering regulator %s for %s\n",
+ __func__, name, dev_id);
+
+ return ret;
+}
+
+int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
+{
+ char *rail_name;
+ int i, len;
+ struct platform_device *pdev;
+ char *phy_id;
+
+ /* the phy_id will be something like "nop_usb_xceiv.1" */
+ len = strlen(nop_name) + 3; /* 3 -> ".1" and NULL terminator */
+
+ for (i = 0; i < num_phys; i++) {
+
+ if (!phy->port) {
+ pr_err("%s: Invalid port 0. Must start from 1\n",
+ __func__);
+ continue;
+ }
+
+ /* do we need a NOP PHY device ? */
+ if (!gpio_is_valid(phy->reset_gpio) &&
+ !gpio_is_valid(phy->vcc_gpio))
+ continue;
+
+ /* create a NOP PHY device */
+ pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
+ if (!pdev)
+ return -ENOMEM;
+
+ pdev->id = phy->port;
+ pdev->name = nop_name;
+ pdev->dev.platform_data = phy->platform_data;
+
+ phy_id = kmalloc(len, GFP_KERNEL);
+ if (!phy_id)
+ return -ENOMEM;
+
+ scnprintf(phy_id, len, "nop_usb_xceiv.%d\n",
+ pdev->id);
+
+ if (platform_device_register(pdev)) {
+ pr_err("%s: Failed to register device %s\n",
+ __func__, phy_id);
+ continue;
+ }
+
+ usb_bind_phy("ehci-omap.0", phy->port - 1, phy_id);
+
+ /* Do we need RESET regulator ? */
+ if (gpio_is_valid(phy->reset_gpio)) {
+
+ rail_name = kmalloc(13, GFP_KERNEL);
+ if (!rail_name)
+ return -ENOMEM;
+
+ scnprintf(rail_name, 13, "hsusb%d_reset", phy->port);
+
+ usbhs_add_regulator(rail_name, phy_id, "reset",
+ phy->reset_gpio, 1);
+ }
+
+ /* Do we need VCC regulator ? */
+ if (gpio_is_valid(phy->vcc_gpio)) {
+
+ rail_name = kmalloc(13, GFP_KERNEL);
+ if (!rail_name)
+ return -ENOMEM;
+
+ scnprintf(rail_name, 13, "hsusb%d_vcc", phy->port);
+
+ usbhs_add_regulator(rail_name, phy_id, "vcc",
+ phy->vcc_gpio, phy->vcc_polarity);
+ }
+
+ phy++;
+ }
+
+ return 0;
+}
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h
index 3319f5c..e7261eb 100644
--- a/arch/arm/mach-omap2/usb.h
+++ b/arch/arm/mach-omap2/usb.h
@@ -53,8 +53,17 @@
#define USBPHY_OTGSESSEND_EN (1 << 20)
#define USBPHY_DATA_POLARITY (1 << 23)

+struct usbhs_phy_data {
+ int port; /* 1 indexed port number */
+ int reset_gpio;
+ int vcc_gpio;
+ bool vcc_polarity; /* 1 active high, 0 active low */
+ void *platform_data;
+};
+
extern void usb_musb_init(struct omap_musb_board_data *board_data);
extern void usbhs_init(struct usbhs_omap_platform_data *pdata);
+extern int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys);

extern void am35x_musb_reset(void);
extern void am35x_musb_phy_power(u8 on);
--
1.7.4.1

2013-03-20 15:45:48

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 06/21] ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-3630sdp.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 67447bd..20d6d81 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -53,16 +53,23 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = 126,
+ .vcc_gpio = -EINVAL,
+ },
+ {
+ .port = 2,
+ .reset_gpio = 61,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {

.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = 126,
- .reset_gpio_port[1] = 61,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -199,6 +206,8 @@ static void __init omap_sdp_init(void)
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
enable_board_wakeup_source();
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
}

--
1.7.4.1

2013-03-20 15:45:43

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 15/21] ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap3stalker.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 95c10b3..bf09564 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -358,19 +358,20 @@ static int __init omap3_stalker_i2c_init(void)

#define OMAP3_STALKER_TS_GPIO 175

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = 21,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct platform_device *omap3_stalker_devices[] __initdata = {
&keys_gpio,
};

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] = 21,
- .reset_gpio_port[2] = -EINVAL,
};

#ifdef CONFIG_OMAP_MUX
@@ -407,6 +408,8 @@ static void __init omap3_stalker_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);

--
1.7.4.1

2013-03-20 15:48:04

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 16/21] ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap3touchbook.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index bcd44fb..7da48bc 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -305,21 +305,22 @@ static struct omap_board_mux board_mux[] __initdata = {
};
#endif

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = 147,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct platform_device *omap3_touchbook_devices[] __initdata = {
&leds_gpio,
&keys_gpio,
};

static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.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] = 147,
- .reset_gpio_port[2] = -EINVAL
};

static void omap3_touchbook_poweroff(void)
@@ -368,6 +369,8 @@ static void __init omap3_touchbook_init(void)
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
board_nand_init(omap3touchbook_nand_partitions,
ARRAY_SIZE(omap3touchbook_nand_partitions), NAND_CS,
--
1.7.4.1

2013-03-20 15:48:56

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 12/21] ARM: OMAP3: igep0020: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-igep0020.c | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index bf92678..95ccec0 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -527,26 +527,28 @@ static void __init igep_i2c_init(void)
omap3_pmic_init("twl4030", &igep_twldata);
}

+static struct usbhs_phy_data igep2_phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = IGEP2_GPIO_USBH_NRESET,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
+static struct usbhs_phy_data igep3_phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = IGEP3_GPIO_USBH_NRESET,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL,
};

static struct usbhs_omap_platform_data igep3_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] = IGEP3_GPIO_USBH_NRESET,
- .reset_gpio_port[2] = -EINVAL,
};

#ifdef CONFIG_OMAP_MUX
@@ -642,8 +644,10 @@ static void __init igep_init(void)
if (machine_is_igep0020()) {
omap_display_init(&igep2_dss_data);
igep2_init_smsc911x();
+ usbhs_init_phys(igep2_phy_data, ARRAY_SIZE(igep2_phy_data));
usbhs_init(&igep2_usbhs_bdata);
} else {
+ usbhs_init_phys(igep3_phy_data, ARRAY_SIZE(igep3_phy_data));
usbhs_init(&igep3_usbhs_bdata);
}
}
--
1.7.4.1

2013-03-20 15:49:17

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 13/21] ARM: OMAP3: omap3evm: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap3evm.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 48789e0..2de92fa 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -496,7 +496,7 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"), /* OMAP ISP */
REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"), /* OMAP ISP */
- REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+ REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"), /* hsusb port 2 */
REGULATOR_SUPPLY("vaux2", NULL),
};

@@ -539,17 +539,16 @@ static int __init omap3_evm_i2c_init(void)
return 0;
}

-static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 2,
+ .reset_gpio = -1, /* set at runtime */
+ .vcc_gpio = -EINVAL,
+ },
+};

- .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- /* PHY reset GPIO will be runtime programmed based on EVM version */
- .reset_gpio_port[0] = -EINVAL,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -725,7 +724,7 @@ static void __init omap3_evm_init(void)

/* setup EHCI phy reset config */
omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
- usbhs_bdata.reset_gpio_port[1] = 21;
+ phy_data[0].reset_gpio = 21;

/* EVM REV >= E can supply 500mA with EXTVBUS programming */
musb_board_data.power = 500;
@@ -733,10 +732,12 @@ static void __init omap3_evm_init(void)
} else {
/* setup EHCI phy reset on MDC */
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
- usbhs_bdata.reset_gpio_port[1] = 135;
+ phy_data[0].reset_gpio = 135;
}
usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
board_nand_init(omap3evm_nand_partitions,
ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS,
--
1.7.4.1

2013-03-20 15:49:44

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 10/21] ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-cm-t3517.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index a66da80..6920f6cf 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -188,15 +188,22 @@ static inline void cm_t3517_init_rtc(void) {}
#define HSUSB2_RESET_GPIO (147)
#define USB_HUB_RESET_GPIO (152)

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = HSUSB1_RESET_GPIO,
+ .vcc_gpio = -EINVAL,
+ },
+ {
+ .port = 2,
+ .reset_gpio = HSUSB2_RESET_GPIO,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data cm_t3517_ehci_pdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = HSUSB1_RESET_GPIO,
- .reset_gpio_port[1] = HSUSB2_RESET_GPIO,
- .reset_gpio_port[2] = -EINVAL,
};

static int __init cm_t3517_init_usbh(void)
@@ -213,6 +220,7 @@ static int __init cm_t3517_init_usbh(void)
msleep(1);
}

+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&cm_t3517_ehci_pdata);

return 0;
--
1.7.4.1

2013-03-20 15:45:26

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 05/21] ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-3430sdp.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index ce812de..7eb9651 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -445,16 +445,23 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = 57,
+ .vcc_gpio = -EINVAL,
+ },
+ {
+ .port = 2,
+ .reset_gpio = 61,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {

.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = 57,
- .reset_gpio_port[1] = 61,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -606,6 +613,8 @@ static void __init omap_3430sdp_init(void)
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
sdp3430_display_init();
enable_board_wakeup_source();
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
}

--
1.7.4.1

2013-03-20 15:50:48

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 08/21] ARM: OMAP: AM3517evm: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-am3517evm.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 9fb8590..191f976 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -274,6 +274,14 @@ static __init void am3517_evm_mcbsp1_init(void)
omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);
}

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = 57,
+ .vcc_gpio = -EINVAL,
+ },
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
@@ -282,12 +290,6 @@ static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
#else
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
#endif
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = 57,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL
};

#ifdef CONFIG_OMAP_MUX
@@ -349,7 +351,6 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */
};

-
static void __init am3517_evm_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -361,6 +362,8 @@ static void __init am3517_evm_init(void)

/* Configure GPIO for EHCI port */
omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
+
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
/* DSS */
--
1.7.4.1

2013-03-20 15:51:22

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 07/21] ARM: OMAP: AM3517crane: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-am3517crane.c | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 7d3358b..fc53911 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -47,15 +47,17 @@ static struct omap_board_mux board_mux[] __initdata = {
};
#endif

+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = GPIO_USB_NRESET,
+ .vcc_gpio = GPIO_USB_POWER,
+ .vcc_polarity = 1,
+ },
+};
+
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- .phy_reset = true,
- .reset_gpio_port[0] = GPIO_USB_NRESET,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL
};

static struct mtd_partition crane_nand_partitions[] = {
@@ -131,13 +133,7 @@ static void __init am3517_crane_init(void)
return;
}

- ret = gpio_request_one(GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "usb_ehci_enable");
- if (ret < 0) {
- pr_err("Can not request GPIO %d\n", GPIO_USB_POWER);
- return;
- }
-
+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
}
--
1.7.4.1

2013-03-20 15:45:17

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 03/21] ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Get rid of managing the PHY clock as it will be done by the PHY driver.
For that to work we create a clock alias that links the PHY clock name
to the PHY device name.

Signed-off-by: Roger Quadros <[email protected]>
---
arch/arm/mach-omap2/board-omap4panda.c | 55 ++++++++++++-------------------
1 files changed, 21 insertions(+), 34 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b02c2f0..a71ad34 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -31,6 +31,7 @@
#include <linux/ti_wilink_st.h>
#include <linux/usb/musb.h>
#include <linux/usb/phy.h>
+#include <linux/usb/nop-usb-xceiv.h>
#include <linux/wl12xx.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/omap-abe-twl6040.h>
@@ -132,6 +133,22 @@ static struct platform_device btwilink_device = {
.id = -1,
};

+/* PHY device on HS USB Port 1 i.e. nop_usb_xceiv.1 */
+static struct nop_usb_xceiv_platform_data hsusb1_phy_data = {
+ /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
+ .clk_rate = 19200000,
+};
+
+static struct usbhs_phy_data phy_data[] __initdata = {
+ {
+ .port = 1,
+ .reset_gpio = GPIO_HUB_NRESET,
+ .vcc_gpio = GPIO_HUB_POWER,
+ .vcc_polarity = 1,
+ .platform_data = &hsusb1_phy_data,
+ },
+};
+
static struct platform_device *panda_devices[] __initdata = {
&leds_gpio,
&wl1271_device,
@@ -142,49 +159,19 @@ static struct platform_device *panda_devices[] __initdata = {

static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
- .phy_reset = false,
- .reset_gpio_port[0] = -EINVAL,
- .reset_gpio_port[1] = -EINVAL,
- .reset_gpio_port[2] = -EINVAL
-};
-
-static struct gpio panda_ehci_gpios[] __initdata = {
- { GPIO_HUB_POWER, GPIOF_OUT_INIT_LOW, "hub_power" },
- { GPIO_HUB_NRESET, GPIOF_OUT_INIT_LOW, "hub_nreset" },
};

static void __init omap4_ehci_init(void)
{
int ret;
- struct clk *phy_ref_clk;

/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
- phy_ref_clk = clk_get(NULL, "auxclk3_ck");
- if (IS_ERR(phy_ref_clk)) {
- pr_err("Cannot request auxclk3\n");
- return;
- }
- clk_set_rate(phy_ref_clk, 19200000);
- clk_prepare_enable(phy_ref_clk);
-
- /* disable the power to the usb hub prior to init and reset phy+hub */
- ret = gpio_request_array(panda_ehci_gpios,
- ARRAY_SIZE(panda_ehci_gpios));
- if (ret) {
- pr_err("Unable to initialize EHCI power/reset\n");
- return;
- }
-
- gpio_export(GPIO_HUB_POWER, 0);
- gpio_export(GPIO_HUB_NRESET, 0);
- gpio_set_value(GPIO_HUB_NRESET, 1);
+ ret = clk_add_alias("main_clk", "nop_usb_xceiv.1", "auxclk3_ck", NULL);
+ if (ret)
+ pr_err("Failed to add main_clk alias to auxclk3_ck\n");

+ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(&usbhs_bdata);
-
- /* enable power to hub */
- gpio_set_value(GPIO_HUB_POWER, 1);
}

static struct omap_musb_board_data musb_board_data = {
--
1.7.4.1

2013-03-20 15:45:14

by Roger Quadros

[permalink] [raw]
Subject: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

Add clk_rate parameter to platform data. If supplied, the
NOP phy driver will program the clock to that rate during probe.

Also add 2 flags, needs_vcc and needs_reset.
If the flag is set and the regulator couldn't be found
then the driver will bail out with -EPROBE_DEFER.

Signed-off-by: Roger Quadros <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
---
include/linux/usb/nop-usb-xceiv.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h
index 28884c7..148d351 100644
--- a/include/linux/usb/nop-usb-xceiv.h
+++ b/include/linux/usb/nop-usb-xceiv.h
@@ -5,6 +5,11 @@

struct nop_usb_xceiv_platform_data {
enum usb_phy_type type;
+ unsigned long clk_rate;
+
+ /* if set fails with -EPROBE_DEFER if can't get regulator */
+ unsigned int needs_vcc:1;
+ unsigned int needs_reset:1;
};

#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
--
1.7.4.1

2013-03-20 15:56:16

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
> Add clk_rate parameter to platform data. If supplied, the
> NOP phy driver will program the clock to that rate during probe.
>
> Also add 2 flags, needs_vcc and needs_reset.
> If the flag is set and the regulator couldn't be found
> then the driver will bail out with -EPROBE_DEFER.
>
> Signed-off-by: Roger Quadros <[email protected]>
> Acked-by: Felipe Balbi <[email protected]>

Hi Tony,

maybe you might prefer to merge commit 1f0972f from my next branch which
is exactly this patch. Basically, if you:

$ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
$ git merge 1f0972f

you get $SUBJECT and can apply the others without fear of conflicts
later.

cheers

--
balbi


Attachments:
(No filename) (758.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-03-20 16:13:30

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

* Felipe Balbi <[email protected]> [130320 09:00]:
> On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
> > Add clk_rate parameter to platform data. If supplied, the
> > NOP phy driver will program the clock to that rate during probe.
> >
> > Also add 2 flags, needs_vcc and needs_reset.
> > If the flag is set and the regulator couldn't be found
> > then the driver will bail out with -EPROBE_DEFER.
> >
> > Signed-off-by: Roger Quadros <[email protected]>
> > Acked-by: Felipe Balbi <[email protected]>
>
> Hi Tony,
>
> maybe you might prefer to merge commit 1f0972f from my next branch which
> is exactly this patch. Basically, if you:
>
> $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
> $ git merge 1f0972f
>
> you get $SUBJECT and can apply the others without fear of conflicts
> later.

OK thanks will use commit 1f0972f, so let's consider that commit immutable.

Regards,

Tony

2013-03-20 16:20:10

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

On Wed, Mar 20, 2013 at 09:13:24AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <[email protected]> [130320 09:00]:
> > On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
> > > Add clk_rate parameter to platform data. If supplied, the
> > > NOP phy driver will program the clock to that rate during probe.
> > >
> > > Also add 2 flags, needs_vcc and needs_reset.
> > > If the flag is set and the regulator couldn't be found
> > > then the driver will bail out with -EPROBE_DEFER.
> > >
> > > Signed-off-by: Roger Quadros <[email protected]>
> > > Acked-by: Felipe Balbi <[email protected]>
> >
> > Hi Tony,
> >
> > maybe you might prefer to merge commit 1f0972f from my next branch which
> > is exactly this patch. Basically, if you:
> >
> > $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
> > $ git merge 1f0972f
> >
> > you get $SUBJECT and can apply the others without fear of conflicts
> > later.
>
> OK thanks will use commit 1f0972f, so let's consider that commit immutable.

yeah, once it hits my 'next' branch, I don't rebase anymore.

cheers

ps: that's valid for 'next' and 'fixes'

--
balbi


Attachments:
(No filename) (1.11 kB)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-04-02 17:21:36

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

* Felipe Balbi <[email protected]> [130320 09:24]:
> On Wed, Mar 20, 2013 at 09:13:24AM -0700, Tony Lindgren wrote:
> > * Felipe Balbi <[email protected]> [130320 09:00]:
> > > On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
> > > > Add clk_rate parameter to platform data. If supplied, the
> > > > NOP phy driver will program the clock to that rate during probe.
> > > >
> > > > Also add 2 flags, needs_vcc and needs_reset.
> > > > If the flag is set and the regulator couldn't be found
> > > > then the driver will bail out with -EPROBE_DEFER.
> > > >
> > > > Signed-off-by: Roger Quadros <[email protected]>
> > > > Acked-by: Felipe Balbi <[email protected]>
> > >
> > > Hi Tony,
> > >
> > > maybe you might prefer to merge commit 1f0972f from my next branch which
> > > is exactly this patch. Basically, if you:
> > >
> > > $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
> > > $ git merge 1f0972f
> > >
> > > you get $SUBJECT and can apply the others without fear of conflicts
> > > later.
> >
> > OK thanks will use commit 1f0972f, so let's consider that commit immutable.
>
> yeah, once it hits my 'next' branch, I don't rebase anymore.

I've applied the board related patchs into omap-for-v3.10/usb that's based
on commit 1f0972f.

Regards,

Tony

2013-04-03 14:54:06

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

On 04/02/2013 08:21 PM, Tony Lindgren wrote:
> * Felipe Balbi <[email protected]> [130320 09:24]:
>> On Wed, Mar 20, 2013 at 09:13:24AM -0700, Tony Lindgren wrote:
>>> * Felipe Balbi <[email protected]> [130320 09:00]:
>>>> On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
>>>>> Add clk_rate parameter to platform data. If supplied, the
>>>>> NOP phy driver will program the clock to that rate during probe.
>>>>>
>>>>> Also add 2 flags, needs_vcc and needs_reset.
>>>>> If the flag is set and the regulator couldn't be found
>>>>> then the driver will bail out with -EPROBE_DEFER.
>>>>>
>>>>> Signed-off-by: Roger Quadros <[email protected]>
>>>>> Acked-by: Felipe Balbi <[email protected]>
>>>>
>>>> Hi Tony,
>>>>
>>>> maybe you might prefer to merge commit 1f0972f from my next branch which
>>>> is exactly this patch. Basically, if you:
>>>>
>>>> $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
>>>> $ git merge 1f0972f
>>>>
>>>> you get $SUBJECT and can apply the others without fear of conflicts
>>>> later.
>>>
>>> OK thanks will use commit 1f0972f, so let's consider that commit immutable.
>>
>> yeah, once it hits my 'next' branch, I don't rebase anymore.
>
> I've applied the board related patchs into omap-for-v3.10/usb that's based
> on commit 1f0972f.

Thanks Tony.

cheers,
-roger

2013-04-05 08:30:25

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

Hi Roger,

On 03/20/2013 04:44 PM, Roger Quadros wrote:
> Hi Tony,
>
> These patches provide the SoC side code required to support
> the changes in the OMAP USB Host drivers done in [1], [2] & [3].
>
> Device tree support is added for Beagleboard only. I've removed
> Panda device tree support till we have resolved the AUXCLK issue.
>
> NOTE: The first patch needs to be shared between the
> OMAP tree and Felipe's USB tree.
>
> v4:
> - Some more cleanup to usbhs_init_phys(). Moved repeated code into
> another helper function usbhs_add_regulator().
> - Removed patch for Panda device tree support for USB host since
> it is non functional.
>
> v3:
> - Moved more functionality into usbhs_init_phys().
>
> v2:
> - Added helper function usbhs_init_phys() that can be used by board files
> to simplify adding of PHY regulators for USB host ports.
>
> [1] MFD side changes to omap-usb-host and omap-usb-tll
> https://lkml.org/lkml/2013/3/12/179
> [2] USB EHCI side changes to ehci-omap
> http://www.mail-archive.com/[email protected]/msg86265.html
> [3] USB PHY driver changes
> http://www.mail-archive.com/[email protected]/msg86293.html
>
> The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9:
>
> Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)
>
> are available in the git repository at:
> git://github.com/rogerq/linux.git usbhost-arm-next
>
> Roger Quadros (21):
> usb: phy: nop: Add some parameters to platform data
> ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
> ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
> ARM: OMAP3: Beagle: Adapt to ehci-omap changes
> ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
> ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
> ARM: OMAP: AM3517crane: Adapt to ehci-omap changes
> ARM: OMAP: AM3517evm: Adapt to ehci-omap changes
> ARM: OMAP3: cm-t35: Adapt to ehci-omap changes
> ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
> ARM: OMAP: devkit8000: Adapt to ehci-omap changes
> ARM: OMAP3: igep0020: Adapt to ehci-omap changes
> ARM: OMAP3: omap3evm: Adapt to ehci-omap changes
> ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
> ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
> ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
> ARM: OMAP3: overo: Adapt to ehci-omap changes
> ARM: OMAP: zoom: Adapt to ehci-omap changes
> ARM: dts: OMAP4: Add HS USB Host IP nodes
> ARM: dts: OMAP3: Add HS USB Host IP nodes
> ARM: dts: omap3-beagle: Add USB Host support

These 3 DTS patches are good to me, but I cannot applied them on top of
the already existing patches I queued for 3.10.

git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
for_3.10/dts

Could you rebase these 3 ones only, and I will applied them.

Thanks,
Benoit

2013-04-05 09:56:09

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

Hi Roger,

On 04/05/2013 10:30 AM, Benoit Cousson wrote:

...

>> ARM: dts: OMAP4: Add HS USB Host IP nodes
>> ARM: dts: OMAP3: Add HS USB Host IP nodes
>> ARM: dts: omap3-beagle: Add USB Host support
>
> These 3 DTS patches are good to me, but I cannot applied them on top of
> the already existing patches I queued for 3.10.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
> for_3.10/dts
>
> Could you rebase these 3 ones only, and I will applied them.

Mmm, in fact, I've just seen the pull request from Tony :-(


Tony,

Don't you want to remove these DTS patches from the pull-request?

Otherwise, I will have to rebase the whole DTS series on top of yours.
That being said, if the branch is not supposed to be rebased, it is doable.

Thanks,
Benoit

2013-04-05 15:43:07

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

* Benoit Cousson <[email protected]> [130405 03:00]:
> On 04/05/2013 10:30 AM, Benoit Cousson wrote:
>
> ...
>
> >> ARM: dts: OMAP4: Add HS USB Host IP nodes
> >> ARM: dts: OMAP3: Add HS USB Host IP nodes
> >> ARM: dts: omap3-beagle: Add USB Host support
> >
> > These 3 DTS patches are good to me, but I cannot applied them on top of
> > the already existing patches I queued for 3.10.
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
> > for_3.10/dts
> >
> > Could you rebase these 3 ones only, and I will applied them.
>
> Mmm, in fact, I've just seen the pull request from Tony :-(
>
>
> Tony,
>
> Don't you want to remove these DTS patches from the pull-request?

Oops sorry :( Looks like I applied them mistakenly as I saved all
the patches into a mbox, then applied it. Anyways, too late to start
messing with it now.

> Otherwise, I will have to rebase the whole DTS series on top of yours.
> That being said, if the branch is not supposed to be rebased, it is doable.

I pulled in your for_3.10/dts for testing, and to me it looks like
it's just overlapping additions. So that should be OK to resolve while
pulling it in.

It seems there's no need to add omap-for-v3.10/usb as a dependency for
your for_3.10/dts unless the conflict gets non-trivial with some
additional patches.

Regards,

Tony

2013-04-08 12:06:51

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

Hi Tony,

On 04/05/2013 05:43 PM, Tony Lindgren wrote:
> * Benoit Cousson <[email protected]> [130405 03:00]:
>> On 04/05/2013 10:30 AM, Benoit Cousson wrote:
>>
>> ...
>>
>>>> ARM: dts: OMAP4: Add HS USB Host IP nodes
>>>> ARM: dts: OMAP3: Add HS USB Host IP nodes
>>>> ARM: dts: omap3-beagle: Add USB Host support
>>>
>>> These 3 DTS patches are good to me, but I cannot applied them on top of
>>> the already existing patches I queued for 3.10.
>>>
>>> git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
>>> for_3.10/dts
>>>
>>> Could you rebase these 3 ones only, and I will applied them.
>>
>> Mmm, in fact, I've just seen the pull request from Tony :-(
>>
>>
>> Tony,
>>
>> Don't you want to remove these DTS patches from the pull-request?
>
> Oops sorry :( Looks like I applied them mistakenly as I saved all
> the patches into a mbox, then applied it. Anyways, too late to start
> messing with it now.
>
>> Otherwise, I will have to rebase the whole DTS series on top of yours.
>> That being said, if the branch is not supposed to be rebased, it is doable.
>
> I pulled in your for_3.10/dts for testing, and to me it looks like
> it's just overlapping additions. So that should be OK to resolve while
> pulling it in.
>
> It seems there's no need to add omap-for-v3.10/usb as a dependency for
> your for_3.10/dts unless the conflict gets non-trivial with some
> additional patches.

The branch was not complete, with the latest additions, we do have
conflict due to the addition of several new nodes at the same place.

The resolution is not that hard since it is addition of node only, but
the rebase on to of omap-for-v3.10/usb will avoid the issue.

I have a new pre-merged branch available. for_3.10/dts_merged is based
on omap-for-v3.10/usb and Paul's omap-devel-b-for-3.10 branch to get the
AM33xx hwmod.
Paul's branch is just needed to avoid AM33xx regression introduced by
Santosh hwmod changes present in my branch.

Just let me know which one you will prefer to pull.

Regards,
Benoit

2013-04-08 17:09:19

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

* Benoit Cousson <[email protected]> [130408 05:11]:
> Hi Tony,
>
> On 04/05/2013 05:43 PM, Tony Lindgren wrote:
> > * Benoit Cousson <[email protected]> [130405 03:00]:
> >> On 04/05/2013 10:30 AM, Benoit Cousson wrote:
> >>
> >> ...
> >>
> >>>> ARM: dts: OMAP4: Add HS USB Host IP nodes
> >>>> ARM: dts: OMAP3: Add HS USB Host IP nodes
> >>>> ARM: dts: omap3-beagle: Add USB Host support
> >>>
> >>> These 3 DTS patches are good to me, but I cannot applied them on top of
> >>> the already existing patches I queued for 3.10.
> >>>
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
> >>> for_3.10/dts
> >>>
> >>> Could you rebase these 3 ones only, and I will applied them.
> >>
> >> Mmm, in fact, I've just seen the pull request from Tony :-(
> >>
> >>
> >> Tony,
> >>
> >> Don't you want to remove these DTS patches from the pull-request?
> >
> > Oops sorry :( Looks like I applied them mistakenly as I saved all
> > the patches into a mbox, then applied it. Anyways, too late to start
> > messing with it now.
> >
> >> Otherwise, I will have to rebase the whole DTS series on top of yours.
> >> That being said, if the branch is not supposed to be rebased, it is doable.
> >
> > I pulled in your for_3.10/dts for testing, and to me it looks like
> > it's just overlapping additions. So that should be OK to resolve while
> > pulling it in.
> >
> > It seems there's no need to add omap-for-v3.10/usb as a dependency for
> > your for_3.10/dts unless the conflict gets non-trivial with some
> > additional patches.
>
> The branch was not complete, with the latest additions, we do have
> conflict due to the addition of several new nodes at the same place.

OK

> The resolution is not that hard since it is addition of node only, but
> the rebase on to of omap-for-v3.10/usb will avoid the issue.
>
> I have a new pre-merged branch available. for_3.10/dts_merged is based
> on omap-for-v3.10/usb and Paul's omap-devel-b-for-3.10 branch to get the
> AM33xx hwmod.
> Paul's branch is just needed to avoid AM33xx regression introduced by
> Santosh hwmod changes present in my branch.
>
> Just let me know which one you will prefer to pull.

If the merge conflicts are non-trivial, then let's do the pre-merged
branch. That will be easier to test also in this case for am33xx.

Regards,

Tony