devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
	carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	will.deacon-5wv7dgnIgG8@public.gmane.org,
	catalin.marinas-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH 3/5] ARM64: dts: meson-gxbb-p20x: add reset for the ethernet PHY
Date: Wed, 18 Jan 2017 15:26:22 +0100	[thread overview]
Message-ID: <CAFBinCCPK7hKa_XRfLHCvuo5L_k++3Sxnsa44KUxNOdq4mpbBQ@mail.gmail.com> (raw)
In-Reply-To: <1484735769.26620.69.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

On Wed, Jan 18, 2017 at 11:36 AM, Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org> wrote:
> On Tue, 2017-01-17 at 22:26 +0100, Martin Blumenstingl wrote:
>> On Tue, Jan 17, 2017 at 8:22 PM, Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> wrote:
>> >
>> > On Sat, 2016-12-03 at 00:47 +0100, Martin Blumenstingl wrote:
>> > >
>> > > This resets the ethernet PHY during boot to get the PHY into a
>> > > "clean"
>> > > state. While here also specify the phy-handle of the ethmac node
>> > > to
>> > > make the PHY configuration similar to the one we have on GXL
>> > > devices.
>> > >
>> > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemai
>> > > l.co
>> > > m>
>> > > Tested-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> > > ---
>> > >  arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 15
>> > > +++++++++++++++
>> > >  1 file changed, 15 insertions(+)
>> > >
>> > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
>> > > b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
>> > > index 203be28..2abc553 100644
>> > > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
>> > > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
>> > > @@ -134,10 +134,25 @@
>> > >       pinctrl-names = "default";
>> > >  };
>> > >
>> > > +&mdio0 {
>> > > +     ethernet_phy0: ethernet-phy@0 {
>> > > +             compatible = "ethernet-phy-ieee802.3-c22";
>> > > +             reg = <0>;
>> >
>> > Sorry for the late reply.
>> > I just tried on the p200 and this patch (serie) breaks the network
>> > on
>> > it. The PHY is not detected anymore.
>> >
>> > From the KSZ9031 Datasheet : "PHY Address 0h is supported as the
>> > unique
>> > PHY address only; it is not supported as the broadcast PHY address
>> > [...]"
>> >
>> > So we can't just use the broadcast address here:
>> > reg should be <3>.
>> OK, I'll fix that in a follow-up. as mentioned in the other thread:
>> can you confirm that the PHY ID is 0x00221620?
>
> That's right.
thanks for confirming this

>> It seems that I also broke meson-gxbb-nexbox-a95x.dts with that
>> series
>> (no idea why that slipped through): according to the photos from
>> Neil's wiki [0] this seems to use an IC+ 10/100 ethernet PHY
>> (probably
>> an IP101A)
>
> IP101GR from what I can see on the board.
thanks :)

>>
>> >
>> > >
>> > > +     };
>> > > +};
>> > > +
>> > >  &ethmac {
>> > >       status = "okay";
>> > >       pinctrl-0 = <&eth_rgmii_pins>;
>> > >       pinctrl-names = "default";
>> > > +
>> > > +     phy-handle = <&ethernet_phy0>;
>> > > +
>> > > +     snps,reset-gpio = <&gpio GPIOZ_14 0>;
>> > > +     snps,reset-delays-us = <0 10000 1000000>;
>> > > +     snps,reset-active-low;
>> > > +
>> > > +     phy-mode = "rgmii";
>> >
>> > We can't define this in p20x. actually the p201 uses an rmii.
>> > I have not idea about gpio reset, or the phy address for the p201.
>> >
>> > I suppose it would be better to move this to meson-gxbb_p200.dts
>> >
>> > I don't know if anybody has a p201, but until we can confirm a
>> > working
>> > Ethernet configuration, we should probably drop it for the p201
>> >
>> > Of course the problem was already there before this patch ...
>> indeed, that seems to be a problem.
>> the GXBB Nexbox A95x I mentioned above is based on the p201 board.
>> Amlogic's .dts also toggles GPIOZ_14 for it: [1]
>> chances are high that it also features an IP101A PHY (this is pure
>> speculation though).
>
> Agreed, chances are high it'll be this way.
>
>>
>> I propose four patches to fix all this situation:
>> - add the GPIOZ_14 reset and an ethernet_phy0 (with reg = <0>) to
>> meson-gxbb-nexbox-a95x.dts
>> - add the ethernet_phy0 node with reg = <0> (and ideally I also want
>> to include the KSZ9031 PHY ID) to meson-gxbb-p200.dtsi along with
>> phy-mode = "rgmii"
>
> you mean with reg = <3> ?
you're right, another typo there!

>> - add the ethernet_phy0 node with reg = <0> (without any PHY ID as we
>> don't know which one is used) to meson-gxbb-p201.dtsi along with
>> phy-mode = "rgmii"
>> - remove "phy-mode" and ethernet_phy0 from meson-gxbb-p20x.dtsi and
>> add a comment that both, the RGMII and the RMII PHY have GPIOZ_14
>> connected to their reset line
>
> I'm not too sure about these last 2 points. As you mentioned, we are
> only speculating regarding the p201. I would prefer to avoid putting
> things we are not sure about in the DT (as much as possible).
>
> We could disable the ethernet for p201:
> 1) if nobody complains, situation remains unchanged, ethernet is not
> working on that board
> 2) if someone complains, then we will be able to some facts from
> him/her, and get it working properly.
>
> After all, that's not a regression. With what we had in the meson-gxbb-
> p20x.dtsi so far, ethernet never worked on that board.
fine for me as well
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-01-18 14:26 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 23:47 [PATCH 0/5] meson-gx: reset RGMII PHYs and configure TX delay Martin Blumenstingl
2016-12-02 23:47 ` [PATCH 1/5] ARM64: dts: meson-gx: move the MDIO node to meson-gx Martin Blumenstingl
2016-12-02 23:47 ` [PATCH 2/5] ARM64: dts: meson-gxbb-odroidc2: add reset for the ethernet PHY Martin Blumenstingl
2016-12-02 23:47 ` [PATCH 3/5] ARM64: dts: meson-gxbb-p20x: " Martin Blumenstingl
     [not found]   ` <20161202234739.22929-4-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-17 19:22     ` Jerome Brunet
2017-01-17 21:26       ` Martin Blumenstingl
     [not found]         ` <CAFBinCBfJ4b1a1Bqn7kJHyj79i8UJnjJh00u3NvARzJPuUmrNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-18 10:36           ` Jerome Brunet
     [not found]             ` <1484735769.26620.69.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-01-18 14:26               ` Martin Blumenstingl [this message]
