Skip to content

Commit 4aee90f

Browse files
committed
Merge branch 'at91-4.19-trunk/base_net' into linux-4.19-at91
2 parents f6453c7 + 8b46595 commit 4aee90f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

drivers/net/phy/micrel.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
/* Operation Mode Strap Override */
3434
#define MII_KSZPHY_OMSO 0x16
35+
#define KSZPHY_OMSO_FACTORY_TEST BIT(15)
3536
#define KSZPHY_OMSO_B_CAST_OFF BIT(9)
3637
#define KSZPHY_OMSO_NAND_TREE_ON BIT(5)
3738
#define KSZPHY_OMSO_RMII_OVERRIDE BIT(1)
@@ -350,6 +351,17 @@ static int ksz8061_config_init(struct phy_device *phydev)
350351
return kszphy_config_init(phydev);
351352
}
352353

354+
static int ksz8081_config_init(struct phy_device *phydev)
355+
{
356+
/* KSZPHY_OMSO_FACTORY_TEST is set at de-assertion of the reset line
357+
* based on the TXC pin. If a pull-down is missing, the factory test
358+
* mode should be cleared by manually writing a 0.
359+
*/
360+
phy_clear_bits(phydev, MII_KSZPHY_OMSO, KSZPHY_OMSO_FACTORY_TEST);
361+
362+
return kszphy_config_init(phydev);
363+
}
364+
353365
static int ksz9021_load_values_from_of(struct phy_device *phydev,
354366
const struct device_node *of_node,
355367
u16 reg,
@@ -931,7 +943,7 @@ static struct phy_driver ksphy_driver[] = {
931943
.flags = PHY_HAS_INTERRUPT,
932944
.driver_data = &ksz8081_type,
933945
.probe = kszphy_probe,
934-
.config_init = kszphy_config_init,
946+
.config_init = ksz8081_config_init,
935947
.ack_interrupt = kszphy_ack_interrupt,
936948
.config_intr = kszphy_config_intr,
937949
.get_sset_count = kszphy_get_sset_count,

0 commit comments

Comments
 (0)