summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/micrel.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: net: phy: convert drivers to spdxOleksij Rempel2018-12-071-5/+1
| | | | | | Reviewed-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: fix too late link upChristian Hemp2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | Since commit a4cee7207a1 ("net: phy: micrel: Add workaround for bad autoneg") by Philipp Zabel <p.zabel@pengutronix.de>: Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>: Very rarely, the KSZ9031 will appear to complete autonegotiation, but will drop all traffic afterwards. When this happens, the idle error count will read 0xFF after autonegotiation completes. Reset the PHY when in that state. is it possible that we get the link to late and barebox reports "Network is down". The problem is that ksz9031_config_init is called again in an error case. In this case autoneg will restart but waiting for finish is missing. Signed-off-by: Christian Hemp <c.hemp@phytec.de> Tested-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
* net: phy: micrel: Do not overwrite reserved bitsSascha Hauer2016-11-081-1/+5
| | | | | | | | | | | | | | ksz8021_config_init() unconditionally sets the KSZPHY_OMSO_RMII_OVERRIDE bit. This is since the initial micrel phy commit, so it's not reproducible where this comes from and why this is done. Neither U-Boot nor the kernel ever touch this bit and so should we. Also, instead of doing a write only operation, read/modify/write the bit we actually want to change. This fixes operation on a KSZ8081MLX which is a MII only phy. KSZPHY_OMSO_RMII_OVERRIDE is reserved here and must be written to 0. KSZPHY_OMSO_MII_OVERRIDE is default 1 and must be written as 1. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: KSZ9081/KSZ8091: Disable broadcast modeTeresa Remmet2016-05-131-1/+1
| | | | | | | | | KSZ9081 only supports two phy ids 0x0 and 0x3. 0x0 is also used as broadcast address. Disable broadcast, so that id 0x0 can be used as unique address on a shared bus. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Add workaround for bad autonegPhilipp Zabel2016-02-041-1/+22
| | | | | | | | | | | | | Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>: Very rarely, the KSZ9031 will appear to complete autonegotiation, but will drop all traffic afterwards. When this happens, the idle error count will read 0xFF after autonegotiation completes. Reset the PHY when in that state. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Center FLP timing at 16msPhilipp Zabel2016-02-041-1/+16
| | | | | | | | Based on kernel commit 6270e1ae804a ("net/phy: micrel: Center FLP timing at 16ms") by Jaeden Amero <jaeden.amero@ni.com>: Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Be more const correctPhilipp Zabel2016-02-041-12/+12
| | | | | | | | | | | | | | Based on kernel commit 3c9a9f7fb0ee ("net/phy: micrel: Be more const correct") by Jaeden Amero <jaeden.amero@ni.com>: In a few places in this driver, we weren't using const where we could have. Use const more. In addition, change the arrays of strings in ksz9031_config_init() to be not only const, but also static. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: use BIT macroPhilipp Zabel2016-02-041-9/+9
| | | | | | | | Based on kernel commit 00aee095000c ("net: phy: micrel: use BIT macro") by Johan Hovold <johan@kernel.org>. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Staticise ksz8873mll_read_status()Philipp Zabel2016-02-041-1/+1
| | | | | | | | | | | | | Based on kernel commit 32d73b144eac ("net: phy: micrel: Staticise ksz8873mll_read_status()") by Jingoo Han <jg1.han@samsung.com>: ksz8873mll_read_status() is used only in this file. Fix the following sparse warning: drivers/net/phy/micrel.c:147:5: warning: symbol 'ksz8873mll_read_status' was not declared. Should it be static? Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-11-051-1/+85
|\
| * net: phy: micrel: Add OF conf. support for ksz9031Wadim Egorov2014-11-031-1/+85
| | | | | | | | | | | | | | | | | | | | | | Adds support for ksz9031 PAD skew configuration over devicetree. Based on a patch from the linux kernel. Author: Hubert Chaumette <hchaumette@adeneo-embedded.com> Original commit: 6e4b82730c7525504fc485b370c7f09e594e2e96 Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: micrel: Add ksz8081 supportJan Weitzel2014-10-081-1/+9
|/ | | | | Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy/micrel: disable Asym_Pause supportJan Weitzel2014-09-171-2/+2
| | | | | | | | | With SUPPORTED_Asym_Pause enabled we need to hotplug the ethernet cable. So disable it like done with PHY_ID_KSZ9021. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Add support for specifying pad skew valuesSascha Hauer2014-05-231-1/+85
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: Add kwz9031 supportSascha Hauer2014-05-231-0/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: Add micrel KSZ8031Markus Pargmann2013-10-261-0/+9
| | | | | | | KSZ8031 is similar to KSZ8021. It can use the same functions. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy/micrel: KSZ9021 diasable Asym Pause supportJean-Christophe PLAGNIOL-VILLARD2013-02-111-2/+6
| | | | | | | | | Due to a hw bug do not enable teh Asym_Pause. Otherwise if you ser the bit 11 in 4h you will have to unplug and replug the cable to make the phy work. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: micrel: fix typo in driver nameJan Luebbe2012-12-051-1/+1
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phylib: add micrel supportJean-Christophe PLAGNIOL-VILLARD2012-11-201-0/+174
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>