2016-12-02 23:47 ` [PATCH 4/5] ARM64: dts: meson-gxbb-vega-s95: " Martin Blumenstingl
2016-12-02 23:47 ` [PATCH 5/5] ARM64: dts: amlogic: add the ethernet TX delay configuration Martin Blumenstingl
     [not found] ` <20161202234739.22929-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-12-17 20:36   ` [PATCH 0/5] meson-gx: reset RGMII PHYs and configure TX delay Martin Blumenstingl
     [not found]     ` <CAFBinCDpBew7wreNPn6=J3jKsw_Ok=Ed9_+Gxsefb661RvUdrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-09 22:52       ` Kevin Hilman
2017-01-17 19:23   ` Jerome Brunet
2017-01-17 21:09     ` Martin Blumenstingl
     [not found]       ` <CAFBinCDvtufXUxe+cRCzOKFtbOqS-xEr0Vp=_0S4Pn+sTPHOmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 22:26         ` Jerome Brunet
     [not found]           ` <1484691981.26620.55.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-01-17 22:44             ` Martin Blumenstingl
2017-01-18 19:28   ` Kevin Hilman
2017-01-18 19:40     ` Martin Blumenstingl
2017-01-19  9:47       ` Jerome Brunet
2017-01-20 13:26 ` [PATCH v2 0/9] " Martin Blumenstingl
     [not found]   ` <20170120132650.9784-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-20 13:26     ` [PATCH v2 1/9] ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO Martin Blumenstingl
2017-01-20 13:26     ` [PATCH v2 2/9] ARM64: dts: meson-gxbb-p201: " Martin Blumenstingl
     [not found]       ` <20170120132650.9784-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-20 13:31         ` Neil Armstrong
2017-01-20 13:33           ` Martin Blumenstingl
2017-01-20 13:26     ` [PATCH v2 4/9] ARM64: dts: meson-gxbb-nexbox-a95x: " Martin Blumenstingl
2017-01-20 13:26     ` [PATCH v2 5/9] ARM64: dts: meson-gxbb-wetek-hub: " Martin Blumenstingl
2017-01-20 13:26     ` [PATCH v2 6/9] ARM64: dts: meson-gxbb-wetek-play2: " Martin Blumenstingl
2017-01-20 13:26     ` [PATCH v2 9/9] ARM64: dts: meson-gx: remove the phy-mode property from meson-gx Martin Blumenstingl
2017-01-20 13:26   ` [PATCH v2 3/9] ARM64: dts: meson-gxbb-vega-s95: add the ethernet PHY's reset GPIO Martin Blumenstingl
2017-01-20 13:26   ` [PATCH v2 7/9] ARM64: dts: meson-gxbb-p20x: remove the ethernet node Martin Blumenstingl
2017-01-20 13:26   ` [PATCH v2 8/9] ARM64: dts: amlogic: add the ethernet TX delay configuration Martin Blumenstingl
2017-01-20 15:22   ` [PATCH v3 0/9] meson-gx: reset RGMII PHYs and configure TX delay Martin Blumenstingl
     [not found]     ` <20170120152232.13943-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-20 15:22       ` [PATCH v3 1/9] ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO Martin Blumenstingl
     [not found]         ` <20170120152232.13943-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-20 16:23           ` Neil Armstrong
2017-01-20 15:22       ` [PATCH v3 2/9] ARM64: dts: meson-gxbb-p200: " Martin Blumenstingl
     [not found]         ` <20170120152232.13943-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-20 16:18           ` Andrew Lunn
2017-01-20 16:21           ` Andrew Lunn
     [not found]             ` <20170120162138.GE25907-g2DYL2Zd6BY@public.gmane.org>
2017-01-20 17:07               ` Martin Blumenstingl
     [not found]                 ` <CAFBinCA47Nng_jjxKrWrV_YBHr0bg+7xPaJrVswt_WnZ6wtyjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-20 17:46                   ` Andrew Lunn
     [not found]                     ` <20170120174658.GG25907-g2DYL2Zd6BY@public.gmane.org>
2017-01-22 16:48                       ` Martin Blumenstingl
2017-01-20 16:23           ` Neil Armstrong
2017-01-20 15:22       ` [PATCH v3 3/9] ARM64: dts: meson-gxbb-vega-s95: " Martin Blumenstingl
2017-01-20 15:22       ` [PATCH v3 4/9] ARM64: dts: meson-gxbb-nexbox-a95x: " Martin Blumenstingl
2017-01-20 16:23         ` Neil Armstrong
2017-01-20 15:22       ` [PATCH v3 5/9] ARM64: dts: meson-gxbb-wetek-hub: " Martin Blumenstingl
2017-01-20 15:22       ` [PATCH v3 6/9] ARM64: dts: meson-gxbb-wetek-play2: " Martin Blumenstingl
2017-01-20 16:23         ` Neil Armstrong
2017-01-20 15:22       ` [PATCH v3 7/9] ARM64: dts: meson-gxbb-p201: fix ethernet support Martin Blumenstingl
2017-01-20 15:22       ` [PATCH v3 8/9] ARM64: dts: amlogic: add the ethernet TX delay configuration Martin Blumenstingl
2017-01-20 16:34         ` Neil Armstrong
2017-01-20 15:22       ` [PATCH v3 9/9] ARM64: dts: meson-gx: remove the phy-mode property from meson-gx Martin Blumenstingl
2017-01-20 15:32       ` [PATCH v3 0/9] meson-gx: reset RGMII PHYs and configure TX delay Martin Blumenstingl
2017-01-20 19:46         ` Kevin Hilman
2017-01-22 18:10       ` [PATCH v4 " Martin Blumenstingl
     [not found]         ` <20170122181028.5014-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-01-22 18:10           ` [PATCH v4 1/9] ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 2/9] ARM64: dts: meson-gxbb-p200: " Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 3/9] ARM64: dts: meson-gxbb-vega-s95: " Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 4/9] ARM64: dts: meson-gxbb-nexbox-a95x: " Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 5/9] ARM64: dts: meson-gxbb-wetek-hub: " Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 6/9] ARM64: dts: meson-gxbb-wetek-play2: " Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 7/9] ARM64: dts: meson-gxbb-p201: fix ethernet support Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 8/9] ARM64: dts: amlogic: add the ethernet TX delay configuration Martin Blumenstingl
2017-01-22 18:10           ` [PATCH v4 9/9] ARM64: dts: meson-gx: remove the phy-mode property from meson-gx Martin Blumenstingl
2017-01-23 18:55           ` [PATCH v4 0/9] meson-gx: reset RGMII PHYs and configure TX delay Kevin Hilman
     [not found]             ` <m24m0p38sk.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-01-23 19:02               ` Martin Blumenstingl
2017-02-19 21:41           ` [PATCH v5 " Martin Blumenstingl
     [not found]             ` <20170219214149.30418-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-02-19 21:41               ` [PATCH v5 1/9] ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 2/9] ARM64: dts: meson-gxbb-p200: " Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 3/9] ARM64: dts: meson-gxbb-vega-s95: " Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 4/9] ARM64: dts: meson-gxbb-nexbox-a95x: " Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 5/9] ARM64: dts: meson-gxbb-wetek-hub: " Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 6/9] ARM64: dts: meson-gxbb-wetek-play2: " Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 7/9] ARM64: dts: meson-gxbb-p201: fix ethernet support Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 8/9] ARM64: dts: amlogic: add the ethernet TX delay configuration Martin Blumenstingl
2017-02-19 21:41               ` [PATCH v5 9/9] ARM64: dts: meson-gx: remove the phy-mode property from meson-gx Martin Blumenstingl
2017-02-20  9:08               ` [PATCH v5 0/9] meson-gx: reset RGMII PHYs and configure TX delay Jerome Brunet
2017-03-02 17:02                 ` Kevin Hilman
2017-01-20 15:27     ` [PATCH v3 " Jerome Brunet

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=CAFBinCCPK7hKa_XRfLHCvuo5L_k++3Sxnsa44KUxNOdq4mpbBQ@mail.gmail.com \
    --to=martin.blumenstingl-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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).