All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] ARM: dts: sun4i: Enable USB DRC on pcDuino1/2
Date: Sun, 11 Oct 2015 19:06:35 +0200	[thread overview]
Message-ID: <20151011170635.GR2278@lukather> (raw)
In-Reply-To: <1444388979-12072-4-git-send-email-siarhei.siamashka@gmail.com>

On Fri, Oct 09, 2015 at 02:09:39PM +0300, Siarhei Siamashka wrote:
> Enable the otg/drc usb controller on the pcDuino1/2 board. Note
> that the pcDuino1 FEX file from the vendor contains the following
> information in the [usbc0] section:
>     usb_id_gpio = port:PH04<0><1><default><default>
>     usb_det_vbus_gpio = port:PH05<0><0><default><default>
>     usb_drv_vbus_gpio = port:PB09<1><0><default><0>
> While the pcDuino2 FEX has:
>     usb_id_gpio = port:PH04<0><1><default><default>
>     usb_det_vbus_gpio = port:PH05<0><0><default><default>
>     usb_drv_vbus_gpio = port:PD02<1><0><default><0>
> 
> The ID pin is indeed PH4. The PD2 pin can be used to switch power
> on/off for the USB Type A receptacle on pcDuino2, but it has nothing
> to do with the MicroUSB OTG receptacle. The VBUS pin of the MicroUSB
> receptacle is always connected to 5V according to the schematics
> (both pcDuino1 and pcDuino2) and confirmed by doing some tests on
> pcDuino2. The PH5 pin is just one of the pins on the J8 expansion
> header and has nothing to do with USB OTG. The PB9 pin is pulled
> up and connected to the N_VBUSEN pin of AXP209 PMIC, while the
> VBUS pin of AXP209 only has a capacitor between it and the
> ground (this pin is not used for anything else).
> 
> To sum it up. Only the ID pin (PH4) has a real use. And 5V voltage
> is always served to the MicroUSB OTG receptacle no matter what is
> the state of the PB9/PD2 pins.
> 
> This patch has been tested on pcDuino2 to work fine in a host role
> with a USB keyboard connected via an OTG cable. It also works fine
> in a device role (cdc_ether) with a regular Micro-B cable connected
> to a desktop PC.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151011/ea3a3063/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Siarhei Siamashka
	<siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	Zoltan HERPAI <wigyori-1V5s5g7wVVk@public.gmane.org>
Subject: Re: [PATCH v2 3/3] ARM: dts: sun4i: Enable USB DRC on pcDuino1/2
Date: Sun, 11 Oct 2015 19:06:35 +0200	[thread overview]
Message-ID: <20151011170635.GR2278@lukather> (raw)
In-Reply-To: <1444388979-12072-4-git-send-email-siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

On Fri, Oct 09, 2015 at 02:09:39PM +0300, Siarhei Siamashka wrote:
> Enable the otg/drc usb controller on the pcDuino1/2 board. Note
> that the pcDuino1 FEX file from the vendor contains the following
> information in the [usbc0] section:
>     usb_id_gpio = port:PH04<0><1><default><default>
>     usb_det_vbus_gpio = port:PH05<0><0><default><default>
>     usb_drv_vbus_gpio = port:PB09<1><0><default><0>
> While the pcDuino2 FEX has:
>     usb_id_gpio = port:PH04<0><1><default><default>
>     usb_det_vbus_gpio = port:PH05<0><0><default><default>
>     usb_drv_vbus_gpio = port:PD02<1><0><default><0>
> 
> The ID pin is indeed PH4. The PD2 pin can be used to switch power
> on/off for the USB Type A receptacle on pcDuino2, but it has nothing
> to do with the MicroUSB OTG receptacle. The VBUS pin of the MicroUSB
> receptacle is always connected to 5V according to the schematics
> (both pcDuino1 and pcDuino2) and confirmed by doing some tests on
> pcDuino2. The PH5 pin is just one of the pins on the J8 expansion
> header and has nothing to do with USB OTG. The PB9 pin is pulled
> up and connected to the N_VBUSEN pin of AXP209 PMIC, while the
> VBUS pin of AXP209 only has a capacitor between it and the
> ground (this pin is not used for anything else).
> 
> To sum it up. Only the ID pin (PH4) has a real use. And 5V voltage
> is always served to the MicroUSB OTG receptacle no matter what is
> the state of the PB9/PD2 pins.
> 
> This patch has been tested on pcDuino2 to work fine in a host role
> with a USB keyboard connected via an OTG cable. It also works fine
> in a device role (cdc_ether) with a regular Micro-B cable connected
> to a desktop PC.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-10-11 17:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 11:09 [PATCH v2 0/3] ARM: dts: sun4i: Enable USB DRC and voltage-scaling on pcDuino1/2 Siarhei Siamashka
2015-10-09 11:09 ` Siarhei Siamashka
2015-10-09 11:09 ` [PATCH v2 1/3] ARM: dts: sun4i: Allow to use the PH6 pin for GPIO " Siarhei Siamashka
2015-10-09 11:09   ` Siarhei Siamashka
2015-10-11 16:47   ` Maxime Ripard
2015-10-11 16:47     ` Maxime Ripard
2015-10-09 11:09 ` [PATCH v2 2/3] ARM: sun4i: dt: Add new LinkSprite pcDuino2 board Siarhei Siamashka
2015-10-09 11:09   ` Siarhei Siamashka
2015-10-11 16:51   ` Maxime Ripard
2015-10-11 16:51     ` Maxime Ripard
2015-10-09 11:09 ` [PATCH v2 3/3] ARM: dts: sun4i: Enable USB DRC on pcDuino1/2 Siarhei Siamashka
2015-10-09 11:09   ` Siarhei Siamashka
2015-10-11 17:06   ` Maxime Ripard [this message]
2015-10-11 17:06     ` Maxime Ripard

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=20151011170635.GR2278@lukather \
    --to=maxime.ripard@free-electrons.com \
    --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.