linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Minas Harutyunyan <hminas@synopsys.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Fabrice Gasnier <fabrice.gasnier@st.com>
Subject: Re: [PATCH v4 2/3] usb: dwc2: override PHY input signals with usb role switch support
Date: Mon, 27 Jul 2020 19:55:44 +0200	[thread overview]
Message-ID: <CAFBinCBDtuJ19_WZe1H+_BJTJAi=jENyczybPhC1AGYwedNHcQ@mail.gmail.com> (raw)
In-Reply-To: <20200727092346.19780-3-amelie.delaunay@st.com>

Hi Amelie,

On Mon, Jul 27, 2020 at 11:23 AM Amelie Delaunay <amelie.delaunay@st.com> wrote:
>
> This patch adds support for usb role switch to dwc2, by using overriding
> control of the PHY voltage valid and ID input signals.
>
> iddig signal (ID) can be overridden:
> - when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1;
> - when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0.
>
> avalid/bvalid/vbusvalid signals can be overridden respectively with:
> - GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL
> - GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL
> - GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL
>
> It is possible to determine valid sessions thanks to usb role switch:
> - if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid
> - if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid
> - if USB_ROLE_HOST then avalid && !bvalid && vbusvalid
>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
please add my:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

The usb_role_switch part looks correct to me
I don't understand the details of the dwc2 hardware well enough to say
if the rest of this patch is fine or not (which is why I'm giving my
Acked-by instead of Reviewed-by).

Unfortunately I'm still fighting with the Amlogic bits (or my
board...) to make this work on my boards.
That why I can't give my Tested-by yet
At the same time I'm confident that the problem lies within the
Amlogic OTG detection/GPIOs so I don't see a reason to hold your patch
up due to this

Finally, please note that there may be a small conflict due to one
bugfix I sent: [0]
I think it will be trivial to solve (since we're both adding a new error label)


Thank you for your good work again!
Best regards,
Martin


[0] https://patchwork.kernel.org/patch/11687357/

  reply	other threads:[~2020-07-27 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  9:23 [PATCH v4 0/3] Add USB role switch support to DWC2 Amelie Delaunay
2020-07-27  9:23 ` [PATCH v4 1/3] dt-bindings: usb: dwc2: add optional usb-role-switch property Amelie Delaunay
2020-07-27 17:47   ` Martin Blumenstingl
2020-07-27  9:23 ` [PATCH v4 2/3] usb: dwc2: override PHY input signals with usb role switch support Amelie Delaunay
2020-07-27 17:55   ` Martin Blumenstingl [this message]
2020-07-27  9:23 ` [PATCH v4 3/3] usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs Amelie Delaunay
2020-07-27 17:49   ` Martin Blumenstingl
2020-07-27 19:44     ` Andy Shevchenko
2020-07-28  7:27       ` Amelie DELAUNAY

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='CAFBinCBDtuJ19_WZe1H+_BJTJAi=jENyczybPhC1AGYwedNHcQ@mail.gmail.com' \
    --to=martin.blumenstingl@googlemail.com \
    --cc=alexandre.torgue@st.com \
    --cc=amelie.delaunay@st.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrice.gasnier@st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.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).