All of lore.kernel.org
 help / color / mirror / Atom feed
From: oliver+list@schinagl.nl (Olliver Schinagl)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] [PATCH] musb: sunxi: Ignore VBus errors in host-only mode
Date: Thu, 06 Aug 2015 10:22:59 +0200	[thread overview]
Message-ID: <55C31963.2010701@schinagl.nl> (raw)
In-Reply-To: <1438723553-4136-1-git-send-email-hdegoede@redhat.com>

Hey Hans,

I've tried getting your musb stuff working on a cubietruck, but i don't 
seem to see this patch on your linux-sunxi/sunxi-wip branch on github? 
Is your github branch fully functional at the moment?

What I have done so far, is build the kernel using sunxi_defconfig and 
enabled USB_MUSB_SUNXI with its dependancies (musb isn't enabled there 
by default): USB_SUPPORT [=y] && USB_MUSB_HDRC [=y] && ARCH_SUNXI [=y] 
&& NOP_USB_XCEIV [=y] && PHY_SUN4I_USB [=y] && EXTCON [=y] && 
GENERIC_PHY [=y]  Selects: SUNXI_SRAM [=y]

I changed the dts from dr_mode='otg' to dr_mode='host', a) we only need 
host mode anyway (the id pin isn't properly connected) and b) I got an 
error about an known dr_mode before and this was the quick and easy way.

Dmesg produces the following related to musb.

[    1.691062] usb_phy_generic.0.auto supply vcc not found, using dummy 
regulator
[    1.691445] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk 
combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[    1.691453] musb-hdrc: MHDRC RTL version 0.0
[    1.691467] musb-hdrc: 11/11 max ep, 5184/8192 memory
[    1.691543] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.691553] musb-hdrc musb-hdrc.1.auto: new USB bus registered, 
assigned bus number 5
[    1.692470] hub 5-0:1.0: USB hub found
[    1.692529] hub 5-0:1.0: 1 port detected
[    1.699956] sunxi-rtc 1c20d00.rtc: setting system clock to 2015-08-06 
07:59:08 UTC (1438847948)
[    1.704733] usb0-vbus: disabling
[    1.765695] ldo4: disabling
[    1.808351] ldo3: disabling
[    1.848769] vcc5v0: disabling
[    1.848774] vcc3v0: disabling

The usb_phy_generic missing shouldn't be too bad? But the usb0-vbus 
being disabled obviously might be related to the musb port not working? 
What causes this though? I went through all the musb patch series mails 
but don't recall seing anything special being needed.

If there are fixes missing in the sunxi-next stuff that could explain 
this, could you be so kind and push your latest work so I can try it? 
Thanks Hans!

Olliver

On 04-08-15 23:25, Hans de Goede wrote:
> For some unclear reason sometimes we get VBus errors in host-only mode,
> even though we do not have any vbus-detection then. Ignore these.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>   drivers/usb/musb/sunxi.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
> index f9f6304..34ce5df 100644
> --- a/drivers/usb/musb/sunxi.c
> +++ b/drivers/usb/musb/sunxi.c
> @@ -194,6 +194,10 @@ static irqreturn_t sunxi_musb_interrupt(int irq, void *__hci)
>   		musb_writeb(musb->mregs, MUSB_FADDR, 0);
>   	}
>   
> +	/*  Ignore Vbus errors when in host only mode */
> +	if (musb->port_mode == MUSB_PORT_MODE_HOST)
> +		musb->int_usb &= ~MUSB_INTR_VBUSERROR;
> +
>   	musb->int_tx = readw(musb->mregs + SUNXI_MUSB_INTRTX);
>   	if (musb->int_tx)
>   		writew(musb->int_tx, musb->mregs + SUNXI_MUSB_INTRTX);

  parent reply	other threads:[~2015-08-06  8:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 21:25 [PATCH] musb: sunxi: Ignore VBus errors in host-only mode Hans de Goede
2015-08-04 21:35 ` Felipe Balbi
2015-08-04 22:05   ` Hans de Goede
2015-08-04 22:57     ` Felipe Balbi
2015-08-05 13:30       ` Hans de Goede
2015-08-06  8:22 ` Olliver Schinagl [this message]
2015-08-06 14:35   ` [linux-sunxi] " Hans de Goede
2015-08-07  8:45     ` Olliver Schinagl
2015-09-04  6:43       ` Olliver Schinagl
2015-09-10 18:23         ` Hans de Goede
2015-09-10 18:30           ` Maxime Ripard
2015-09-10 18:38             ` Hans de Goede
2015-09-14 14:44               ` Bin Liu
2015-09-14 14:59                 ` Hans de Goede
2015-09-14 16:58                   ` Bin Liu
2015-09-14 17:08                     ` Hans de Goede
2015-09-14 17:14                       ` Bin Liu
2015-09-14 17:25                         ` Hans de Goede
2015-09-14 17:53                           ` Bin Liu
2015-09-14 17:56                             ` Hans de Goede
2015-09-14 19:06                               ` Bin Liu
2015-09-14 20:25               ` Maxime Ripard
2015-09-15  2:54                 ` Hans de Goede
2015-09-15  4:20                   ` Bin Liu
2016-05-04 10:25                 ` Michal Suchanek
     [not found]                   ` <706aa130-3ace-4059-a7c9-44147cd56c28@googlegroups.com>
     [not found]                     ` <af013a0a-9257-4936-9e66-cb38f2e46369@googlegroups.com>
     [not found]                       ` <0106707e-21f3-4aec-92ca-8b951af8a34e@googlegroups.com>
2017-05-12  9:16                         ` Maxime Ripard
2015-09-26 12:50           ` Olliver Schinagl
     [not found]             ` <jwvmvw7zzg5.fsf-monnier+gmane.comp.hardware.netbook.arm.sunxi@gnu.org>
2015-09-28  7:04               ` [linux-sunxi] " Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C31963.2010701@schinagl.nl \
    --to=oliver+list@schinagl.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.