|
32 | 32 |
|
33 | 33 | /* Operation Mode Strap Override */ |
34 | 34 | #define MII_KSZPHY_OMSO 0x16 |
| 35 | +#define KSZPHY_OMSO_FACTORY_TEST BIT(15) |
35 | 36 | #define KSZPHY_OMSO_B_CAST_OFF BIT(9) |
36 | 37 | #define KSZPHY_OMSO_NAND_TREE_ON BIT(5) |
37 | 38 | #define KSZPHY_OMSO_RMII_OVERRIDE BIT(1) |
@@ -350,6 +351,17 @@ static int ksz8061_config_init(struct phy_device *phydev) |
350 | 351 | return kszphy_config_init(phydev); |
351 | 352 | } |
352 | 353 |
|
| 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 | + |
353 | 365 | static int ksz9021_load_values_from_of(struct phy_device *phydev, |
354 | 366 | const struct device_node *of_node, |
355 | 367 | u16 reg, |
@@ -931,7 +943,7 @@ static struct phy_driver ksphy_driver[] = { |
931 | 943 | .flags = PHY_HAS_INTERRUPT, |
932 | 944 | .driver_data = &ksz8081_type, |
933 | 945 | .probe = kszphy_probe, |
934 | | - .config_init = kszphy_config_init, |
| 946 | + .config_init = ksz8081_config_init, |
935 | 947 | .ack_interrupt = kszphy_ack_interrupt, |
936 | 948 | .config_intr = kszphy_config_intr, |
937 | 949 | .get_sset_count = kszphy_get_sset_count, |
|
0 commit comments