All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: gregkh@linuxfoundation.org, hminas@synopsys.com,
	balbi@kernel.org, kishon@ti.com,
	linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 5/8] phy: amlogic: add Amlogic G12A USB2 PHY Driver
Date: Thu, 7 Mar 2019 09:41:12 +0100	[thread overview]
Message-ID: <bd9d1b4b-4dd7-864e-b197-c5993d3dd24f@baylibre.com> (raw)
In-Reply-To: <CAFBinCAacdsjwtg_RK=e=Lnep7oLF+eTBmkb1FB4nFR129z1jA@mail.gmail.com>

On 06/03/2019 22:00, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Mon, Mar 4, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +#include <linux/clk.h>
>> +#include <linux/delay.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/of_device.h>
>> +#include <linux/regmap.h>
>> +#include <linux/mfd/syscon.h>
> there's a "regmap" include right above. this driver doesn't use syscon
> so this include can be dropped

Forgot this one...

> 
> [...]
>> +static int phy_meson_g12a_usb2_exit(struct phy *phy)
>> +{
>> +       struct phy_meson_g12a_usb2_priv *priv = phy_get_drvdata(phy);
>> +
>> +       return reset_control_reset(priv->reset);
> do you know whether we should reset_control_assert here instead of
> reset_control_reset?
> the probe function below already uses reset_control_deassert, so the
> current implementation is inconsistent. in v1 you replied with "Maybe
> it would be better, indeed." - if there's a reason why
> reset_control_assert doesn't work here then I would like to have a
> comment stating why

It's not clear yet, I implemented it safe here since in my tests, when
I left the USB2 PHYs resetted, it was kept resetted on a soft system reset
and the ROM was not able to setup the PHY correctly.

So maybe it's wrong for power management, it's safer to simply to keep the
PHYs unresetted when unused.

> 
> Apart from these two this is looking good!
> Human readable BIT/GENMASK #defines for the register bits would be
> nice, but I'm not sure if you have the details to add these.

I have the registers set in the doc, but it's much longer than copying
the registers structs from the vendor kernel, so I postponed it.

I'll try adding these, but for now it's low priority unless the PHY maintainer
asks for them.

Neil

> 
> 
> Regards
> Martin
> 


WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: gregkh@linuxfoundation.org, hminas@synopsys.com,
	balbi@kernel.org, kishon@ti.com,
	linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [v2,5/8] phy: amlogic: add Amlogic G12A USB2 PHY Driver
Date: Thu, 7 Mar 2019 09:41:12 +0100	[thread overview]
Message-ID: <bd9d1b4b-4dd7-864e-b197-c5993d3dd24f@baylibre.com> (raw)

On 06/03/2019 22:00, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Mon, Mar 4, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +#include <linux/clk.h>
>> +#include <linux/delay.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/of_device.h>
>> +#include <linux/regmap.h>
>> +#include <linux/mfd/syscon.h>
> there's a "regmap" include right above. this driver doesn't use syscon
> so this include can be dropped

Forgot this one...

> 
> [...]
>> +static int phy_meson_g12a_usb2_exit(struct phy *phy)
>> +{
>> +       struct phy_meson_g12a_usb2_priv *priv = phy_get_drvdata(phy);
>> +
>> +       return reset_control_reset(priv->reset);
> do you know whether we should reset_control_assert here instead of
> reset_control_reset?
> the probe function below already uses reset_control_deassert, so the
> current implementation is inconsistent. in v1 you replied with "Maybe
> it would be better, indeed." - if there's a reason why
> reset_control_assert doesn't work here then I would like to have a
> comment stating why

It's not clear yet, I implemented it safe here since in my tests, when
I left the USB2 PHYs resetted, it was kept resetted on a soft system reset
and the ROM was not able to setup the PHY correctly.

So maybe it's wrong for power management, it's safer to simply to keep the
PHYs unresetted when unused.

> 
> Apart from these two this is looking good!
> Human readable BIT/GENMASK #defines for the register bits would be
> nice, but I'm not sure if you have the details to add these.

I have the registers set in the doc, but it's much longer than copying
the registers structs from the vendor kernel, so I postponed it.

I'll try adding these, but for now it's low priority unless the PHY maintainer
asks for them.

Neil

> 
> 
> Regards
> Martin
>

WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: balbi@kernel.org, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kishon@ti.com, hminas@synopsys.com,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 5/8] phy: amlogic: add Amlogic G12A USB2 PHY Driver
Date: Thu, 7 Mar 2019 09:41:12 +0100	[thread overview]
Message-ID: <bd9d1b4b-4dd7-864e-b197-c5993d3dd24f@baylibre.com> (raw)
In-Reply-To: <CAFBinCAacdsjwtg_RK=e=Lnep7oLF+eTBmkb1FB4nFR129z1jA@mail.gmail.com>

On 06/03/2019 22:00, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Mon, Mar 4, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +#include <linux/clk.h>
>> +#include <linux/delay.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/of_device.h>
>> +#include <linux/regmap.h>
>> +#include <linux/mfd/syscon.h>
> there's a "regmap" include right above. this driver doesn't use syscon
> so this include can be dropped

Forgot this one...

> 
> [...]
>> +static int phy_meson_g12a_usb2_exit(struct phy *phy)
>> +{
>> +       struct phy_meson_g12a_usb2_priv *priv = phy_get_drvdata(phy);
>> +
>> +       return reset_control_reset(priv->reset);
> do you know whether we should reset_control_assert here instead of
> reset_control_reset?
> the probe function below already uses reset_control_deassert, so the
> current implementation is inconsistent. in v1 you replied with "Maybe
> it would be better, indeed." - if there's a reason why
> reset_control_assert doesn't work here then I would like to have a
> comment stating why

It's not clear yet, I implemented it safe here since in my tests, when
I left the USB2 PHYs resetted, it was kept resetted on a soft system reset
and the ROM was not able to setup the PHY correctly.

So maybe it's wrong for power management, it's safer to simply to keep the
PHYs unresetted when unused.

> 
> Apart from these two this is looking good!
> Human readable BIT/GENMASK #defines for the register bits would be
> nice, but I'm not sure if you have the details to add these.

I have the registers set in the doc, but it's much longer than copying
the registers structs from the vendor kernel, so I postponed it.

I'll try adding these, but for now it's low priority unless the PHY maintainer
asks for them.

Neil

> 
> 
> Regards
> Martin
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: balbi@kernel.org, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kishon@ti.com, hminas@synopsys.com,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 5/8] phy: amlogic: add Amlogic G12A USB2 PHY Driver
Date: Thu, 7 Mar 2019 09:41:12 +0100	[thread overview]
Message-ID: <bd9d1b4b-4dd7-864e-b197-c5993d3dd24f@baylibre.com> (raw)
In-Reply-To: <CAFBinCAacdsjwtg_RK=e=Lnep7oLF+eTBmkb1FB4nFR129z1jA@mail.gmail.com>

On 06/03/2019 22:00, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Mon, Mar 4, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +#include <linux/clk.h>
>> +#include <linux/delay.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/of_device.h>
>> +#include <linux/regmap.h>
>> +#include <linux/mfd/syscon.h>
> there's a "regmap" include right above. this driver doesn't use syscon
> so this include can be dropped

Forgot this one...

> 
> [...]
>> +static int phy_meson_g12a_usb2_exit(struct phy *phy)
>> +{
>> +       struct phy_meson_g12a_usb2_priv *priv = phy_get_drvdata(phy);
>> +
>> +       return reset_control_reset(priv->reset);
> do you know whether we should reset_control_assert here instead of
> reset_control_reset?
> the probe function below already uses reset_control_deassert, so the
> current implementation is inconsistent. in v1 you replied with "Maybe
> it would be better, indeed." - if there's a reason why
> reset_control_assert doesn't work here then I would like to have a
> comment stating why

It's not clear yet, I implemented it safe here since in my tests, when
I left the USB2 PHYs resetted, it was kept resetted on a soft system reset
and the ROM was not able to setup the PHY correctly.

So maybe it's wrong for power management, it's safer to simply to keep the
PHYs unresetted when unused.

> 
> Apart from these two this is looking good!
> Human readable BIT/GENMASK #defines for the register bits would be
> nice, but I'm not sure if you have the details to add these.

I have the registers set in the doc, but it's much longer than copying
the registers structs from the vendor kernel, so I postponed it.

I'll try adding these, but for now it's low priority unless the PHY maintainer
asks for them.

Neil

> 
> 
> Regards
> Martin
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2019-03-07  8:41 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 10:38 [PATCH v2 0/8] arm64: meson: Add support for USB on Amlogic G12A Neil Armstrong
2019-03-04 10:38 ` Neil Armstrong
2019-03-04 10:38 ` Neil Armstrong
2019-03-04 10:38 ` [PATCH v2 1/8] dt-bindings: phy: Add Amlogic G12A USB2 PHY Bindings Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,1/8] " Neil Armstrong
2019-03-04 10:38 ` [PATCH v2 2/8] dt-bindings: phy: Add Amlogic G12A USB3+PCIE Combo " Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,2/8] " Neil Armstrong
2019-03-04 10:38   ` [PATCH v2 2/8] " Neil Armstrong
2019-03-05 21:42   ` Martin Blumenstingl
2019-03-05 21:42     ` Martin Blumenstingl
2019-03-05 21:42     ` Martin Blumenstingl
2019-03-05 21:42     ` [v2,2/8] " Martin Blumenstingl
2019-03-07  8:35     ` [PATCH v2 2/8] " Neil Armstrong
2019-03-07  8:35       ` Neil Armstrong
2019-03-07  8:35       ` Neil Armstrong
2019-03-07  8:35       ` [v2,2/8] " Neil Armstrong
2019-03-12 18:23   ` [PATCH v2 2/8] " Rob Herring
2019-03-12 18:23     ` Rob Herring
2019-03-12 18:23     ` Rob Herring
2019-03-12 18:23     ` [v2,2/8] " Rob Herring
2019-03-12 18:23     ` [PATCH v2 2/8] " Rob Herring
2019-03-04 10:38 ` [PATCH v2 3/8] dt-bindings: usb: dwc2: Add Amlogic G12A DWC2 Compatible Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,3/8] " Neil Armstrong
2019-03-04 10:38 ` [PATCH v2 4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,4/8] " Neil Armstrong
2019-03-06 21:27   ` [PATCH v2 4/8] " Martin Blumenstingl
2019-03-06 21:27     ` Martin Blumenstingl
2019-03-06 21:27     ` Martin Blumenstingl
2019-03-06 21:27     ` [v2,4/8] " Martin Blumenstingl
2019-03-07  8:36     ` [PATCH v2 4/8] " Neil Armstrong
2019-03-07  8:36       ` Neil Armstrong
2019-03-07  8:36       ` Neil Armstrong
2019-03-07  8:36       ` [v2,4/8] " Neil Armstrong
2019-03-12 18:29   ` [PATCH v2 4/8] " Rob Herring
2019-03-12 18:29     ` Rob Herring
2019-03-12 18:29     ` Rob Herring
2019-03-12 18:29     ` [v2,4/8] " Rob Herring
2019-03-12 18:29     ` [PATCH v2 4/8] " Rob Herring
2019-03-04 10:38 ` [PATCH v2 5/8] phy: amlogic: add Amlogic G12A USB2 PHY Driver Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,5/8] " Neil Armstrong
2019-03-06 21:00   ` [PATCH v2 5/8] " Martin Blumenstingl
2019-03-06 21:00     ` Martin Blumenstingl
2019-03-06 21:00     ` Martin Blumenstingl
2019-03-06 21:00     ` [v2,5/8] " Martin Blumenstingl
2019-03-07  8:41     ` Neil Armstrong [this message]
2019-03-07  8:41       ` [PATCH v2 5/8] " Neil Armstrong
2019-03-07  8:41       ` Neil Armstrong
2019-03-07  8:41       ` [v2,5/8] " Neil Armstrong
2019-03-11 21:04       ` [PATCH v2 5/8] " Martin Blumenstingl
2019-03-11 21:04         ` Martin Blumenstingl
2019-03-11 21:04         ` Martin Blumenstingl
2019-03-11 21:04         ` [v2,5/8] " Martin Blumenstingl
2019-03-04 10:38 ` [PATCH v2 6/8] phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo " Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,6/8] " Neil Armstrong
2019-03-06 21:04   ` [PATCH v2 6/8] " Martin Blumenstingl
2019-03-06 21:04     ` Martin Blumenstingl
2019-03-06 21:04     ` Martin Blumenstingl
2019-03-06 21:04     ` [v2,6/8] " Martin Blumenstingl
2019-03-07  8:44     ` [PATCH v2 6/8] " Neil Armstrong
2019-03-07  8:44       ` Neil Armstrong
2019-03-07  8:44       ` Neil Armstrong
2019-03-07  8:44       ` [v2,6/8] " Neil Armstrong
2019-03-11 21:14       ` [PATCH v2 6/8] " Martin Blumenstingl
2019-03-11 21:14         ` Martin Blumenstingl
2019-03-11 21:14         ` Martin Blumenstingl
2019-03-11 21:14         ` [v2,6/8] " Martin Blumenstingl
2019-03-04 10:38 ` [PATCH v2 7/8] usb: dwc2: Add Amlogic G12A DWC2 Params Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,7/8] " Neil Armstrong
2019-03-04 10:38 ` [PATCH v2 8/8] usb: dwc3: Add Amlogic G12A DWC3 glue Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` Neil Armstrong
2019-03-04 10:38   ` [v2,8/8] " Neil Armstrong
2019-03-07  2:02   ` [PATCH v2 8/8] " Chunfeng Yun
2019-03-07  2:02     ` Chunfeng Yun
2019-03-07  2:02     ` Chunfeng Yun
2019-03-07  2:02     ` [v2,8/8] " Chunfeng Yun
2019-03-07  9:45     ` [PATCH v2 8/8] " Neil Armstrong
2019-03-07  9:45       ` Neil Armstrong
2019-03-07  9:45       ` Neil Armstrong
2019-03-07  9:45       ` [v2,8/8] " Neil Armstrong
2019-03-07 11:01       ` [PATCH v2 8/8] " Chunfeng Yun
2019-03-07 11:01         ` Chunfeng Yun
2019-03-07 11:01         ` Chunfeng Yun
2019-03-07 11:01         ` [v2,8/8] " Chunfeng Yun
2019-03-11 21:19       ` [PATCH v2 8/8] " Martin Blumenstingl
2019-03-11 21:19         ` Martin Blumenstingl
2019-03-11 21:19         ` Martin Blumenstingl
2019-03-11 21:19         ` [v2,8/8] " Martin Blumenstingl
2019-03-11 21:56   ` [PATCH v2 8/8] " Martin Blumenstingl
2019-03-11 21:56     ` Martin Blumenstingl
2019-03-11 21:56     ` Martin Blumenstingl
2019-03-11 21:56     ` [v2,8/8] " Martin Blumenstingl
2019-03-13 13:07     ` [PATCH v2 8/8] " Neil Armstrong
2019-03-13 13:07       ` Neil Armstrong
2019-03-13 13:07       ` Neil Armstrong
2019-03-13 13:07       ` [v2,8/8] " Neil Armstrong

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=bd9d1b4b-4dd7-864e-b197-c5993d3dd24f@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.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-usb@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    /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.