public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Rob Herring <robh@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: Kukjin Kim <kgene@kernel.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux.amoon@gmail.com, tjakobi@math.uni-bielefeld.de,
	m.szyprowski@samsung.com, hverkuil@xs4all.nl,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	ulf.hansson@linaro.org
Subject: Re: [RFT PATCH 1/3] usb: misc: usb3503: Fix HUB mode after bootloader initialization
Date: Wed, 04 May 2016 14:01:57 +0200	[thread overview]
Message-ID: <5729E4B5.2090702@samsung.com> (raw)
In-Reply-To: <20160503180022.GA3008@rob-hp-laptop>

On 05/03/2016 08:00 PM, Rob Herring wrote:
> On Mon, May 02, 2016 at 11:55:01AM +0100, Mark Brown wrote:
>> On Mon, May 02, 2016 at 11:49:12AM +0200, Krzysztof Kozlowski wrote:
>>
>>> This VDD regulator supply actually is not a usb3503 USB HUB regulator
>>> supply... but a supply to the LAN attached to this HUB. Regulator off/on
>>> is needed for LAN to show up. The hub will show up with typical reset
>>> (which is also missing before my patchset btw).
>>
>>> The LAN, as a USB device, is auto-probed so it cannot take the regulator
>>> and play with it. The simplest idea I have is to add it as "external
>>> supply"  to the parent: usb3503.
>>
>> This is common enough that that just isn't going to scale well I fear
>> without some generic handling, either walking child devices at the bus
>> level or at the device level with a pre-probe() callback to get the
>> device to power on.  The latter is more appropriate to things like
>> Slimbus where the device is more likely to do active management at
>> runtime, it's not clear people are building USB devices like that.
> 
> There's a new binding and support in -next (.../usb/usb-device.txt) for 
> USB devices that should help here. Though, how to handle a hub on USB 
> and I2C buses would need to be worked out.

This binding might help, especially with other idea we have - usage of
pwrseq for the USB hub.

The USB hub, without toggling the regulator off/on, appears as USB
device only sometimes. Apparently there is some timing or other
behavior. not yet known to me.

When playing with regulator, the USB hub and child USB device (LAN) will
appear correctly.

This looks like pwrseq for MMC devices so the idea is to:
1. Move drivers/mmc/core/pwrseq* to separate directory
(drivers/power/pwrseq ?)
2. Add support for pwrseq to USB core,
3. Add new pwrseq driver (or extend existing one): toggling the regulator.
4. Add pwrseq phandle to the DT node of USB hub (to the binding
mentioned by Rob?).


Does it look sensible?

Best regards,
Krzysztof

  reply	other threads:[~2016-05-04 12:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 10:59 [RFT PATCH 0/3] usb: misc: usb3503: Fix missing device when TFTP booting Krzysztof Kozlowski
2016-04-29 10:59 ` [RFT PATCH 1/3] usb: misc: usb3503: Fix HUB mode after bootloader initialization Krzysztof Kozlowski
2016-04-29 11:30   ` Mark Brown
2016-04-29 11:55     ` Krzysztof Kozlowski
2016-04-29 16:44       ` Mark Brown
2016-05-02  9:49         ` Krzysztof Kozlowski
2016-05-02 10:49           ` Krzysztof Kozlowski
2016-05-02 10:55           ` Mark Brown
2016-05-03 18:00             ` Rob Herring
2016-05-04 12:01               ` Krzysztof Kozlowski [this message]
2016-05-04 18:25                 ` Mark Brown
2016-04-29 10:59 ` [RFT PATCH 2/3] ARM: dts: exynos: Provide regulator for usb3503 on Odroid to fix device detection Krzysztof Kozlowski
2016-04-29 10:59 ` [PATCH 3/3] regulator: max77686: Configure enable time to properly handle regulator enable Krzysztof Kozlowski
2016-04-29 11:31   ` Applied "regulator: max77686: Configure enable time to properly handle regulator enable" to the regulator tree Mark Brown
2016-04-30  9:43 ` [RFT PATCH 0/3] usb: misc: usb3503: Fix missing device when TFTP booting Hans Verkuil
2016-05-01 13:17   ` Krzysztof Kozlowski
2016-05-01 14:09     ` Hans Verkuil
2016-05-01 16:01       ` Hans Verkuil
2016-05-01 16:42         ` Krzysztof Kozlowski
2016-05-02 13:40           ` Hans Verkuil
2016-05-02 13:41             ` Krzysztof Kozlowski
2016-05-02  5:50         ` Marek Szyprowski

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=5729E4B5.2090702@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kgene@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=m.szyprowski@samsung.com \
    --cc=robh@kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox