linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Martin Schiller <ms@dev.tdt.de>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	martin.blumenstingl@googlemail.com,
	Florian Fainelli <f.fainelli@gmail.com>,
	hkallweit1@gmail.com,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	David Miller <davem@davemloft.net>,
	kuba@kernel.org, netdev <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v6] net: phy: intel-xway: Add RGMII internal delay configuration
Date: Wed, 12 Jan 2022 10:24:29 -0800	[thread overview]
Message-ID: <CAJ+vNU0r6N_ePohyZy5t7v4QpdaJWQ7mXrKr=qxhExVxm-ChRg@mail.gmail.com> (raw)
In-Reply-To: <Yd7UHYeAl3wigMmr@lunn.ch>

On Wed, Jan 12, 2022 at 5:14 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > > If I add a 'genphy_soft_reset(phydev);' at the top of
> > > xway_gphy_rgmii_init before the write to XWAY_MDIO_MIICTRL the values
> > > do take effect so perhaps that's the proper fix.
> >
> > OK, I see that we have to change something here.
> > But I would like to avoid a complete reset (BMCR_RESET) if possible.
>
> What does the datasheet say about BMCR_RESET? Some PHYs, like Marvell,
> it only resets the internal state machines. Register values are not
> changed back to defaults or anything like that. Also for many register
> writes in Marvell PHYs the write does not take effect until the next
> reset.
>
> So a BMCR_RESET can be the correct thing to do.
>

Andrew,

Datasheet [1] says "Resets the PHY to its default state. Active links
are terminated. Note that this is a self-clearing bit which is set to
zero by the hardware after reset has been done. See also IEEE
802.3-2008 22.2.4.1.1."

Experimentally I can change the delays and read them back as such,
then issue a BMCR_RESET and read them and they revert to strapped
values so I know BMCR_RESET resets at least some of the registers.

I suppose something to force auto-negotiation to occur again
(BMCR_ANEN?) would suffice. I'm not sure what the best course of
action is.

Tim
[1] https://assets.maxlinear.com/web/documents/618152_gpy111_pef7071vv16_hd_rev1.5.pdf

  reply	other threads:[~2022-01-12 18:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  8:27 [PATCH net-next v6] net: phy: intel-xway: Add RGMII internal delay configuration Martin Schiller
2021-07-19 20:56 ` Andrew Lunn
2021-07-20 11:50   ` Martin Schiller
2022-01-10 23:12 ` Tim Harvey
2022-01-11  7:44   ` Martin Schiller
2022-01-11 13:34     ` Andrew Lunn
2022-01-11 19:12     ` Tim Harvey
2022-01-12 11:07       ` Martin Schiller
2022-01-12 13:14         ` Andrew Lunn
2022-01-12 18:24           ` Tim Harvey [this message]
2022-01-12 13:46       ` Russell King (Oracle)
2022-01-12 18:25         ` Tim Harvey
2022-01-13  6:32           ` Martin Schiller
2022-02-01 20:28             ` Tim Harvey
2022-02-01 20:49               ` Andrew Lunn
2023-02-22 16:04   ` Michael Walle
2023-02-24  6:25     ` Martin Schiller
2023-02-24  8:04       ` Michael Walle
2023-02-24  8:48         ` Martin Schiller
2023-03-02 15:03           ` Michael Walle

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='CAJ+vNU0r6N_ePohyZy5t7v4QpdaJWQ7mXrKr=qxhExVxm-ChRg@mail.gmail.com' \
    --to=tharvey@gateworks.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=ms@dev.tdt.de \
    --cc=netdev@vger.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).