* Re: [PATCH 1/4] usb: usb: dsps: update code according to the binding document [not found] ` <1376580112-17677-2-git-send-email-bigeasy@linutronix.de> @ 2013-09-20 15:44 ` Felipe Balbi 0 siblings, 0 replies; 4+ messages in thread From: Felipe Balbi @ 2013-09-20 15:44 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-usb, Felipe Balbi, Benoit Cousson, Linux OMAP Mailing List [-- Attachment #1: Type: text/plain, Size: 5118 bytes --] + linux-omap, Benoit On Thu, Aug 15, 2013 at 05:21:49PM +0200, Sebastian Andrzej Siewior wrote: > This relfects the code and dts requires changes due to recent .dts > binding updates: > - use mg prefix for the Metor Graphics specific attributes > - use power in mA not in mA/2 as specifed in the USB2.0 specification > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> hope this can go in during the -rc cycle Acked-by: Felipe Balbi <balbi@ti.com> > --- > arch/arm/boot/dts/am335x-bone.dts | 2 +- > arch/arm/boot/dts/am335x-evm.dts | 6 +++--- > arch/arm/boot/dts/am335x-evmsk.dts | 2 +- > arch/arm/boot/dts/am33xx.dtsi | 26 +++++++++++++------------- > drivers/usb/musb/musb_dsps.c | 11 ++++++----- > 5 files changed, 24 insertions(+), 23 deletions(-) > > diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts > index a8907b5..e8447a7 100644 > --- a/arch/arm/boot/dts/am335x-bone.dts > +++ b/arch/arm/boot/dts/am335x-bone.dts > @@ -127,7 +127,7 @@ > status = "okay"; > }; > > - phy@47401300 { > + usb-phy@47401300 { > status = "okay"; > }; > > diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts > index c26c16c..648a67e 100644 > --- a/arch/arm/boot/dts/am335x-evm.dts > +++ b/arch/arm/boot/dts/am335x-evm.dts > @@ -178,11 +178,11 @@ > status = "okay"; > }; > > - phy@47401300 { > + usb-phy@47401300 { > status = "okay"; > }; > > - phy@47401b00 { > + usb-phy@47401b00 { > status = "okay"; > }; > > @@ -194,7 +194,7 @@ > status = "okay"; > }; > > - dma@07402000 { > + dma-controller@07402000 { > status = "okay"; > }; > }; > diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts > index e92446c..a6c5033 100644 > --- a/arch/arm/boot/dts/am335x-evmsk.dts > +++ b/arch/arm/boot/dts/am335x-evmsk.dts > @@ -214,7 +214,7 @@ > status = "okay"; > }; > > - phy@47401300 { > + usb-phy@47401300 { > status = "okay"; > }; > > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi > index a38f8d3..c57c6b8 100644 > --- a/arch/arm/boot/dts/am33xx.dtsi > +++ b/arch/arm/boot/dts/am33xx.dtsi > @@ -354,7 +354,7 @@ > status = "disabled"; > }; > > - usb0_phy: phy@47401300 { > + usb0_phy: usb-phy@47401300 { > compatible = "ti,am335x-usb-phy"; > reg = <0x47401300 0x100>; > reg-names = "phy"; > @@ -377,11 +377,11 @@ > reg-names = "mc"; > interrupts = <18>; > interrupt-names = "mc"; > - multipoint = <1>; > - num-eps = <16>; > - ram-bits = <12>; > - port-mode = <3>; > - power = <250>; > + mg,multipoint = <1>; > + mg,num-eps = <16>; > + mg,ram-bits = <12>; > + mg,port-mode = <3>; > + mg,power = <500>; > phys = <&usb0_phy>; > > dmas = <&cppi41dma 0 0 &cppi41dma 1 0 > @@ -409,7 +409,7 @@ > }; > }; > > - usb1_phy: phy@47401b00 { > + usb1_phy: usb-phy@47401b00 { > compatible = "ti,am335x-usb-phy"; > reg = <0x47401b00 0x100>; > reg-names = "phy"; > @@ -432,11 +432,11 @@ > reg-names = "mc"; > interrupts = <19>; > interrupt-names = "mc"; > - multipoint = <1>; > - num-eps = <16>; > - ram-bits = <12>; > - port-mode = <3>; > - power = <250>; > + mg,multipoint = <1>; > + mg,num-eps = <16>; > + mg,ram-bits = <12>; > + mg,port-mode = <3>; > + mg,power = <500>; > phys = <&usb1_phy>; > > dmas = <&cppi41dma 15 0 &cppi41dma 16 0 > @@ -464,7 +464,7 @@ > }; > }; > > - cppi41dma: dma@07402000 { > + cppi41dma: dma-controller@07402000 { > compatible = "ti,am3359-cppi41"; > reg = <0x47400000 0x1000 > 0x47402000 0x1000 > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > index 4ffbaac..7368577 100644 > --- a/drivers/usb/musb/musb_dsps.c > +++ b/drivers/usb/musb/musb_dsps.c > @@ -485,11 +485,12 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, > pdata.config = config; > pdata.platform_ops = &dsps_ops; > > - config->num_eps = get_int_prop(child_node, "num-eps"); > - config->ram_bits = get_int_prop(child_node, "ram-bits"); > - pdata.mode = get_int_prop(child_node, "port-mode"); > - pdata.power = get_int_prop(child_node, "power"); > - config->multipoint = of_property_read_bool(child_node, "multipoint"); > + config->num_eps = get_int_prop(child_node, "mg,num-eps"); > + config->ram_bits = get_int_prop(child_node, "mg,ram-bits"); > + pdata.mode = get_int_prop(child_node, "mg,port-mode"); > + /* DT keeps this entry in mA, musb expects it as per USB spec */ > + pdata.power = get_int_prop(child_node, "mg,power") / 2; > + config->multipoint = of_property_read_bool(child_node, "mg,multipoint"); > > ret = platform_device_add_data(musb, &pdata, sizeof(pdata)); > if (ret) { > -- > 1.8.4.rc2 > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1376580112-17677-3-git-send-email-bigeasy@linutronix.de>]
* Re: [PATCH 2/4] usb: musb: am335x: add second port to beagle bone [not found] ` <1376580112-17677-3-git-send-email-bigeasy@linutronix.de> @ 2013-09-20 15:44 ` Felipe Balbi 0 siblings, 0 replies; 4+ messages in thread From: Felipe Balbi @ 2013-09-20 15:44 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-usb, Felipe Balbi, Benoit Cousson, Linux OMAP Mailing List [-- Attachment #1: Type: text/plain, Size: 1401 bytes --] On Thu, Aug 15, 2013 at 05:21:50PM +0200, Sebastian Andrzej Siewior wrote: > So I assumed that Beagle bone has only one USB port in host mode because > the micro USB connector had an USB-UART there. I was wrong a little. The > second port runs on host mode, but the micro USB plug is connected to an > internal HUB with two ports: one to the USB-UART and one to musb > instance one. > For that reason, this patch enables both ports: the primary in device > mode only and the second in host mode only. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Felipe Balbi <balbi@ti.com> > --- > arch/arm/boot/dts/am335x-bone.dts | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts > index e8447a7..596d653 100644 > --- a/arch/arm/boot/dts/am335x-bone.dts > +++ b/arch/arm/boot/dts/am335x-bone.dts > @@ -131,9 +131,24 @@ > status = "okay"; > }; > > + usb-phy@47401b00 { > + status = "okay"; > + }; > + > usb@47401000 { > status = "okay"; > }; > + > + usb@47401800 { > + status = "okay"; > + usb@47401c00 { > + mg,port-mode = <1>; > + }; > + }; > + > + dma-controller@07402000 { > + status = "okay"; > + }; > }; > > i2c0: i2c@44e0b000 { > -- > 1.8.4.rc2 > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1376580112-17677-4-git-send-email-bigeasy@linutronix.de>]
* Re: [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode [not found] ` <1376580112-17677-4-git-send-email-bigeasy@linutronix.de> @ 2013-09-20 15:45 ` Felipe Balbi 2013-09-23 14:47 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 4+ messages in thread From: Felipe Balbi @ 2013-09-20 15:45 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-usb, Felipe Balbi, Benoit Cousson, Linux OMAP Mailing List [-- Attachment #1: Type: text/plain, Size: 2212 bytes --] On Thu, Aug 15, 2013 at 05:21:51PM +0200, Sebastian Andrzej Siewior wrote: > This is what I observe: > On the first connect, the musb starts with DEVCTL.Session set. On > disconnect, musb_core calls try_idle. That functions removes the Session > bit signalizing that the session is over (something that only in OTG is > required). A new device, that is plugged, is no longer recognized. > I've setup a timer and checked the DEVCTL register and I haven't seen a > change in VBus and I saw the B-Device bit set. After setting the IDDIG > into A mode and forcing the device to behave like a A device, I didn't > see a change. > Neither VBUS goes to 0b11 nor does a session start request comes. > In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the > OTG_STATE_A_WAIT_BCON state while not in OTG mode. > Since the second port hast a standard A plug the patch changes the port > to run in host mode only and skips the timer which would remove > DEVCTL.Session so we can reconnect to another device later. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Felipe Balbi <balbi@ti.com> > --- > arch/arm/boot/dts/am335x-evm.dts | 3 +++ > drivers/usb/musb/musb_dsps.c | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts > index 648a67e..794b38b9 100644 > --- a/arch/arm/boot/dts/am335x-evm.dts > +++ b/arch/arm/boot/dts/am335x-evm.dts > @@ -192,6 +192,9 @@ > > usb@47401800 { > status = "okay"; > + musb1: usb@47401c00 { > + port-mode = <1>; > + }; > }; > > dma-controller@07402000 { > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > index 7368577..b7b2346 100644 > --- a/drivers/usb/musb/musb_dsps.c > +++ b/drivers/usb/musb/musb_dsps.c > @@ -230,6 +230,8 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) > glue->last_timer = jiffies; > return; > } > + if (musb->port_mode == MUSB_PORT_MODE_HOST) > + return; > > if (time_after(glue->last_timer, timeout) && > timer_pending(&glue->timer)) { > -- > 1.8.4.rc2 > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode 2013-09-20 15:45 ` [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode Felipe Balbi @ 2013-09-23 14:47 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 4+ messages in thread From: Sebastian Andrzej Siewior @ 2013-09-23 14:47 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Benoit Cousson, Linux OMAP Mailing List On 09/20/2013 05:45 PM, Felipe Balbi wrote: > > Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > Those four patches went already in, for instance: commit 781f17983015dae33324e34d1bb831e715fa04d4 Author: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> AuthorDate: Tue Aug 20 18:35:49 2013 +0200 Commit: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> CommitDate: Tue Aug 27 14:18:41 2013 -0500 usb: musb: am335x-evm: Do not remove the session bit HOST-only mode Sebastian -- 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] 4+ messages in thread
end of thread, other threads:[~2013-09-23 14:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1376580112-17677-1-git-send-email-bigeasy@linutronix.de> [not found] ` <1376580112-17677-2-git-send-email-bigeasy@linutronix.de> 2013-09-20 15:44 ` [PATCH 1/4] usb: usb: dsps: update code according to the binding document Felipe Balbi [not found] ` <1376580112-17677-3-git-send-email-bigeasy@linutronix.de> 2013-09-20 15:44 ` [PATCH 2/4] usb: musb: am335x: add second port to beagle bone Felipe Balbi [not found] ` <1376580112-17677-4-git-send-email-bigeasy@linutronix.de> 2013-09-20 15:45 ` [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode Felipe Balbi 2013-09-23 14:47 ` Sebastian Andrzej Siewior
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).