devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Peter Chen <hzpeterchen@gmail.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Peter Chen" <peter.chen@nxp.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Stephen Boyd" <stephen.boyd@linaro.org>,
	"Krzysztof Kozłowski" <k.kozlowski@samsung.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Javier Martinez Canillas" <javier@osg.samsung.com>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Maciej S. Szmigiero" <mail@maciej.szmigiero.name>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	troy.kisky@boundarydevices.com,
	"Rob Herring" <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	oscar@naiandei.net,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Linux USB List" <linux-usb@vger.kernel.org>,
	linux-mmc@vger
Subject: Re: [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver
Date: Mon, 20 Jun 2016 20:29:55 +0800	[thread overview]
Message-ID: <CAGb2v65nuVyHjQY7-shvygCTVxG6eHbwGygr_Cw2Hg7mg+rAwg@mail.gmail.com> (raw)
In-Reply-To: <20160620112651.GA26936@shlinux2>

Hi,

On Mon, Jun 20, 2016 at 7:26 PM, Peter Chen <hzpeterchen@gmail.com> wrote:
> On Fri, Jun 17, 2016 at 12:16:48PM -0500, Rob Herring wrote:
>> On Fri, Jun 17, 2016 at 5:09 AM, Peter Chen <peter.chen@nxp.com> wrote:
>> > Add binding doc for generic usb power sequence driver, and update
>> > generic usb device binding-doc accordingly.
>> >
>> > Signed-off-by: Peter Chen <peter.chen@nxp.com>
>> > ---
>> >  .../bindings/power/pwrseq/pwrseq-usb-generic.txt   | 31 ++++++++++++++++++++++
>> >  .../devicetree/bindings/usb/usb-device.txt         |  2 ++
>> >  2 files changed, 33 insertions(+)
>> >  create mode 100644 Documentation/devicetree/bindings/power/pwrseq/pwrseq-usb-generic.txt
>> >
>> > diff --git a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-usb-generic.txt b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-usb-generic.txt
>> > new file mode 100644
>> > index 0000000..8ad98382
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-usb-generic.txt
>> > @@ -0,0 +1,31 @@
>> > +The power sequence for generic USB Devices
>> > +
>> > +Some hard-wired USB devices need to do power sequence to let the
>> > +device work normally, the typical power sequence like: enable USB
>> > +PHY clock, toggle reset pin, etc. But current Linux USB driver
>> > +lacks of such code to do it, it may cause some hard-wired USB devices
>> > +works abnormal or can't be recognized by controller at all. The
>> > +power sequence will be done before this device can be found at USB
>> > +bus.
>> > +
>> > +Required properties:
>> > +- compatible : contains "usb-pwrseq-generic".
>>
>> In case I have not been clear, no.
>>
>> I am not going to accept anything along the lines of the current mmc
>> pwrseq. I am basically okay with Krzysztof's proposal as it is *only*
>> an added property and not a duplication of information. I'd suggest
>> you figure out how to make the kernel work with that rather than
>> trying to work-around whatever kernel limitations there are.
>>
>
> I see.
>
> Would you agree with below:
>
> &usbotg1 {
>         vbus-supply = <&reg_usb_otg1_vbus>;
>         pinctrl-names = "default";
>         pinctrl-0 = <&pinctrl_usb_otg1_id>;
>         status = "okay";
>
>         #address-cells = <1>;
>         #size-cells = <0>;
>         hub: genesys@1 {
>                 compatible = "usb5e3,608";
>                 reg = <1>;
>
>                 power-sequence;
>                 reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
>                 reset-duration-us = <10>;
>                 clocks = <&clks IMX6SX_CLK_CKO>;
>
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>                 ethernet: asix@1 {
>                         compatible = "usbb95,1708";
>                         reg = <1>;
>
>                         power-sequence;
>                         reset-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* ethernet_rst */
>                         reset-duration-us = <15>;
>                         clocks = <&clks IMX6SX_CLK_IPG>;
>                 };
>         };
> };
>
> If the node has property "power-sequence", the pwrseq core will create
> related platform device, and the driver under pwrseq driver will handle
> power sequence stuffs. The property below "power-sequence" will be
> handled at pwrseq driver.

Isn't this binding what Krzysztof proposed? His series also provides example
code for enabling USB device power sequencing. Does it not work for you?

Having 2 series by 2 separate people doing the same thing but slightly
different is very confusing.

Regards
ChenYu

  reply	other threads:[~2016-06-20 12:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 10:09 [PATCH 00/12] power: add generic power sequence framework Peter Chen
2016-06-17 10:09 ` [PATCH 01/12] power/mmc: Move pwrseq drivers to power/pwrseq Peter Chen
2016-06-17 10:09 ` [PATCH 02/12] MAINTAINERS: Retain Ulf Hansson as the same maintainer of pwrseq Peter Chen
2016-06-17 10:09 ` [PATCH 03/12] power: pwrseq: Enable COMPILE_TEST for drivers Peter Chen
2016-06-17 10:09 ` [PATCH 05/12] power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix Peter Chen
2016-06-17 10:09 ` [PATCH 06/12] power: pwrseq: change common helpers as generic Peter Chen
2016-06-17 10:09 ` [PATCH 07/12] power: pwrseq: rename file name for generic driver Peter Chen
2016-06-20 12:48   ` Krzysztof Kozlowski
2016-06-21  2:19     ` Peter Chen
2016-06-17 10:09 ` [PATCH 09/12] power: pwrseq: pwrseq_usb_generic: add generic power sequence support for USB deivces Peter Chen
2016-06-17 10:09 ` [PATCH 11/12] usb: chipidea: host: let the hcd know's parent device node Peter Chen
     [not found] ` <1466158165-9380-1-git-send-email-peter.chen-3arQi8VN3Tc@public.gmane.org>
2016-06-17 10:09   ` [PATCH 04/12] power: pwrseq: Remove mmc prefix from mmc_pwrseq Peter Chen
2016-06-17 10:09   ` [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver Peter Chen
2016-06-17 17:16     ` Rob Herring
2016-06-20 11:26       ` Peter Chen
2016-06-20 12:29         ` Chen-Yu Tsai [this message]
2016-06-21  2:14           ` Peter Chen
2016-06-20 16:16         ` Rob Herring
2016-06-20 17:06           ` Mark Brown
2016-06-21  2:11           ` Peter Chen
2016-06-21 21:26             ` Rob Herring
2016-06-22  1:14               ` Peter Chen
2016-06-22  9:09               ` Ulf Hansson
2016-06-24 15:25                 ` Rob Herring
2016-06-17 10:09   ` [PATCH 10/12] usb: core: add power sequence handling for USB devices Peter Chen
     [not found]     ` <1466158165-9380-11-git-send-email-peter.chen-3arQi8VN3Tc@public.gmane.org>
2016-06-17 16:12       ` Alan Stern
2016-06-17 10:09   ` [PATCH 12/12] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property Peter Chen
2016-06-17 23:29 ` [PATCH 00/12] power: add generic power sequence framework Maciej S. Szmigiero
2016-06-20 11:27   ` Peter Chen

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=CAGb2v65nuVyHjQY7-shvygCTVxG6eHbwGygr_Cw2Hg7mg+rAwg@mail.gmail.com \
    --to=wens@csie.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hzpeterchen@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=mark.rutland@arm.com \
    --cc=oscar@naiandei.net \
    --cc=pawel.moll@arm.com \
    --cc=peter.chen@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stephen.boyd@linaro.org \
    --cc=stern@rowland.harvard.edu \
    --cc=troy.kisky@boundarydevices.com \
    --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;
as well as URLs for NNTP newsgroup(s).