linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	 Jerome Brunet <jbrunet@baylibre.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	 linux-phy@lists.infradead.org,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function
Date: Sat, 3 Jul 2021 00:43:19 +0530	[thread overview]
Message-ID: <CANAwSgSfzwYTtAFeKSxGUW=rtON42AObrXGsRTb31WevFKJQLA@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCD+seUuYUrObiqJNgEi_DaULB3nU+QQFHz9d85dAU06ZA@mail.gmail.com>

Hi Martin,

On Mon, 28 Jun 2021 at 01:55, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Sun, Jun 27, 2021 at 10:07 PM Anand Moon <linux.amoon@gmail.com> wrote:
> [...]
> > Sorry for the delay.
> > We could switch the reset logic to
> > *devm_reset_control_get_optional_exclusive* as below
> > to fix the reset line, since both the dwc2 c90c0000.usb and c9040000.usb
> > will have their own context to reset control register, it means the
> > reset line is not share
> > between two USB PHY nodes.
> This is something I don't understand.
> As discussed in our previous mails reset_control_reset in case of the
> USB PHY driver (which uses the RESET_USB_OTG reset line for *both*
> PHYs) is equivalent to the following code in the vendor kernel:
>   aml_cbus_update_bits(0x1102, 0x1<<2, 0x1<<2)
>
> We have two PHYs but only one reset line. So in my own words I
> describe the reset line as being shared.
>
> >
> > -       priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
> > +       priv->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
> > +                                                               "reset");
> Have you boot-tested this?
> Without any .dts changes this will return NULL because there's no
> reset-names = "reset"; in the .dts(i).
> If you replace "reset" with NULL then I assume that the second PHY
> will fail to obtain the reset line because it's shared between two
> devices but we're trying to obtain it exclusively for both (PHYs).
>
Thanks for your review comments.

I have always tested with both the phy enable and with proper DTS changes.
Yes, it gives false-positive results while initialization of the USB PHY.
Odroid C2 it will pass but on Odroid C1 it will fail kid off.

But it seems to me that the order of the PHY reset is kind of a problem.

Thanks for looking into my changes.
>
> Best regards,
> Martin

Thanks
-Anand

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2021-07-02 19:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 19:41 [RFCv1 0/8] Meson-8b and Meson-gxbb USB phy code re-structure Anand Moon
2021-06-17 19:41 ` [RFCv1 1/8] phy: amlogic: meson8b-usb2: Use clock bulk to get clocks for phy Anand Moon
2021-06-17 22:33   ` Martin Blumenstingl
2021-06-18 15:32     ` Anand Moon
2021-06-17 19:41 ` [RFCv1 2/8] phy: amlogic: meson8b-usb2: Use phy init callback function Anand Moon
2021-06-18 12:26   ` Martin Blumenstingl
2021-06-18 13:17     ` Anand Moon
2021-06-17 19:41 ` [RFCv1 3/8] phy: amlogic: meson8b-usb2: Use phy exit " Anand Moon
2021-06-17 19:41 ` [RFCv1 4/8] phy: amlogic: meson8b-usb2: Use phy set_mode " Anand Moon
2021-06-17 22:16   ` Martin Blumenstingl
2021-06-18 13:19     ` Anand Moon
2021-06-18 20:01       ` Martin Blumenstingl
2021-06-21  7:20         ` Anand Moon
2021-06-22 20:27           ` Martin Blumenstingl
2021-06-17 19:41 ` [RFCv1 5/8] phy: amlogic: meson8b-usb2: Reorder phy poweroff " Anand Moon
2021-06-17 22:16   ` Martin Blumenstingl
2021-06-18 15:33     ` Anand Moon
2021-06-17 19:41 ` [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset " Anand Moon
2021-06-17 22:24   ` Martin Blumenstingl
2021-06-18 15:33     ` Anand Moon
2021-06-18 20:06       ` Martin Blumenstingl
2021-06-21  7:15         ` Anand Moon
2021-06-22 20:11           ` Martin Blumenstingl
2021-06-24 14:54             ` Anand Moon
2021-06-27 20:07               ` Anand Moon
2021-06-27 20:25                 ` Martin Blumenstingl
2021-07-02 19:13                   ` Anand Moon [this message]
2021-06-17 19:41 ` [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode Anand Moon
2021-06-17 22:37   ` Martin Blumenstingl
2021-06-21  7:15     ` Anand Moon
2021-06-22 20:00       ` Martin Blumenstingl
2021-06-17 19:41 ` [RFCv1 8/8] phy: amlogic: meson8b-usb2: don't log an error on -EPROBE_DEFER Anand Moon
2021-06-17 22:26   ` Martin Blumenstingl
2021-06-17 22:11 ` [RFCv1 0/8] Meson-8b and Meson-gxbb USB phy code re-structure Martin Blumenstingl
2021-06-18 13:20   ` Anand Moon
2021-06-18 20:16     ` Martin Blumenstingl
2021-06-21  7:21       ` Anand Moon

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='CANAwSgSfzwYTtAFeKSxGUW=rtON42AObrXGsRTb31WevFKJQLA@mail.gmail.com' \
    --to=linux.amoon@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=vkoul@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).