1 --- a/drivers/net/phy/Kconfig
2 +++ b/drivers/net/phy/Kconfig
3 @@ -68,6 +68,12 @@ config VITESSE_PHY
5 Currently supports the vsc8244
7 +config VITESSE_PHY_8601_SKEW
8 + bool "Enable skew timing to vsc8601"
9 + depends on VITESSE_PHY
11 + Apply clock timing adjustments for vsc8601
14 tristate "Drivers for SMSC PHYs"
16 --- a/drivers/net/phy/vitesse.c
17 +++ b/drivers/net/phy/vitesse.c
19 #define MII_VSC8244_EXTCON1_TX_SKEW 0x0800
20 #define MII_VSC8244_EXTCON1_RX_SKEW 0x0200
22 +/* EXT_CON1 Register values for VSC8601 */
23 +#define MII_VSC8601_EXTCON1_INIT 0x0000
24 +#define MII_VSC8601_EXTCON1_SKEW 0x0100
25 +#define MII_VSC8601_EXTCON1_ACTIPHY 0x0020
27 /* Vitesse Interrupt Mask Register */
28 #define MII_VSC8244_IMASK 0x19
29 #define MII_VSC8244_IMASK_IEN 0x8000
31 #define PHY_ID_VSC8662 0x00070660
32 #define PHY_ID_VSC8221 0x000fc550
33 #define PHY_ID_VSC8211 0x000fc4b0
34 +#define PHY_ID_VSC8601 0x00070420
36 MODULE_DESCRIPTION("Vitesse PHY driver");
37 MODULE_AUTHOR("Kriston Carson");
38 @@ -110,6 +116,30 @@ static int vsc824x_config_init(struct ph
42 +static int vsc8601_config_init(struct phy_device *phydev)
47 + err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
48 + MII_VSC8244_AUXCONSTAT_INIT);
53 +#ifdef CONFIG_VITESSE_PHY_8601_SKEW
54 + extcon = phy_read(phydev, MII_VSC8244_EXT_CON1);
58 + extcon |= MII_VSC8601_EXTCON1_SKEW;
60 + err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon);
66 static int vsc824x_ack_interrupt(struct phy_device *phydev)
69 @@ -309,6 +339,19 @@ static struct phy_driver vsc82xx_driver[
70 .ack_interrupt = &vsc824x_ack_interrupt,
71 .config_intr = &vsc82xx_config_intr,
72 .driver = { .owner = THIS_MODULE,},
75 + .phy_id = PHY_ID_VSC8601,
76 + .name = "Vitesse VSC8601",
77 + .phy_id_mask = 0x000ffff8,
78 + .features = PHY_GBIT_FEATURES,
79 + .flags = PHY_HAS_INTERRUPT,
80 + .config_init = &vsc8601_config_init,
81 + .config_aneg = &genphy_config_aneg,
82 + .read_status = &genphy_read_status,
83 + .ack_interrupt = &vsc824x_ack_interrupt,
84 + .config_intr = &vsc82xx_config_intr,
85 + .driver = { .owner = THIS_MODULE,},
88 static int __init vsc82xx_init(void)