* [PATCH 0/5] usb: musb: am335x support
@ 2012-11-02 16:31 Afzal Mohammed
2012-11-02 16:32 ` [PATCH 1/5] usb: musb: dsps: remove platform callback Afzal Mohammed
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:31 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu, devicetree-discuss, linux-doc,
linux-usb, linux-omap
Hi Balbi,
This series adds usb support to am335x SoC's found on boards like
Beagle Bone. Here only first instance is supported, as currently
multiple phy's of same type is not supported (am335x has two USB2
phy's).
This series is based on your musb branch,
(HEAD - 2f77116 usb: musb: remove hand-crafted id handling)
and is made over my series,
(usb: musb: dsps: fixes for -rc)
and has been tested on Beagle Bone by ethernet gadget.
First two may qualify as -rc material, with these two it is actually
possible to get USB working assuming bootloader leaves phy enabled
and provides Kernel with DT blob.
Last one configures control module to enable bultin phy.
Proper solution is to make use of control module driver, but it is
not expected to be ready soon and this would block USB support for
am335x.
Here dsps wrapper driver is provided with control module register
physical address. Even though this a hack, there is no other option
left till control module driver is ready. As of now only am335x is
using dsps wrapper, and so driver is made aware of am335x control
module physical address.
Please note that this is a temporary arrangment till omap control
module driver is available.
Other options are providing control module register space as memory
resource via DT or using omap hwmod.
DT approach has been rejected by Rob Herring, while resources are
being moved from hwmod to DT. And both of the above approaches
require that control module registers be configured in wrapper driver
itself requring a quirk in driver as well as DT or hwmod.
Regards
Afzal
Afzal Mohammed (4):
usb: musb: dsps: remove platform callback
usb: musb: dsps: reduce musb instance to one
usb: musb: dsps: get resources by index
usb: musb: dsps: dt binding - add resources, example
Santhapuri, Damodar (1):
usb: musb: dsps: control module handling (quirk)
.../devicetree/bindings/usb/am33xx-usb.txt | 21 +++++
drivers/usb/musb/musb_dsps.c | 95 ++++++++++++++++------
2 files changed, 89 insertions(+), 27 deletions(-)
--
1.7.12
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] usb: musb: dsps: remove platform callback
2012-11-02 16:31 [PATCH 0/5] usb: musb: am335x support Afzal Mohammed
@ 2012-11-02 16:32 ` Afzal Mohammed
[not found] ` <cover.1351870620.git.afzal-l0cyMroinI0@public.gmane.org>
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:32 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu, devicetree-discuss, linux-doc,
linux-usb, linux-omap
dsps wrapper is dt only, it cannot execute platform callbacks.
Presence of this would cause NULL dereference, hence remove it.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
drivers/usb/musb/musb_dsps.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 625400f..2396bcd 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -365,11 +365,9 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)
static int dsps_musb_init(struct musb *musb)
{
struct device *dev = musb->controller;
- struct musb_hdrc_platform_data *plat = dev->platform_data;
struct platform_device *pdev = to_platform_device(dev);
struct dsps_glue *glue = dev_get_drvdata(dev->parent);
const struct dsps_musb_wrapper *wrp = glue->wrp;
- struct omap_musb_board_data *data = plat->board_data;
void __iomem *reg_base = musb->ctrl_base;
u32 rev, val;
int status;
@@ -395,10 +393,6 @@ static int dsps_musb_init(struct musb *musb)
/* Reset the musb */
dsps_writel(reg_base, wrp->control, (1 << wrp->reset));
- /* Start the on-chip PHY and its PLL. */
- if (data->set_phy_power)
- data->set_phy_power(1);
-
musb->isr = dsps_interrupt;
/* reset the otgdisable bit, needed for host mode to work */
@@ -419,17 +413,11 @@ err0:
static int dsps_musb_exit(struct musb *musb)
{
struct device *dev = musb->controller;
- struct musb_hdrc_platform_data *plat = dev->platform_data;
- struct omap_musb_board_data *data = plat->board_data;
struct platform_device *pdev = to_platform_device(dev);
struct dsps_glue *glue = dev_get_drvdata(dev->parent);
del_timer_sync(&glue->timer[pdev->id]);
- /* Shutdown the on-chip PHY and its PLL. */
- if (data->set_phy_power)
- data->set_phy_power(0);
-
/* NOP driver needs change if supporting dual instance */
usb_put_phy(musb->xceiv);
usb_nop_xceiv_unregister();
@@ -650,25 +638,11 @@ static int __devexit dsps_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int dsps_suspend(struct device *dev)
{
- struct musb_hdrc_platform_data *plat = dev->platform_data;
- struct omap_musb_board_data *data = plat->board_data;
-
- /* Shutdown the on-chip PHY and its PLL. */
- if (data->set_phy_power)
- data->set_phy_power(0);
-
return 0;
}
static int dsps_resume(struct device *dev)
{
- struct musb_hdrc_platform_data *plat = dev->platform_data;
- struct omap_musb_board_data *data = plat->board_data;
-
- /* Start the on-chip PHY and its PLL. */
- if (data->set_phy_power)
- data->set_phy_power(1);
-
return 0;
}
#endif
--
1.7.12
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] usb: musb: dsps: reduce musb instance to one
[not found] ` <cover.1351870620.git.afzal-l0cyMroinI0@public.gmane.org>
@ 2012-11-02 16:32 ` Afzal Mohammed
2012-11-02 16:32 ` [PATCH 3/5] usb: musb: dsps: get resources by index Afzal Mohammed
1 sibling, 0 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:32 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
Currently multiple phy's of the same type are not supported, hence
reduce musb instances to one. This helps in supporting at least one
instance of musb, rather than having none. Even without this, it was
observed that both instances were working (by luck), but this holds
good iff wrapper is part of Image. And it is not correct for both
controller's to be associated with same phy, here it was working
because phy is a nop one. And having wrapper as a module and
rmmod'ing would crash.
This can be reverted once multi phy support for same type is available
and driver is enhanced to make use of it.
Signed-off-by: Afzal Mohammed <afzal-l0cyMroinI0@public.gmane.org>
---
drivers/usb/musb/musb_dsps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 2396bcd..524c003 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -677,7 +677,7 @@ static const struct dsps_musb_wrapper ti81xx_driver_data __devinitconst = {
.rxep_bitmap = (0xfffe << 16),
.musb_core_offset = 0x400,
.poll_seconds = 2,
- .instances = 2,
+ .instances = 1,
};
static const struct platform_device_id musb_dsps_id_table[] __devinitconst = {
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] usb: musb: dsps: get resources by index
[not found] ` <cover.1351870620.git.afzal-l0cyMroinI0@public.gmane.org>
2012-11-02 16:32 ` [PATCH 2/5] usb: musb: dsps: reduce musb instance to one Afzal Mohammed
@ 2012-11-02 16:32 ` Afzal Mohammed
1 sibling, 0 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:32 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
dsps wrapper is now dt only. This requires that resources be obtained
using index and not name, modify accordingly.
Signed-off-by: Afzal Mohammed <afzal-l0cyMroinI0@public.gmane.org>
---
drivers/usb/musb/musb_dsps.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 524c003..c90e4d3 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -450,22 +450,20 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
char res_name[10];
int ret;
- /* get memory resource */
- sprintf(res_name, "musb%d", id);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
+ /* first resource is for usbss, so start index from 1 */
+ res = platform_get_resource(pdev, IORESOURCE_MEM, id + 1);
if (!res) {
- dev_err(dev, "%s get mem resource failed\n", res_name);
+ dev_err(dev, "failed to get memory for instance %d\n", id);
ret = -ENODEV;
goto err0;
}
res->parent = NULL;
resources[0] = *res;
- /* get irq resource */
- sprintf(res_name, "musb%d-irq", id);
- res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);
+ /* first resource is for usbss, so start index from 1 */
+ res = platform_get_resource(pdev, IORESOURCE_IRQ, id + 1);
if (!res) {
- dev_err(dev, "%s get irq resource failed\n", res_name);
+ dev_err(dev, "failed to get irq for instance %d\n", id);
ret = -ENODEV;
goto err0;
}
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example
2012-11-02 16:31 [PATCH 0/5] usb: musb: am335x support Afzal Mohammed
2012-11-02 16:32 ` [PATCH 1/5] usb: musb: dsps: remove platform callback Afzal Mohammed
[not found] ` <cover.1351870620.git.afzal-l0cyMroinI0@public.gmane.org>
@ 2012-11-02 16:32 ` Afzal Mohammed
2012-11-06 13:02 ` Felipe Balbi
2012-11-02 16:32 ` [PATCH 5/5] usb: musb: dsps: control module handling (quirk) Afzal Mohammed
2012-11-02 19:36 ` [PATCH 0/5] usb: musb: am335x support Daniel Mack
4 siblings, 1 reply; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:32 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu, devicetree-discuss, linux-doc,
linux-usb, linux-omap
OMAP2+ family of devices are now obtaining resources via DT, earlier
it was obtained from hwmod. Update binding document accrodingly, while
at it add example.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
.../devicetree/bindings/usb/am33xx-usb.txt | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
index a922505..6b7e3bd 100644
--- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
@@ -1,5 +1,7 @@
AM33XX MUSB GLUE
- compatible : Should be "ti,musb-am33xx"
+ - reg : offset and length of register sets, first usbss, then for musb instances
+ - interrupts : usbss, musb instance interrupts in order
- ti,hwmods : must be "usb_otg_hs"
- multipoint : Should be "1" indicating the musb controller supports
multipoint. This is a MUSB configuration-specific setting.
@@ -12,3 +14,22 @@ AM33XX MUSB GLUE
represents PERIPHERAL.
- power : Should be "250". This signifies the controller can supply upto
500mA when operating in host mode.
+
+Example:
+
+usb_otg_hs@47400000 {
+ compatible = "ti,musb-am33xx";
+ reg = <0x47400000 0x1000 /* usbss */
+ 0x47401000 0x800 /* musb instance 0 */
+ 0x47401800 0x800>; /* musb instance 1 */
+ interrupts = <17 /* usbss */
+ 18 /* musb instance 0 */
+ 19>; /* musb instance 1 */
+ multipoint = <1>;
+ num-eps = <16>;
+ ram-bits = <12>;
+ port0-mode = <3>;
+ port1-mode = <3>;
+ power = <250>;
+ ti,hwmods = "usb_otg_hs";
+};
--
1.7.12
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] usb: musb: dsps: control module handling (quirk)
2012-11-02 16:31 [PATCH 0/5] usb: musb: am335x support Afzal Mohammed
` (2 preceding siblings ...)
2012-11-02 16:32 ` [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example Afzal Mohammed
@ 2012-11-02 16:32 ` Afzal Mohammed
2012-11-02 19:36 ` [PATCH 0/5] usb: musb: am335x support Daniel Mack
4 siblings, 0 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-02 16:32 UTC (permalink / raw)
To: Felipe Balbi
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu, devicetree-discuss, linux-doc,
linux-usb, linux-omap
From: "Santhapuri, Damodar" <damodar.santhapuri@ti.com>
am335x uses nop transceiver driver and need to enable builtin phy
by writing into usb_ctrl register available in system control
module register space. This is being added at musb glue driver
layer until a separate system control module driver is available.
Proper solution is to make use of control module driver, but it is
not expected to be ready soon.
Other options available are providing control module register space
as memory resource via DT or using omap hwmod.
DT approach has been rejected by Rob Herring, while resources are
being moved from hwmod to DT. And both of the above approaches
require that control module registers be configured in wrapper
itself requring a quirk in driver as well as DT or hwmod.
Here another option is used, providing driver with control module
register physical address. Even though this a hack, there is no other
option left till control module driver is ready. As of now only
am335x is using dsps wrapper, and so driver is made aware of am335x
control module physical address.
Please note that this is a temporary arrangment till omap control
module driver is available.
[afzal@ti.com: limit quirk to dsps wrapper]
Signed-off-by: Santhapuri, Damodar <damodar.santhapuri@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
drivers/usb/musb/musb_dsps.c | 69 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index c90e4d3..e770f79 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -124,8 +124,44 @@ struct dsps_glue {
const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */
struct timer_list timer[2]; /* otg_workaround timer */
unsigned long last_timer[2]; /* last timer data for each instance */
+ u32 __iomem *usb_ctrl[2];
};
+#define DSPS_AM33XX_CONTROL_MODULE_PHYS_0 0x44e10620
+#define DSPS_AM33XX_CONTROL_MODULE_PHYS_1 0x44e10628
+
+static const resource_size_t dsps_control_module_phys[] = {
+ DSPS_AM33XX_CONTROL_MODULE_PHYS_0,
+ DSPS_AM33XX_CONTROL_MODULE_PHYS_1,
+};
+
+/**
+ * musb_dsps_phy_control - phy on/off
+ * @glue: struct dsps_glue *
+ * @id: musb instance
+ * @on: flag for phy to be switched on or off
+ *
+ * This is to enable the PHY using usb_ctrl register in system control
+ * module space.
+ *
+ * XXX: This function will be removed once we have a seperate driver for
+ * control module
+ */
+static void musb_dsps_phy_control(struct dsps_glue *glue, u8 id, u8 on)
+{
+ u32 usbphycfg;
+
+ usbphycfg = readl(glue->usb_ctrl[id]);
+
+ if (on) {
+ usbphycfg &= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN);
+ usbphycfg |= USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN;
+ } else {
+ usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN;
+ }
+
+ writel(usbphycfg, glue->usb_ctrl[id]);
+}
/**
* dsps_musb_enable - enable interrupts
*/
@@ -393,6 +429,9 @@ static int dsps_musb_init(struct musb *musb)
/* Reset the musb */
dsps_writel(reg_base, wrp->control, (1 << wrp->reset));
+ /* Start the on-chip PHY and its PLL. */
+ musb_dsps_phy_control(glue, pdev->id, 1);
+
musb->isr = dsps_interrupt;
/* reset the otgdisable bit, needed for host mode to work */
@@ -418,6 +457,9 @@ static int dsps_musb_exit(struct musb *musb)
del_timer_sync(&glue->timer[pdev->id]);
+ /* Shutdown the on-chip PHY and its PLL. */
+ musb_dsps_phy_control(glue, pdev->id, 0);
+
/* NOP driver needs change if supporting dual instance */
usb_put_phy(musb->xceiv);
usb_nop_xceiv_unregister();
@@ -450,6 +492,17 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
char res_name[10];
int ret;
+ resources[0].start = dsps_control_module_phys[id];
+ resources[0].end = resources[0].start + SZ_4 - 1;
+ resources[0].flags = IORESOURCE_MEM;
+
+ glue->usb_ctrl[id] = devm_request_and_ioremap(&pdev->dev, resources);
+ if (glue->usb_ctrl[id] == NULL) {
+ dev_err(dev, "Failed to obtain usb_ctrl%d memory\n", id);
+ ret = -ENODEV;
+ goto err0;
+ }
+
/* first resource is for usbss, so start index from 1 */
res = platform_get_resource(pdev, IORESOURCE_MEM, id + 1);
if (!res) {
@@ -636,11 +689,27 @@ static int __devexit dsps_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int dsps_suspend(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev->parent);
+ struct dsps_glue *glue = platform_get_drvdata(pdev);
+ const struct dsps_musb_wrapper *wrp = glue->wrp;
+ int i;
+
+ for (i = 0; i < wrp->instances; i++)
+ musb_dsps_phy_control(glue, i, 0);
+
return 0;
}
static int dsps_resume(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev->parent);
+ struct dsps_glue *glue = platform_get_drvdata(pdev);
+ const struct dsps_musb_wrapper *wrp = glue->wrp;
+ int i;
+
+ for (i = 0; i < wrp->instances; i++)
+ musb_dsps_phy_control(glue, i, 1);
+
return 0;
}
#endif
--
1.7.12
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/5] usb: musb: am335x support
2012-11-02 16:31 [PATCH 0/5] usb: musb: am335x support Afzal Mohammed
` (3 preceding siblings ...)
2012-11-02 16:32 ` [PATCH 5/5] usb: musb: dsps: control module handling (quirk) Afzal Mohammed
@ 2012-11-02 19:36 ` Daniel Mack
2012-11-03 2:40 ` B, Ravi
2012-11-03 7:33 ` Mohammed, Afzal
4 siblings, 2 replies; 11+ messages in thread
From: Daniel Mack @ 2012-11-02 19:36 UTC (permalink / raw)
To: Afzal Mohammed
Cc: Felipe Balbi, Greg Kroah-Hartman, Grant Likely, Rob Herring,
Rob Landley, Santhapuri Damodar, Ravi Babu, devicetree-discuss,
linux-doc, linux-usb, linux-omap
Hi Afzal,
On 02.11.2012 17:31, Afzal Mohammed wrote:
> This series adds usb support to am335x SoC's found on boards like
> Beagle Bone. Here only first instance is supported, as currently
> multiple phy's of same type is not supported (am335x has two USB2
> phy's).
I'm testing these patches with an AM33xx board that has the first musb
port wired to an USB type A plug, but it doesn't yet work for me.
The messages I'm getting are:
[ 1.219339] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.226568] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.233444] usbcore: registered new interface driver uas
[ 1.239066] Initializing USB Mass Storage driver...
[ 1.244395] usbcore: registered new interface driver usb-storage
[ 1.250732] USB Mass Storage support registered.
[ 1.255573] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 1.262671] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk
combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 1.262889] musb-hdrc: MHDRC RTL version 2.0
[ 1.262907] musb-hdrc: setup fifo_mode 4
[ 1.262940] musb-hdrc: 28/31 max ep, 16384/16384 memory
So there is no host interface registered. I'm unsure on how to fix this,
and I didn't get an answer yet to that question when I asked Felipe
about how interface drivers like dsps are supposed to act in order to
get host mode back after the recent musb cleanups.
What type of hardware do you test this with? Does host mode work for you?
Many thanks,
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 0/5] usb: musb: am335x support
2012-11-02 19:36 ` [PATCH 0/5] usb: musb: am335x support Daniel Mack
@ 2012-11-03 2:40 ` B, Ravi
2012-11-03 7:33 ` Mohammed, Afzal
1 sibling, 0 replies; 11+ messages in thread
From: B, Ravi @ 2012-11-03 2:40 UTC (permalink / raw)
To: Daniel Mack, Mohammed, Afzal
Cc: Balbi, Felipe, Greg Kroah-Hartman, Grant Likely, Rob Herring,
Rob Landley, Santhapuri, Damodar,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
>
> On 02.11.2012 17:31, Afzal Mohammed wrote:
> > This series adds usb support to am335x SoC's found on boards like
> > Beagle Bone. Here only first instance is supported, as currently
> > multiple phy's of same type is not supported (am335x has two USB2
> > phy's).
>
> I'm testing these patches with an AM33xx board that has the
> first musb port wired to an USB type A plug, but it doesn't
> yet work for me.
>
> The messages I'm getting are:
>
> [ 1.219339] ehci_hcd: USB 2.0 'Enhanced' Host Controller
> (EHCI) Driver
> [ 1.226568] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Why ehci, ohci has selected for am335xx platform?
> [ 1.233444] usbcore: registered new interface driver uas
> [ 1.239066] Initializing USB Mass Storage driver...
> [ 1.244395] usbcore: registered new interface driver usb-storage
> [ 1.250732] USB Mass Storage support registered.
> [ 1.255573] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
> [ 1.262671] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk
> combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
> [ 1.262889] musb-hdrc: MHDRC RTL version 2.0
> [ 1.262907] musb-hdrc: setup fifo_mode 4
> [ 1.262940] musb-hdrc: 28/31 max ep, 16384/16384 memory
>
> So there is no host interface registered. I'm unsure on how
The host interface will be registered when you load the gadget driver, (like insmod g_zero.ko ,etc).
> to fix this, and I didn't get an answer yet to that question
> when I asked Felipe about how interface drivers like dsps are
> supposed to act in order to get host mode back after the
> recent musb cleanups.
>
> What type of hardware do you test this with? Does host mode
> work for you?
>
By default only otg build is supported, you must insert the gadget module for each usb port in order to enable the host/device functionality. Have you checked with loading any gadget module (g_ether.ko, or g_ether.ko etc)?
-RaviBabu
>
> Many thanks,
> Daniel
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 0/5] usb: musb: am335x support
2012-11-02 19:36 ` [PATCH 0/5] usb: musb: am335x support Daniel Mack
2012-11-03 2:40 ` B, Ravi
@ 2012-11-03 7:33 ` Mohammed, Afzal
1 sibling, 0 replies; 11+ messages in thread
From: Mohammed, Afzal @ 2012-11-03 7:33 UTC (permalink / raw)
To: Daniel Mack
Cc: Balbi, Felipe, Greg Kroah-Hartman, Grant Likely, Rob Herring,
Rob Landley, Santhapuri, Damodar, B, Ravi,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
Hi Daniel,
* Daniel Mack, November 03, 2012 1:06 AM:
> I'm testing these patches with an AM33xx board that has the first musb
> port wired to an USB type A plug, but it doesn't yet work for me.
> So there is no host interface registered. I'm unsure on how to fix this,
> and I didn't get an answer yet to that question when I asked Felipe
> about how interface drivers like dsps are supposed to act in order to
> get host mode back after the recent musb cleanups.
> What type of hardware do you test this with? Does host mode work for you?
To add to those details mentioned by Ravi,
This was tested on Beagle Bone with USB0 as usb-ethernet.
For purely Kernel part, this series is sufficient (along with
dependency mentioned in cover letter), considering
the fact that dt node is strictly not a part of Kernel.
To test this series, node for usbss should be present in dt.
Example in dt documentation can be pasted onto dtsi file
to get USB0 working.
Alternatively, you can fetch from,
git://gitorious.org/x0148406-public/linux-kernel.git usb
it has dt updated with usbss node.
Regards
Afzal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example
2012-11-02 16:32 ` [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example Afzal Mohammed
@ 2012-11-06 13:02 ` Felipe Balbi
[not found] ` <20121106130245.GK11931-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Felipe Balbi @ 2012-11-06 13:02 UTC (permalink / raw)
To: Afzal Mohammed
Cc: Felipe Balbi, Greg Kroah-Hartman, Grant Likely, Rob Herring,
Rob Landley, Santhapuri Damodar, Ravi Babu, devicetree-discuss,
linux-doc, linux-usb, linux-omap
[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]
On Fri, Nov 02, 2012 at 10:02:47PM +0530, Afzal Mohammed wrote:
> OMAP2+ family of devices are now obtaining resources via DT, earlier
> it was obtained from hwmod. Update binding document accrodingly, while
> at it add example.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
> .../devicetree/bindings/usb/am33xx-usb.txt | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
> index a922505..6b7e3bd 100644
> --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
> +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
> @@ -1,5 +1,7 @@
> AM33XX MUSB GLUE
> - compatible : Should be "ti,musb-am33xx"
> + - reg : offset and length of register sets, first usbss, then for musb instances
> + - interrupts : usbss, musb instance interrupts in order
> - ti,hwmods : must be "usb_otg_hs"
> - multipoint : Should be "1" indicating the musb controller supports
> multipoint. This is a MUSB configuration-specific setting.
> @@ -12,3 +14,22 @@ AM33XX MUSB GLUE
> represents PERIPHERAL.
> - power : Should be "250". This signifies the controller can supply upto
> 500mA when operating in host mode.
> +
> +Example:
> +
> +usb_otg_hs@47400000 {
this should be usb@47400000.
> + compatible = "ti,musb-am33xx";
> + reg = <0x47400000 0x1000 /* usbss */
> + 0x47401000 0x800 /* musb instance 0 */
> + 0x47401800 0x800>; /* musb instance 1 */
> + interrupts = <17 /* usbss */
> + 18 /* musb instance 0 */
> + 19>; /* musb instance 1 */
> + multipoint = <1>;
> + num-eps = <16>;
> + ram-bits = <12>;
> + port0-mode = <3>;
> + port1-mode = <3>;
> + power = <250>;
> + ti,hwmods = "usb_otg_hs";
> +};
> --
> 1.7.12
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example
[not found] ` <20121106130245.GK11931-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
@ 2012-11-06 14:37 ` Afzal Mohammed
0 siblings, 0 replies; 11+ messages in thread
From: Afzal Mohammed @ 2012-11-06 14:37 UTC (permalink / raw)
To: balbi-l0cyMroinI0
Cc: Greg Kroah-Hartman, Grant Likely, Rob Herring, Rob Landley,
Santhapuri Damodar, Ravi Babu,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
Hi Balbi,
On Tuesday 06 November 2012 06:32 PM, Felipe Balbi wrote:
> On Fri, Nov 02, 2012 at 10:02:47PM +0530, Afzal Mohammed wrote:
>> +Example:
>> +
>> +usb_otg_hs@47400000 {
> this should be usb@47400000.
Updated version with the above change has been posted.
Regards
Afzal
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-11-06 14:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 16:31 [PATCH 0/5] usb: musb: am335x support Afzal Mohammed
2012-11-02 16:32 ` [PATCH 1/5] usb: musb: dsps: remove platform callback Afzal Mohammed
[not found] ` <cover.1351870620.git.afzal-l0cyMroinI0@public.gmane.org>
2012-11-02 16:32 ` [PATCH 2/5] usb: musb: dsps: reduce musb instance to one Afzal Mohammed
2012-11-02 16:32 ` [PATCH 3/5] usb: musb: dsps: get resources by index Afzal Mohammed
2012-11-02 16:32 ` [PATCH 4/5] usb: musb: dsps: dt binding - add resources, example Afzal Mohammed
2012-11-06 13:02 ` Felipe Balbi
[not found] ` <20121106130245.GK11931-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-06 14:37 ` Afzal Mohammed
2012-11-02 16:32 ` [PATCH 5/5] usb: musb: dsps: control module handling (quirk) Afzal Mohammed
2012-11-02 19:36 ` [PATCH 0/5] usb: musb: am335x support Daniel Mack
2012-11-03 2:40 ` B, Ravi
2012-11-03 7:33 ` Mohammed, Afzal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).