linux-stable/drivers/net/phy
Alexandru Ardelean 85ba75bb57 net: phy: adin: disable diag clock & disable standby mode in config_aneg
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.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201103074436.93790-1-alexandru.ardelean@analog.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-04 17:01:20 -08:00
..
mscc net: phy: mscc: macsec: constify vsc8584_macsec_ops 2020-08-26 16:21:17 -07:00
adin.c net: phy: adin: disable diag clock & disable standby mode in config_aneg 2020-11-04 17:01:20 -08:00
amd.c
aquantia.h
aquantia_hwmon.c
aquantia_main.c
at803x.c net: phy: at803x: constify static regulator_ops 2020-08-26 16:21:17 -07:00
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm7xxx.c net: phy: bcm7xxx: Add an entry for BCM72113 2020-09-21 17:16:17 -07:00
bcm63xx.c
bcm87xx.c
bcm54140.c
bcm84881.c
broadcom.c
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83640.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
dp83640_reg.h
dp83822.c net: phy: dp83822: Update the fiber advertisement for speed 2020-09-19 16:54:35 -07:00
dp83848.c
dp83867.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
dp83869.c net: phy: dp83869: fix unsigned comparisons against less than zero values 2020-10-03 17:08:32 -07:00
et1011c.c
fixed_phy.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
icplus.c
intel-xway.c
Kconfig mdio: fix mdio-thunder.c dependency & build error 2020-09-27 13:21:28 -07:00
linkmode.c
lxt.c
Makefile net: phy: Sort Kconfig and Makefile 2020-08-27 06:55:51 -07:00
marvell.c net: phy: marvell: add special handling of Finisar modules with 88E1111 2020-10-30 17:11:44 -07:00
marvell10g.c net: phy: marvell10g: fix null pointer dereference 2020-08-11 15:42:23 -07:00
mdio-boardinfo.c
mdio-boardinfo.h
mdio_bus.c net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) 2020-09-29 14:02:54 -07:00
mdio_device.c net: mdio device: use flexible sleeping in reset function 2020-08-03 15:01:02 -07:00
mdio_devres.c
meson-gxl.c
micrel.c net: phy: mchp: Add support for LAN8814 QUAD PHY 2020-09-11 17:41:55 -07:00
microchip.c
microchip_t1.c
mii_timestamper.c
national.c
nxp-tja11xx.c
phy-c45.c
phy-core.c net: phy: Document core PHY structures 2020-09-23 18:02:49 -07:00
phy.c net: phy: Document core PHY structures 2020-09-23 18:02:49 -07:00
phy_device.c net: phy: Avoid NPD upon phy_detach() when driver is unbound 2020-09-17 16:55:35 -07:00
phy_led_triggers.c net: phy: leds: Deduplicate link LED trigger registration 2020-10-30 10:43:37 -07:00
phylink.c net: phylink: disable BMCR_ISOLATE in phylink_mii_c22_pcs_config 2020-10-27 18:30:20 -07:00
qsemi.c
realtek.c net: phy: realtek: Add support for RTL8221B-CG series 2020-11-03 17:45:19 -08:00
rockchip.c
sfp-bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sfp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
sfp.h
smsc.c net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag 2020-09-09 14:15:02 -07:00
spi_ks8995.c net: Use kobj_to_dev() API 2020-09-28 15:14:42 -07:00
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c