From: Andrew Lunn <andrew@lunn.ch>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
kuba@kernel.org, ardeleanalex@gmail.com
Subject: Re: [PATCH v2 1/2] net: phy: adin: disable diag clock & disable standby mode in config_aneg
Date: Sat, 24 Oct 2020 00:43:36 +0200 [thread overview]
Message-ID: <20201023224336.GF745568@lunn.ch> (raw)
In-Reply-To: <20201022074551.11520-1-alexandru.ardelean@analog.com>
On Thu, Oct 22, 2020 at 10:45:50AM +0300, Alexandru Ardelean wrote:
> When the PHY powers up, the diagnostics clock isn't enabled (bit 2 in
> register PHY_CTRL_1 (0x0012)).
> Also, the PHY is not in standby mode, so bit 13 in PHY_CTRL_3 (0x0017) is
> always set at power up.
>
> The standby mode and the diagnostics clock are both meant to be for the
> cable diagnostics feature of the PHY (in phylib this would be equivalent to
> the cable-test support), and for the frame-generator feature of the PHY.
>
> In standby mode, the PHY doesn't negotiate links or manage links.
>
> To use the cable diagnostics/test (or frame-generator), the PHY must be
> first set in standby mode, so that the link operation doesn't interfere.
> Then, the diagnostics clock must be enabled.
>
> For the cable-test feature, when the operation finishes, the PHY goes into
> PHY_UP state, and the config_aneg hook is called.
>
> For the ADIN PHY, we need to make sure that during autonegotiation
> configuration/setup the PHY is removed from standby mode and the
> diagnostics clock is disabled, so that normal operation is resumed.
>
> This change does that by moving the set of the ADIN1300_LINKING_EN bit (2)
> in the config_aneg (to disable standby mode).
> Previously, this was set in the downshift setup, because the downshift
> retry value and the ADIN1300_LINKING_EN are in the same register.
>
> And the ADIN1300_DIAG_CLK_EN bit (13) is cleared, to disable the
> diagnostics clock.
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2020-10-23 22:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 7:45 [PATCH v2 1/2] net: phy: adin: disable diag clock & disable standby mode in config_aneg Alexandru Ardelean
2020-10-22 7:45 ` [PATCH v2 2/2] net: phy: adin: implement cable-test support Alexandru Ardelean
2020-10-23 0:02 ` Jakub Kicinski
2020-10-23 13:25 ` Alexandru Ardelean
2020-10-23 22:48 ` Andrew Lunn
2020-10-23 22:43 ` Andrew Lunn [this message]
2020-10-31 12:16 ` [PATCH v2 1/2] net: phy: adin: disable diag clock & disable standby mode in config_aneg Alexandru Ardelean
2020-10-31 14:36 ` Andrew Lunn
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=20201023224336.GF745568@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandru.ardelean@analog.com \
--cc=ardeleanalex@gmail.com \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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).